lumis.content.workflow
Class WorkflowStateConfig

Package class diagram package WorkflowStateConfig
java.lang.Object
  extended by lumis.content.workflow.WorkflowStateConfig

@StableMinor(version="6.2",
             sinceVersion="4.0")
public class WorkflowStateConfig
extends Object

Value class for content's workflow state information.

Since:
4.0.0

Field Summary
protected  Map<String,Collection<String>> permissionsScope
           
 
Constructor Summary
WorkflowStateConfig(Node stateElement)
          Constructs a WorkflowStateConfig, parsing its data from a state XML Element.
 
Method Summary
 String getColorLight()
          Returns the light color for displaying this state.
 String getColorStrong()
          Returns the strong color for displaying this state.
 String getDescription()
          Returns the description for this state.
 String getId()
          Returns the identifier for this state.
 String getImageLarge()
          Returns the href for the large image icon to be used for this state.
 String getImageSmall()
          Returns the href for the small image icon to be used for this state.
 String getName()
          Returns the name for this state.
protected  Collection<String> getPermissions(Enum<?> scope)
          Returns all permissions available for a given scope.
 Collection<String> getPermissions(StateScope stateScope)
          Returns all permissions available for a given scope.
 Collection<String> getPermissionsScopeAll()
          Deprecated. Since 6.0.2, replaced by getPermissions(StateScope).
 Collection<String> getPermissionsScopeAssignedTo()
          Deprecated. Since 6.0.2, replaced by getPermissions(StateScope).
protected  EnumSet<StateScope> getScopes()
          Returns the scopes for a permission object.
 WorkflowTransitionConfig getTransition(String transitionId)
          Returns the specified transition defined in this workflow state.
 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  Set<String> readPermissionsRoles(Node[] permissionNodes)
          Returns an unmodifiable permission roles set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

permissionsScope

protected Map<String,Collection<String>> permissionsScope
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

getTransitions

public List<WorkflowTransitionConfig> getTransitions()
Returns all transitions defined for this state.


getTransition

public WorkflowTransitionConfig getTransition(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 Collection<String> getPermissionsScopeAll()
Deprecated. Since 6.0.2, replaced by getPermissions(StateScope).

Returns all permissions available for 'all' scope.

Returns:
the permissions for the given scope.

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


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.