State - A Java enumeration.public class RoleTransitionCondition<State extends java.lang.Enum<State>> extends AbstractTransitionCondition<State>
Defines a condition by which a transition between states is allowed if the current user is in a given role.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
role
The role to check.
|
protected IlrSession |
session
The session used to check the role membership.
|
| Constructor and Description |
|---|
RoleTransitionCondition(IlrSession session,
java.lang.String role)
Constructs a transition condition by which transitions are allowed if the current user is in the role provided.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
check(State s1,
State s2)
Indicates whether the condition for the provided transition is satisfied.
|
java.lang.String |
toString() |
and, impossibleTransitionCause, not, ortoStringNeedsParenthesesprotected IlrSession session
protected java.lang.String role
public RoleTransitionCondition(IlrSession session, java.lang.String role)
Constructs a transition condition by which transitions are allowed if the current user is in the role provided.
session - The session used to check the role membership.role - The name of a role.public boolean check(State s1, State s2)
TransitionConditionIndicates whether the condition for the provided transition is satisfied.
check in class TransitionCondition<State extends java.lang.Enum<State>>s1 - The start state of the transition, or null for transitions to s2 as an initial state.s2 - Then end state of the transition. Cannot be null.true if this condition allows a transition from s1 to s2.public java.lang.String toString()
toString in class java.lang.Object© Copyright IBM Corp. 1987, 2017