ilog.rules.teamserver.model.states

Class RoleTransitionCondition<State extends java.lang.Enum<State>>

  • Type Parameters:
    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.

    • Field Summary

      Fields 
      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 Summary

      Constructors 
      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.
    • Field Detail

      • session

        protected IlrSession session
        The session used to check the role membership.
      • role

        protected java.lang.String role
        The role to check.
    • Constructor Detail

      • RoleTransitionCondition

        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.

        Parameters:
        session - The session used to check the role membership.
        role - The name of a role.
    • Method Detail

      • check

        public boolean check(State s1,
                    State s2)
        Description copied from class: TransitionCondition

        Indicates whether the condition for the provided transition is satisfied.

        Specified by:
        check in class TransitionCondition<State extends java.lang.Enum<State>>
        Parameters:
        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.
        Returns:
        true if this condition allows a transition from s1 to s2.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

© Copyright IBM Corp. 1987, 2017