Package ch.ivyteam.ivy.workflow.task
Interface IActivator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
available()
Whether the activator is set and in case of a user is enabled.String
displayName()
Get the display name of the task activator.ISecurityMember
get()
boolean
isMember(IUserToken userToken)
Whether the activator is set and the given user token is a member of the activator.boolean
isRole()
Whether the activator is set and is a role.boolean
isRole(IRole role)
Whether the activator is set and is the given role.boolean
isSystemUser()
Whether the activator is set and is the System user.boolean
isUser()
Whether the activator is set and is a userboolean
isUser(IUser user)
Whether the activator is set and is the given user.String
name()
Get the name of the task activator.void
set(ISecurityMember activator)
Sets the task activatorIPagedIterable<IUser>
userCandidatesPaged()
Evaluates allusers
who can resume this task.IPagedIterable<IUser>
userCandidatesPaged(int pageSize)
Evaluates allusers
who can resume this task.
-
-
-
Method Detail
-
get
ISecurityMember get()
Gets the task activator's
user
or arole
.May return null if the activator was deleted since the creation of the task or was not defined at all (e.g.
expiry task activator
is optional)Note, that the method
name()
may return a valid name even if the task activator was deleted.- Returns:
- user or role or null if activator was not defined or was deleted
- See Also:
name()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
set
void set(ISecurityMember activator)
Sets the task activator
-
name
String name()
Get the name of the task activator. Maybe null if the task activator was not defined (e.g.expiry task activator
). Returns a valid name even if the task activator was defined but was deleted in the meantime.- Returns:
- task activator name or null.
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
displayName
String displayName()
Get the display name of the task activator. Maybe null if the task activator was not defined (e.g.expiry task activator
). Returns a valid name even if the task activator was defined but was deleted in the meantime.- Returns:
- task activator name or null.
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
userCandidatesPaged
IPagedIterable<IUser> userCandidatesPaged()
Evaluates all
users
who can resume this task. If the activator is arole
, then allusers
that own thisrole
will be included in the list. In case someusers
are absent, their substitutes will be included as well. However substitutes of substitutes are not included.This method uses a default, system defined page size (1000) which does not harm memory and provides still good performance.
- Returns:
- user candidates
- See Also:
userCandidatesPaged(int)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
userCandidatesPaged
IPagedIterable<IUser> userCandidatesPaged(int pageSize)
Evaluates allusers
who can resume this task. If the activator is arole
, then allusers
that own thisrole
will be included in the list. In case someusers
are absent, their substitutes will be included as well. However substitutes of substitutes are not included.- Parameters:
pageSize
- the maximum number of users loaded at once into memory On paged UI tables the number of objects you display on a single page.- Returns:
- user candidates
- See Also:
userCandidatesPaged()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
available
boolean available()
Whether the activator is set and in case of a user is enabled.- Returns:
- true if its available otherwise false.
- Since:
- 9.1
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
isUser
boolean isUser(IUser user)
Whether the activator is set and is the given user.- Parameters:
user
- the user to test- Returns:
- true if activator is the given user.
- Since:
- 9.1
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
isUser
boolean isUser()
Whether the activator is set and is a user- Returns:
- true if activator is a user
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
isSystemUser
boolean isSystemUser()
Whether the activator is set and is the System user.- Returns:
- true if activator is the system user.
- Since:
- 9.1
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
isRole
boolean isRole(IRole role)
Whether the activator is set and is the given role.- Parameters:
role
- the role to test- Returns:
- true if activator is the system user.
- Since:
- 9.1
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
isRole
boolean isRole()
Whether the activator is set and is a role.- Returns:
- true if activator is a role.
- Since:
- 9.1
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
isMember
boolean isMember(IUserToken userToken)
Whether the activator is set and the given user token is a member of the activator.- Parameters:
userToken
- the user token to test- Returns:
- true if the given user token is a member of the activator.
- Since:
- 9.1
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
-