Package com.saperion.connector.wf
Class TaskUserSelection
- java.lang.Object
-
- com.saperion.connector.wf.TaskUserSelection
-
- All Implemented Interfaces:
java.io.Serializable
public class TaskUserSelection extends java.lang.Object implements java.io.Serializable
Holds the selectable users for a given task.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TaskUserSelection.SelectionType
An enumeration for the different types of user assignments to tasks.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TaskUserSelection
create(TaskUserSelection.SelectionType selectionType, boolean singleUserSelection)
Creates a TaskUserSelection that indicates the given selection type except for SelectionType.RESTRICTED_SELECTABLE in this case use create(Collection<UserNameIdPair>)static TaskUserSelection
create(java.util.Collection<UserNameIdPair> userRestriction, boolean singleUserSelection)
Creates a TaskUserSelection that indicates that the receiver of the task has to be selected from the given usersboolean
equals(java.lang.Object o)
static TaskUserSelection
fromNative(com.saperion.jna.applsrv.m2j.natives.DfNodeDescr node)
Creates a TaskUserSelection that matches the given instance of the native type DfNodeDescriptionstatic TaskUserSelection
fromNative(com.saperion.jna.applsrv.m2j.natives.NodeInfoRecord node)
Creates a TaskUserSelection that matches the given instance of the native type NodeInfoRecordTaskUserSelection.SelectionType
getSelectionType()
java.util.Collection<UserNameIdPair>
getUserRestriction()
int
hashCode()
boolean
isSingleUserSelection()
java.lang.String
toString()
-
-
-
Method Detail
-
getSelectionType
public TaskUserSelection.SelectionType getSelectionType()
- Returns:
- The type of user selection the given task is configured with
-
getUserRestriction
public java.util.Collection<UserNameIdPair> getUserRestriction()
- Returns:
- The collection of users that may be selected for this task if the users are selectable from a given list i.e. selectionType == SelectionType.RESTRICTED_SELECTABLE otherwise an UnsupportedOperationException is thrown.
- Throws:
java.lang.UnsupportedOperationException
- if selectionType != SelectionType.RESTRICTED_SELECTABLE
-
create
public static TaskUserSelection create(java.util.Collection<UserNameIdPair> userRestriction, boolean singleUserSelection)
Creates a TaskUserSelection that indicates that the receiver of the task has to be selected from the given users- Parameters:
userRestriction
- The users the selection is restricted tosingleUserSelection
-- Returns:
- a TaskUserSelection that indicates that the receiver of the task has to be selected from the given users
-
create
public static TaskUserSelection create(TaskUserSelection.SelectionType selectionType, boolean singleUserSelection)
Creates a TaskUserSelection that indicates the given selection type except for SelectionType.RESTRICTED_SELECTABLE in this case use create(Collection<UserNameIdPair>)- Parameters:
selectionType
- the given type of selectionsingleUserSelection
-- Returns:
- a TaskUserSelection that indicates the given selection type
- Throws:
java.lang.IllegalArgumentException
- if selectionType == SelectionType.RESTRICTED_SELECTABLE
-
fromNative
public static TaskUserSelection fromNative(com.saperion.jna.applsrv.m2j.natives.NodeInfoRecord node)
Creates a TaskUserSelection that matches the given instance of the native type NodeInfoRecord- Parameters:
node
- the native instance to map- Returns:
- a TaskUserSelection that matches the given instance of the native type NodeInfoRecord
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
fromNative
public static TaskUserSelection fromNative(com.saperion.jna.applsrv.m2j.natives.DfNodeDescr node)
Creates a TaskUserSelection that matches the given instance of the native type DfNodeDescription- Parameters:
node
- the native instance to map- Returns:
- a TaskUserSelection that matches the given instance of the native type DfNodeDescription
-
isSingleUserSelection
public boolean isSingleUserSelection()
-
-