Nuxeo Enterprise Platform 5.1

org.nuxeo.ecm.platform.publishing.workflow.security.policy
Class PublishingSecurityPolicy

java.lang.Object
  extended by org.nuxeo.ecm.platform.workflow.document.api.security.policy.AbstractWorkflowDocumentSecurityPolicy
      extended by org.nuxeo.ecm.platform.publishing.workflow.security.policy.PublishingSecurityPolicy
All Implemented Interfaces:
Serializable, WorkflowDocumentSecurityPolicy

public class PublishingSecurityPolicy
extends AbstractWorkflowDocumentSecurityPolicy

Publishing workflow security policy.

Author:
Julien Anguenot
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.nuxeo.ecm.platform.workflow.document.api.security.policy.AbstractWorkflowDocumentSecurityPolicy
name
 
Constructor Summary
PublishingSecurityPolicy()
           
 
Method Summary
 boolean canEndWorkItem(Principal participant, WMWorkItemInstance wi)
          Checks if a given participant can end a given work item.
 boolean canManageWorkflow(String pid, Principal principal)
          Can the user manage workflow ?
 boolean canMoveDown(Principal participant, WMWorkItemInstance wi)
          Checks if a given participant can move down a given work item.
 boolean canMoveUp(Principal participant, WMWorkItemInstance wi)
          Checks if a given participant can move up a given work item.
 boolean canRejectWorkItem(Principal participant, WMWorkItemInstance wi)
          Checks if a given participant can reject a given work item.
 boolean canRemoveWorkItem(Principal participant, WMWorkItemInstance wi)
          Checks if a given participant can remove a given work item.
 List<UserEntry> getDefaultRules(String pid, Map<String,Serializable> infos)
          Computes default rules
 List<UserEntry> getRules(String pid, Map<String,Serializable> infos)
          Computes rules based on default and participant list.
 boolean hasParticipantImmediateAction(String pid, Principal principal)
          Dashboard uses this to display the task.
 
Methods inherited from class org.nuxeo.ecm.platform.workflow.document.api.security.policy.AbstractWorkflowDocumentSecurityPolicy
getCreatorName, getCurrentReviewLevel, getFilteredTasksFor, getModificationPolicy, getName, getTasksFor, getWAPI, getWorkflowVariable, getWorkflowVariables, isCreator, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PublishingSecurityPolicy

public PublishingSecurityPolicy()
Method Detail

canEndWorkItem

public boolean canEndWorkItem(Principal participant,
                              WMWorkItemInstance wi)
                       throws WMWorkflowException
Description copied from interface: WorkflowDocumentSecurityPolicy
Checks if a given participant can end a given work item.

Parameters:
participant - the current workflow participant.
wi - the work item instance.
Returns:
true if granted / false if denied
Throws:
WMWorkflowException - TODO

canManageWorkflow

public boolean canManageWorkflow(String pid,
                                 Principal principal)
                          throws WMWorkflowException
Description copied from interface: WorkflowDocumentSecurityPolicy
Can the user manage workflow ?

Parameters:
pid - the process identifier
principal - the principal.
Returns:
true if granted, false if not.
Throws:
WMWorkflowException

canMoveDown

public boolean canMoveDown(Principal participant,
                           WMWorkItemInstance wi)
                    throws WMWorkflowException
Description copied from interface: WorkflowDocumentSecurityPolicy
Checks if a given participant can move down a given work item.

Here, it will change the order attribute of the work item if possible.

This is specific to ordered reviews.

wi - the work item instance.
Returns:
true if granted / false if denied
Throws:
WMWorkflowException - TODO

canMoveUp

public boolean canMoveUp(Principal participant,
                         WMWorkItemInstance wi)
                  throws WMWorkflowException
Description copied from interface: WorkflowDocumentSecurityPolicy
Checks if a given participant can move up a given work item.

Here, it will change the order attribute of the work item if possible.

This is specific to ordered reviews.

wi - the work item instance.
Returns:
true if granted / false if denied
Throws:
WMWorkflowException - TODO

canRejectWorkItem

public boolean canRejectWorkItem(Principal participant,
                                 WMWorkItemInstance wi)
                          throws WMWorkflowException
Description copied from interface: WorkflowDocumentSecurityPolicy
Checks if a given participant can reject a given work item.

wi - the work item instance.
Returns:
true if granted / false if denied
Throws:
WMWorkflowException - TODO

canRemoveWorkItem

public boolean canRemoveWorkItem(Principal participant,
                                 WMWorkItemInstance wi)
                          throws WMWorkflowException
Description copied from interface: WorkflowDocumentSecurityPolicy
Checks if a given participant can remove a given work item.

Parameters:
participant - the current workflow participant.
wi - the work item instance
Returns:
true if granted / false if denied
Throws:
WMWorkflowException - TODO

getRules

public List<UserEntry> getRules(String pid,
                                Map<String,Serializable> infos)
                         throws WMWorkflowException
Description copied from interface: WorkflowDocumentSecurityPolicy
Computes rules based on default and participant list.

Parameters:
pid - the process id.
infos - a process info map.
Returns:
a list of UserEntries.
Throws:
WMWorkflowException

getDefaultRules

public List<UserEntry> getDefaultRules(String pid,
                                       Map<String,Serializable> infos)
                                throws WMWorkflowException
Description copied from interface: WorkflowDocumentSecurityPolicy
Computes default rules

Aimed at being used when the process starts up.

Specified by:
getDefaultRules in interface WorkflowDocumentSecurityPolicy
Overrides:
getDefaultRules in class AbstractWorkflowDocumentSecurityPolicy
Parameters:
pid - the process id.
infos - a process info map.
Returns:
a list of user entries to use to build an ACL.
Throws:
WMWorkflowException

hasParticipantImmediateAction

public boolean hasParticipantImmediateAction(String pid,
                                             Principal principal)
                                      throws WMWorkflowException
Dashboard uses this to display the task.

Parameters:
pid - the process id
principal - the principal
Returns:
true if direct action to perform, false if not.
Throws:
WMWorkflowException

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.