Class AnyTasksManager
java.lang.Object
eu.c6.gibraltar.api.common.AbstractManager
eu.c6.gibraltar.api.managers.tasks.AnyTasksManager
The Class AnyTasksManager to manage tasks.
-
Field Summary
Fields inherited from class eu.c6.gibraltar.api.common.AbstractManager
APPLICATION_XLS, APPLICATION_XLS_TYPE, APPLICATION_XLSX, APPLICATION_XLSX_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionAnyTasksManager(AnySession anySession) Instantiates a new Any tasks manager. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddRecipients(String id, List<String> recipients) Add recipients to the list of recipients from a supervision task identifier.booleanDelegate one or multiple task item using their identifier to a user.booleanDelete the task item using its identifier.booleanDelete task items using their identifier.Gets the task item with its identifier.Gets the tasks.booleanreplaceRecipients(String id, List<String> recipients) Replace the list of recipients from a supervision task identifier.booleantakeAction(String id, AnyTaskAction action) Take transition action on a task, using its identifier.
-
Constructor Details
-
AnyTasksManager
Instantiates a new Any tasks manager.- Parameters:
anySession- the Any user session
-
-
Method Details
-
getTasks
Gets the tasks.Returned task is limited to 25 each call.
- Parameters:
fromIndex- the from index you want to get next 25 contents. UseScrollResult.getTotalCount()from the result to get total count.printedFields- the printed fields you want to have in the result- Returns:
ScrollResultcontaining the list of abstract contents (ScrollResult.getResults()) and total count of contents (ScrollResult.getTotalCount()).- Throws:
Exception- the exception if current user does not have the permission to access to tasks.
-
get
Gets the task item with its identifier.- Parameters:
taskId- the task identifier- Returns:
- the task item
- Throws:
Exception- the exception if current user does not have permission to get it or task does not exist.
-
delete
Delete the task item using its identifier.- Parameters:
taskId- the task identifier- Returns:
- boolean result if delete was a success
- Throws:
Exception- the exception if current user does not have permission to get it or task does not exist.
-
deleteAll
Delete task items using their identifier.- Parameters:
taskIds- the list of task identifier to delete- Returns:
- boolean result if delete was a total success
- Throws:
Exception- the exception if current user does not have permission to get it or task does not exist.
-
delegate
Delegate one or multiple task item using their identifier to a user.- Parameters:
user- the user identifier to whom the task will be delegatedtaskIds- an array of task identifier(s)- Returns:
- boolean result if delegate was a success
- Throws:
Exception- the exception if current user does not have permission to get it or task does not exist.
-
takeAction
Take transition action on a task, using its identifier.- Parameters:
action- the transition action the task should take (AnyTaskAction)id- the task identifier- Returns:
- boolean result if action was a success
- Throws:
Exception- the exception if current user does not have permission to get it or task does not exist.
-
replaceRecipients
Replace the list of recipients from a supervision task identifier.- Parameters:
id- the supervision task identifierrecipients- the list of valid user_name, login or group, the task should be update with- Returns:
- boolean result if update was a success
- Throws:
Exception- the exception if current user does not have permission to get it or task does not exist or some recipients do not exist.
-
addRecipients
Add recipients to the list of recipients from a supervision task identifier.- Parameters:
id- the supervision task identifierrecipients- the list of valid user_name, login or group, the task should be update with- Returns:
- boolean result if update was a success
- Throws:
Exception- the exception if current user does not have permission to get it or task does not exist or some recipients do not exist.
-