Class WorkflowStateConfig


  • @StableMinor(version="14.1",
                 sinceVersion="4.0")
    public class WorkflowStateConfig
    extends Object
    Value class for content's workflow state information.
    Since:
    4.0.0
    Version:
    $Revision: 24684 $ $Date: 2021-08-23 18:58:35 -0300 (Mon, 23 Aug 2021) $
    • Constructor Detail

      • WorkflowStateConfig

        public WorkflowStateConfig​(Node stateElement)
                            throws PortalException
        Constructs a WorkflowStateConfig, parsing its data from a state XML Element.
        Parameters:
        stateElement - the state XML element that contains the state's data.
        Throws:
        PortalException
    • Method Detail

      • getColorLight

        public String getColorLight()
        Returns the light color for displaying this state.
        Returns:
        a HTML valid color string, or null if this state has no light color defined.
      • getColorStrong

        public String getColorStrong()
        Returns the strong color for displaying this state.
        Returns:
        a HTML valid color string, or null if this state has no strong color defined.
      • getDescription

        public String getDescription()
        Returns the description for this state.
        Returns:
        this state's description, localizable using its workflow's string resource, or null if not defined.
        See Also:
        WorkflowConfig.getResource()
      • getId

        public String getId()
        Returns the identifier for this state.
        Returns:
        the identifier for this state.
      • getImageLarge

        public String getImageLarge()
        Returns the href for the large image icon to be used for this state.
        Returns:
        the href for the large image icon to be used for this state, or null if not defined.
      • getImageSmall

        public String getImageSmall()
        Returns the href for the small image icon to be used for this state.
        Returns:
        the href for the small image icon to be used for this state, or null if not defined.
      • getName

        public String getName()
        Returns the name for this state.
        Returns:
        this state's name, localizable using its workflow's string resource.
        See Also:
        WorkflowConfig.getResource()
      • isPublished

        public boolean isPublished()
        Indicates if this state is a published state.
        Returns:
        true if this state is a published state, false otherwise.
        See Also:
        lumis.content.workflow
      • isArchived

        public boolean isArchived()
        Indicates if this state is an archival state.
        Returns:
        true if this state is an archival state, false otherwise.
        Since:
        4.0.11
        See Also:
        lumis.content.workflow
      • isStart

        public boolean isStart()
        Indicates if this state was defined as the workflow's start state.
        Returns:
        true if this state was defined as the workflow's start state, false otherwise.
        See Also:
        lumis.content.workflow
      • getPermissionsScopeAssignedTo

        @Deprecated
        public Collection<String> getPermissionsScopeAssignedTo()
        Deprecated.
        Since 6.0.2, replaced by getPermissions(StateScope).
        Returns all permissions available for 'assignedTo' scope.
        Returns:
        the permissions for the given scope.
      • getScopes

        protected EnumSet<StateScope> getScopes()
        Returns the scopes for a permission object.
        Returns:
        the scopes.
        Since:
        6.0.2
      • getPermissions

        public Collection<String> getPermissions​(StateScope stateScope)
        Returns all permissions available for a given scope.
        Parameters:
        stateScope - the scope to have the permissions returned
        Returns:
        the permissions
        Since:
        6.0.2
      • readPermissionsRoles

        protected Set<String> readPermissionsRoles​(Node[] permissionNodes)
                                            throws PortalException
        Returns an unmodifiable permission roles set.
        Parameters:
        permissionNodes - the nodes containing the permissions definition.
        Throws:
        PortalException
      • getPermissions

        protected Collection<String> getPermissions​(Enum<?> scope)
        Returns all permissions available for a given scope.
        Parameters:
        scope - the scope to have the permissions returned
        Returns:
        the permissions
        Since:
        6.0.2