public class UserTaskAdminServiceImpl extends Object implements UserTaskAdminService
| Modifier and Type | Field and Description |
|---|---|
static int |
ADMIN |
static int |
EXCL_OWNER |
static int |
POT_OWNER |
| Constructor and Description |
|---|
UserTaskAdminServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBusinessAdmins(long taskId,
boolean removeExisting,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
Adds new business admin for a given task.
|
void |
addExcludedOwners(long taskId,
boolean removeExisting,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
Adds new excluded owners for a given task.
|
protected void |
addPeopleAssignment(long taskId,
boolean removeExisting,
int type,
org.kie.api.task.model.OrganizationalEntity... orgEntities) |
void |
addPotentialOwners(long taskId,
boolean removeExisting,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
Adds new potential owners for a given task.
|
void |
addTaskInput(long taskId,
String name,
Object value)
Adds new item to task input variables.
|
void |
addTaskInputs(long taskId,
Map<String,Object> data)
Adds new items to task input variables.
|
org.kie.internal.task.api.model.EmailNotification |
buildEmailNotification(String subjectStr,
List<org.kie.api.task.model.OrganizationalEntity> recipients,
String bodyStr,
String fromStr,
String replyToStr)
Builds email notification based on given parameters that can be used as argument for notifyWhenNotStarted and notifyWhenNotCompleted methods
|
void |
cancelNotification(long taskId,
long notificationId)
Cancels given notification on a task
|
void |
cancelReassignment(long taskId,
long reassignmentId)
Cancels given reassignment on a task
|
Collection<TaskNotification> |
getTaskNotifications(long taskId,
boolean activeOnly)
Returns task notifications scheduled for given task
|
Collection<TaskReassignment> |
getTaskReassignments(long taskId,
boolean activeOnly)
Returns task reassignments scheduled for given task
|
protected Long |
notify(long taskId,
String timeExpression,
org.kie.internal.task.api.TaskDeadlinesService.DeadlineType type,
org.kie.internal.task.api.model.Notification notification) |
Long |
notifyWhenNotCompleted(long taskId,
String timeExpression,
org.kie.internal.task.api.model.Notification notification)
Sends notification (of notification type) to given recipients in case task was not completed
before time given as timeExpression elapses.
|
Long |
notifyWhenNotStarted(long taskId,
String timeExpression,
org.kie.internal.task.api.model.Notification notification)
Sends notification (of notification type) to given recipients in case task was not started
before time given as timeExpression elapses.
|
protected Long |
reassign(long taskId,
String timeExpression,
org.kie.internal.task.api.TaskDeadlinesService.DeadlineType type,
org.kie.api.task.model.OrganizationalEntity... orgEntities) |
Long |
reassignWhenNotCompleted(long taskId,
String timeExpression,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
Reassign automatically a task in case it was not completed before time given as timeExpression elapses.
|
Long |
reassignWhenNotStarted(long taskId,
String timeExpression,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
Reassign automatically a task in case it was not started before time given as timeExpression elapses.
|
void |
removeBusinessAdmins(long taskId,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
Remove existing business admin from given task.
|
void |
removeExcludedOwners(long taskId,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
Remove existing excluded owners from given task.
|
protected void |
removePeopleAssignment(long taskId,
int type,
org.kie.api.task.model.OrganizationalEntity... orgEntities) |
void |
removePotentialOwners(long taskId,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
Remove existing potential owners from given task.
|
void |
removeTaskInputs(long taskId,
String... name)
Removes one or more input variables from a task.
|
void |
removeTaskOutputs(long taskId,
String... name)
Removes one or more output variables from a task.
|
void |
setIdentityProvider(org.kie.internal.identity.IdentityProvider identityProvider) |
void |
setRuntimeDataService(RuntimeDataService runtimeDataService) |
void |
setUserTaskService(UserTaskService userTaskService) |
public static final int POT_OWNER
public static final int EXCL_OWNER
public static final int ADMIN
public void setUserTaskService(UserTaskService userTaskService)
public void setRuntimeDataService(RuntimeDataService runtimeDataService)
public void setIdentityProvider(org.kie.internal.identity.IdentityProvider identityProvider)
public void addPotentialOwners(long taskId,
boolean removeExisting,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
throws TaskNotFoundException
UserTaskAdminServiceaddPotentialOwners in interface UserTaskAdminServicetaskId - unique task idremoveExisting - specifies if existing potential owners should be removedorgEntities - one or more potential owner to be added to a taskTaskNotFoundException - thrown when there is no task with given idpublic void addExcludedOwners(long taskId,
boolean removeExisting,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
throws TaskNotFoundException
UserTaskAdminServiceaddExcludedOwners in interface UserTaskAdminServicetaskId - unique task idremoveExisting - specifies if existing excluded owners should be removedorgEntities - one or more excluded owner to be added to a taskTaskNotFoundException - thrown when there is no task with given idpublic void addBusinessAdmins(long taskId,
boolean removeExisting,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
throws TaskNotFoundException
UserTaskAdminServiceaddBusinessAdmins in interface UserTaskAdminServicetaskId - unique task idremoveExisting - specifies if existing business admins should be removedorgEntities - one or more business admin to be added to a taskTaskNotFoundException - thrown when there is no task with given idpublic void removePotentialOwners(long taskId,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
throws TaskNotFoundException
UserTaskAdminServiceremovePotentialOwners in interface UserTaskAdminServicetaskId - unique task idorgEntities - one or more potential owner to be removed from a taskTaskNotFoundException - thrown when there is no task with given idpublic void removeExcludedOwners(long taskId,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
throws TaskNotFoundException
UserTaskAdminServiceremoveExcludedOwners in interface UserTaskAdminServicetaskId - unique task idorgEntities - one or more excluded owner to be removed from a taskTaskNotFoundException - thrown when there is no task with given idpublic void removeBusinessAdmins(long taskId,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
throws TaskNotFoundException,
IllegalStateException
UserTaskAdminServiceremoveBusinessAdmins in interface UserTaskAdminServicetaskId - unique task idorgEntities - one or more business admin to be removed from a taskTaskNotFoundException - thrown when there is no task with given idIllegalStateException - in case there are no business admins left on a task - there must be at least one business adminpublic void addTaskInput(long taskId,
String name,
Object value)
throws TaskNotFoundException
UserTaskAdminServiceaddTaskInput in interface UserTaskAdminServicetaskId - unique task idname - name of the input variable to be addedvalue - value of the input variableTaskNotFoundException - thrown when there is no task with given idpublic void addTaskInputs(long taskId,
Map<String,Object> data)
throws TaskNotFoundException
UserTaskAdminServiceaddTaskInputs in interface UserTaskAdminServicetaskId - unique task iddata - map of key (name of the variable) and value (value of the variable)TaskNotFoundException - thrown when there is no task with given idpublic void removeTaskInputs(long taskId,
String... name)
throws TaskNotFoundException
UserTaskAdminServiceremoveTaskInputs in interface UserTaskAdminServicetaskId - unique task idname - name(s) of the input variables to be removedTaskNotFoundException - thrown when there is no task with given idpublic void removeTaskOutputs(long taskId,
String... name)
throws TaskNotFoundException
UserTaskAdminServiceremoveTaskOutputs in interface UserTaskAdminServicetaskId - unique task idname - name(s) of the output variables to be removedTaskNotFoundException - thrown when there is no task with given idpublic Long reassignWhenNotStarted(long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
UserTaskAdminServicereassignWhenNotStarted in interface UserTaskAdminServicetaskId - unique task idtimeExpression - time expression in duration format as 2s, 5h, 7dorgEntities - users/groups that will be reassigned to after conditions are metTaskNotFoundException - thrown when there is no task with given idpublic Long reassignWhenNotCompleted(long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
UserTaskAdminServicereassignWhenNotCompleted in interface UserTaskAdminServicetaskId - unique task idtimeExpression - time expression in duration format as 2s, 5h, 7dorgEntities - users/groups that will be reassigned to after conditions are metTaskNotFoundException - thrown when there is no task with given idpublic Long notifyWhenNotStarted(long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification) throws TaskNotFoundException
UserTaskAdminServicenotifyWhenNotStarted in interface UserTaskAdminServicetaskId - unique task idtimeExpression - time expression in duration format as 2s, 5h, 7dnotification - actual notification to be sentTaskNotFoundException - thrown when there is no task with given idpublic Long notifyWhenNotCompleted(long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification) throws TaskNotFoundException
UserTaskAdminServicenotifyWhenNotCompleted in interface UserTaskAdminServicetaskId - unique task idtimeExpression - time expression in duration format as 2s, 5h, 7dnotification - actual notification to be sentTaskNotFoundException - thrown when there is no task with given idpublic Collection<TaskReassignment> getTaskReassignments(long taskId, boolean activeOnly) throws TaskNotFoundException
UserTaskAdminServicegetTaskReassignments in interface UserTaskAdminServicetaskId - unique task idactiveOnly - determines if only active (not yet fired) should be returnedTaskNotFoundException - thrown when there is no task with given idpublic Collection<TaskNotification> getTaskNotifications(long taskId, boolean activeOnly) throws TaskNotFoundException
UserTaskAdminServicegetTaskNotifications in interface UserTaskAdminServicetaskId - unique task idactiveOnly - determines if only active (not yet fired) should be returnedTaskNotFoundException - thrown when there is no task with given idpublic void cancelNotification(long taskId,
long notificationId)
throws TaskNotFoundException
UserTaskAdminServicecancelNotification in interface UserTaskAdminServicetaskId - unique task idnotificationId - unique notification idTaskNotFoundException - thrown when there is no task with given idpublic void cancelReassignment(long taskId,
long reassignmentId)
throws TaskNotFoundException
UserTaskAdminServicecancelReassignment in interface UserTaskAdminServicetaskId - unique task idreassignmentId - unique reassignment idTaskNotFoundException - thrown when there is no task with given idpublic org.kie.internal.task.api.model.EmailNotification buildEmailNotification(String subjectStr, List<org.kie.api.task.model.OrganizationalEntity> recipients, String bodyStr, String fromStr, String replyToStr)
UserTaskAdminServicebuildEmailNotification in interface UserTaskAdminServicesubjectStr - email subjectrecipients - list of recipients to be included in the notification, must be at least onebodyStr - email body, can reference task variablesfromStr - user who sends the emailreplyToStr - optional reply to addressprotected void addPeopleAssignment(long taskId,
boolean removeExisting,
int type,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
throws TaskNotFoundException
TaskNotFoundExceptionprotected void removePeopleAssignment(long taskId,
int type,
org.kie.api.task.model.OrganizationalEntity... orgEntities)
throws TaskNotFoundException
TaskNotFoundExceptionprotected Long reassign(long taskId, String timeExpression, org.kie.internal.task.api.TaskDeadlinesService.DeadlineType type, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
TaskNotFoundExceptionprotected Long notify(long taskId, String timeExpression, org.kie.internal.task.api.TaskDeadlinesService.DeadlineType type, org.kie.internal.task.api.model.Notification notification) throws TaskNotFoundException
TaskNotFoundExceptionCopyright © 2001–2016 JBoss by Red Hat. All rights reserved.