Package org.exoplatform.task.util
Class TaskUtil
java.lang.Object
org.exoplatform.task.util.TaskUtil
Created by The eXo Platform SAS
Author : Thibault Clement
tclement@exoplatform.com
6/3/15
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final org.exoplatform.commons.utils.ListAccess<Task>static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionstatic TaskQuerybuildTaskQuery(TaskQuery query, String keyword, List<Long> searchLabelIds, Status status, TaskUtil.DUE dueDate, Priority priority, List<String> searchAssignee, Boolean showCompleted, TimeZone timezone) static TaskQuerybuildTaskQuery(TaskQuery query, String keyword, List<Long> searchLabelIds, Status status, TaskUtil.DUE dueDate, Priority priority, List<String> searchAssignee, List<String> searchCoworker, List<String> searchWatcher, Boolean showCompleted, TimeZone timezone) static TaskQuerybuildTaskQuery(TaskQuery query, String keyword, List<Long> searchLabelIds, StatusDto status, TaskUtil.DUE dueDate, Priority priority, List<String> searchAssignee, Boolean showCompleted, TimeZone timezone) static StringbuildTaskURL(TaskDto task) static StringbuildTaskURL(TaskDto task, org.exoplatform.portal.mop.SiteKey siteKey, org.exoplatform.container.ExoContainer container, org.exoplatform.web.controller.router.Router router) static booleancanDeleteComment(org.exoplatform.services.security.Identity identity, Comment comment) static booleancanDeleteComment(org.exoplatform.services.security.Identity identity, CommentDto comment) static Date[]convertDueDate(String dueDate, TimeZone timezone) getCoworker(TaskService taskService, long taskId) Added for tests using a specific instance of taskServicegetDefGroupBys(long currentProject, ResourceBundle bundle) getDefOrders(ResourceBundle bundle) static StringgetResourceBundleLabel(Locale locale, String label) static StringgetUserLanguage(String userId) Gets platform language of user.getWatcher(TaskService taskService, TaskDto task) static Map<GroupKey,List<TaskEntity>> groupTasks(List<TaskEntity> tasks, String groupBy, org.exoplatform.services.security.Identity userId, TimeZone userTimezone, LabelService labelService, UserService userService) static booleanhasDeletePermission(TaskDto task) static booleanhasEditPermission(TaskService taskService, Task task) static booleanhasEditPermission(TaskService taskService, TaskDto task) static booleanhasViewOnlyPermission(TaskService taskService, TaskDto task) static booleanhasViewPermission(TaskService taskService, TaskDto task) static booleanisEligibleWatcher(Task task, String username) resolve(List<String> keys, ResourceBundle bundle) static TaskDtosaveTaskField(TaskDto task, org.exoplatform.services.security.Identity userId, String param, String[] values, TimeZone timezone, TaskService taskService, LabelService labelService, StatusService statusService)
-
Field Details
-
URL_TASK_DETAIL
- See Also:
-
TITLE
- See Also:
-
PRIORITY
- See Also:
-
DUEDATE
- See Also:
-
CREATED_TIME
- See Also:
-
NONE
- See Also:
-
STATUS
- See Also:
-
ASSIGNEE
- See Also:
-
PROJECT
- See Also:
-
LABEL
- See Also:
-
COMPLETED
- See Also:
-
RANK
- See Also:
-
MEMBERSHIP
- See Also:
-
CREATED_BY
- See Also:
-
COWORKER
- See Also:
-
EMPTY_TASK_LIST
-
-
Method Details
-
getDefOrders
-
getDefGroupBys
-
resolve
-
buildTaskQuery
-
buildTaskQuery
-
buildTaskQuery
-
convertDueDate
-
groupTasks
public static Map<GroupKey,List<TaskEntity>> groupTasks(List<TaskEntity> tasks, String groupBy, org.exoplatform.services.security.Identity userId, TimeZone userTimezone, LabelService labelService, UserService userService) throws EntityNotFoundException - Throws:
EntityNotFoundException
-
buildTaskURL
-
buildTaskURL
-
canDeleteComment
public static boolean canDeleteComment(org.exoplatform.services.security.Identity identity, Comment comment) -
canDeleteComment
public static boolean canDeleteComment(org.exoplatform.services.security.Identity identity, CommentDto comment) -
saveTaskField
public static TaskDto saveTaskField(TaskDto task, org.exoplatform.services.security.Identity userId, String param, String[] values, TimeZone timezone, TaskService taskService, LabelService labelService, StatusService statusService) throws EntityNotFoundException, ParameterEntityException -
hasEditPermission
-
hasEditPermission
-
hasViewPermission
-
hasViewOnlyPermission
-
hasDeletePermission
-
getResourceBundleLabel
-
getUserLanguage
Gets platform language of user. In case of any errors return null.- Parameters:
userId- user Id- Returns:
- the platform language
-
getCoworker
Added for tests using a specific instance of taskService- Parameters:
taskService- TaskService instancetaskId- Task Id- Returns:
- List of Coworkers
-
getWatcher
-
isEligibleWatcher
-