Class StateImpl

    • Constructor Detail

      • StateImpl

        public StateImpl()
        Constructor
      • StateImpl

        public StateImpl​(String name)
        Constructor
        Parameters:
        name - state name
    • Method Detail

      • getLabels

        public ContextualDesignations getLabels()
        Description copied from interface: State
        Get all the labels
        Specified by:
        getLabels in interface State
        Returns:
        an object containing the collection of the labels
      • getLabel

        public String getLabel​(String role,
                               String language)
        Description copied from interface: State
        Get label in specific language for the given role
        Specified by:
        getLabel in interface State
        Parameters:
        role - role for which the label is
        language - label's language
        Returns:
        wanted label as a String object. If label is not found, search label with given role and default language, if not found again, return the default label in given language, if not found again, return the default label in default language, if not found again, return empty string.
      • getActivities

        public ContextualDesignations getActivities()
        Description copied from interface: State
        Get all the activities
        Specified by:
        getActivities in interface State
        Returns:
        an object containing the collection of the activities
      • getDescriptions

        public ContextualDesignations getDescriptions()
        Description copied from interface: State
        Get all the descriptions
        Specified by:
        getDescriptions in interface State
        Returns:
        an object containing the collection of the descriptions
      • getDescription

        public String getDescription​(String role,
                                     String language)
        Description copied from interface: State
        Get description in specific language for the given role
        Specified by:
        getDescription in interface State
        Parameters:
        role - role for which the description is
        language - description's language
        Returns:
        wanted description as a String object. If description is not found, search description with given role and default language, if not found again, return the default description in given language, if not found again, return the default description in default language, if not found again, return empty string.
      • getAllowedActions

        public Action[] getAllowedActions()
        Get actions available in this state
        Specified by:
        getAllowedActions in interface State
        Returns:
        allowedActions allowed actions
      • getTimeOutActions

        public TimeOutAction[] getTimeOutActions()
        Get timeout actions for this state
        Specified by:
        getTimeOutActions in interface State
        Returns:
        timeout actions
      • getAllowedActionsEx

        public AllowedActions getAllowedActionsEx()
        Description copied from interface: State
        Get all the allowed actions
        Specified by:
        getAllowedActionsEx in interface State
        Returns:
        an object containing the collection of the allowed actions
      • createAllowedActions

        public AllowedActions createAllowedActions()
        Description copied from interface: State
        Create and return an object implementing AllowedActions
        Specified by:
        createAllowedActions in interface State
      • getInterestedUsers

        public QualifiedUsers getInterestedUsers()
        Description copied from interface: State
        Get all the users interested by this state
        Specified by:
        getInterestedUsers in interface State
        Returns:
        QualifiedUsers object containing interested users, or an empty QualifiedUsers object but never null
      • getInterestedUsersEx

        public QualifiedUsers getInterestedUsersEx()
        Description copied from interface: State
        Get all the users interested by this state
        Specified by:
        getInterestedUsersEx in interface State
        Returns:
        QualifiedUsers object containing interested users, or null if none are defined
      • getName

        public String getName()
        Get the name of this state
        Specified by:
        getName in interface State
        Returns:
        state's name
      • getWorkingUsers

        public QualifiedUsers getWorkingUsers()
        Description copied from interface: State
        Get all the users who can act in this state
        Specified by:
        getWorkingUsers in interface State
        Returns:
        QualifiedUsers object containing theses users, or an empty QualifiedUsers object but never null
      • getWorkingUsersEx

        public QualifiedUsers getWorkingUsersEx()
        Description copied from interface: State
        Get all the users who can act in this state
        Specified by:
        getWorkingUsersEx in interface State
        Returns:
        QualifiedUsers object containing theses users, or null if none are defined
      • setAllowedActions

        public void setAllowedActions​(AllowedActions allowedActions)
        Description copied from interface: State
        Set the allowed actions
        Specified by:
        setAllowedActions in interface State
      • setInterestedUsers

        public void setInterestedUsers​(QualifiedUsers interestedUsers)
        Set all the users interested by this state
        Specified by:
        setInterestedUsers in interface State
        Parameters:
        interestedUsers - object containing interested users
      • setName

        public void setName​(String name)
        Description copied from interface: State
        Set the name of this state
        Specified by:
        setName in interface State
        Parameters:
        name - state's name
      • setWorkingUsers

        public void setWorkingUsers​(QualifiedUsers workingUsers)
        Set all the users who can act in this state
        Specified by:
        setWorkingUsers in interface State
        Parameters:
        workingUsers - object containing these users
      • getTimeoutInterval

        public int getTimeoutInterval()
        Description copied from interface: State
        Get the timeout interval of this state
        Specified by:
        getTimeoutInterval in interface State
        Returns:
        timeoutInterval interval in hours (as a int)
      • setTimeoutInterval

        public void setTimeoutInterval​(int hours)
        Description copied from interface: State
        Set the timeout interval of this state
        Specified by:
        setTimeoutInterval in interface State
        Parameters:
        hours - interval in hours (as a int)
      • getTimeoutAction

        public Action getTimeoutAction()
        Get the timeout action of this state Action that will played if timeout is triggered
        Specified by:
        getTimeoutAction in interface State
        Returns:
        timeout action
      • setTimeoutAction

        public void setTimeoutAction​(Action timeoutAction)
        Description copied from interface: State
        Set the timeout action of this state Action that will played if timeout is trigerred
        Specified by:
        setTimeoutAction in interface State
        Parameters:
        timeoutAction - timeout action
      • getTimeoutNotifyAdmin

        public boolean getTimeoutNotifyAdmin()
        Get flag for admin notification if true, the timeout manager will send a notification to all supervisors
        Specified by:
        getTimeoutNotifyAdmin in interface State
        Returns:
        admin notification flag
      • setTimeoutNotifyAdmin

        public void setTimeoutNotifyAdmin​(boolean timeoutAction)
        Description copied from interface: State
        Set flag for admin notification if true, the timeout manager will send a notification to all supervisors
        Specified by:
        setTimeoutNotifyAdmin in interface State
        Parameters:
        timeoutAction - notification flag
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object