Package lumis.content.workflow
Class WorkflowStateConfig
- java.lang.Object
-
- lumis.content.workflow.WorkflowStateConfig
-
@StableMinor(version="16.1", sinceVersion="4.0") public class WorkflowStateConfig extends java.lang.Object
Value class for content's workflow state information.- Since:
- 4.0.0
- Version:
- $Revision: 26157 $ $Date: 2024-01-13 11:35:03 -0300 (Sat, 13 Jan 2024) $
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.util.Collection<java.lang.String>>
permissionsScope
-
Constructor Summary
Constructors Constructor Description WorkflowStateConfig(org.w3c.dom.Node stateElement)
Constructs a WorkflowStateConfig, parsing its data from a state XML Element.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getColorLight()
Returns the light color for displaying this state.java.lang.String
getColorStrong()
Returns the strong color for displaying this state.java.lang.String
getDescription()
Returns the description for this state.java.lang.String
getId()
Returns the identifier for this state.java.lang.String
getImageLarge()
Returns the href for the large image icon to be used for this state.java.lang.String
getImageSmall()
Returns the href for the small image icon to be used for this state.java.lang.String
getName()
Returns the name for this state.protected java.util.Collection<java.lang.String>
getPermissions(java.lang.Enum<?> scope)
Returns all permissions available for a given scope.java.util.Collection<java.lang.String>
getPermissions(StateScope stateScope)
Returns all permissions available for a given scope.java.util.Collection<java.lang.String>
getPermissionsScopeAll()
Deprecated.Since 6.0.2, replaced bygetPermissions(StateScope)
.java.util.Collection<java.lang.String>
getPermissionsScopeAssignedTo()
Deprecated.Since 6.0.2, replaced bygetPermissions(StateScope)
.protected java.util.EnumSet<StateScope>
getScopes()
Returns the scopes for a permission object.WorkflowTransitionConfig
getTransition(java.lang.String transitionId)
Returns the specified transition defined in this workflow state.java.util.List<WorkflowTransitionConfig>
getTransitions()
Returns all transitions defined for this state.boolean
isArchived()
Indicates if this state is an archival state.boolean
isPublished()
Indicates if this state is a published state.boolean
isStart()
Indicates if this state was defined as the workflow's start state.protected java.util.Set<java.lang.String>
readPermissionsRoles(org.w3c.dom.Node[] permissionNodes)
Returns an unmodifiable permission roles set.
-
-
-
Constructor Detail
-
WorkflowStateConfig
public WorkflowStateConfig(org.w3c.dom.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String getId()
Returns the identifier for this state.- Returns:
- the identifier for this state.
-
getImageLarge
public java.lang.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 java.lang.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 java.lang.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
-
getTransitions
public java.util.List<WorkflowTransitionConfig> getTransitions()
Returns all transitions defined for this state.
-
getTransition
public WorkflowTransitionConfig getTransition(java.lang.String transitionId) throws WorkflowException
Returns the specified transition defined in this workflow state.- Parameters:
transitionId
- the transition's id.- Returns:
- the transition.
- Throws:
WorkflowException
- if the transition was not found.
-
getPermissionsScopeAll
@Deprecated public java.util.Collection<java.lang.String> getPermissionsScopeAll()
Deprecated.Since 6.0.2, replaced bygetPermissions(StateScope)
.Returns all permissions available for 'all' scope.- Returns:
- the permissions for the given scope.
-
getPermissionsScopeAssignedTo
@Deprecated public java.util.Collection<java.lang.String> getPermissionsScopeAssignedTo()
Deprecated.Since 6.0.2, replaced bygetPermissions(StateScope)
.Returns all permissions available for 'assignedTo' scope.- Returns:
- the permissions for the given scope.
-
getScopes
protected java.util.EnumSet<StateScope> getScopes()
Returns the scopes for a permission object.- Returns:
- the scopes.
- Since:
- 6.0.2
-
getPermissions
public java.util.Collection<java.lang.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 java.util.Set<java.lang.String> readPermissionsRoles(org.w3c.dom.Node[] permissionNodes) throws PortalException
Returns an unmodifiable permission roles set.- Parameters:
permissionNodes
- the nodes containing the permissions definition.- Throws:
PortalException
-
getPermissions
protected java.util.Collection<java.lang.String> getPermissions(java.lang.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
-
-