/**
* 服务端实际调用的方法,查询我的任务
*
* @param limit
* 显示限制
* @param start
* 开始位置
* @param state
* 任务状态
* @param userId
* 任务承担者
* @return String
* @throws WTException
* @throws JSONException
*
*/
public static String searchMyWorkItem(String limit, String start,
String state, String userId) throws WTException, JSONException {
String result = null;
WTPrincipal currentUser = null;
boolean flag = SessionServerHelper.manager.isAccessEnforced();
SessionServerHelper.manager.setAccessEnforced(false);
try {
if (userId == null || userId.length() == 0)
currentUser = SessionHelper.manager.getPrincipal();
else
currentUser = getUserById(userId);
QuerySpec queryspec = buildQueryspec(currentUser, state);
result = buildResult(queryspec, currentUser, limit, start);
} finally {
SessionServerHelper.manager.setAccessEnforced(flag);
}
return result;
}
* 服务端实际调用的方法,查询我的任务
*
* @param limit
* 显示限制
* @param start
* 开始位置
* @param state
* 任务状态
* @param userId
* 任务承担者
* @return String
* @throws WTException
* @throws JSONException
*
*/
public static String searchMyWorkItem(String limit, String start,
String state, String userId) throws WTException, JSONException {
String result = null;
WTPrincipal currentUser = null;
boolean flag = SessionServerHelper.manager.isAccessEnforced();
SessionServerHelper.manager.setAccessEnforced(false);
try {
if (userId == null || userId.length() == 0)
currentUser = SessionHelper.manager.getPrincipal();
else
currentUser = getUserById(userId);
QuerySpec queryspec = buildQueryspec(currentUser, state);
result = buildResult(queryspec, currentUser, limit, start);
} finally {
SessionServerHelper.manager.setAccessEnforced(flag);
}
return result;
}