Nuxeo Enterprise Platform 5.1

org.nuxeo.ecm.platform.forum.workflow.security.policy
Class PostModerationWorkflowSecurityPolicy

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

public class PostModerationWorkflowSecurityPolicy
extends AbstractWorkflowDocumentSecurityPolicy

Post moderation 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
PostModerationWorkflowSecurityPolicy()
           
 
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> getRules(String pid, Map<String,Serializable> infos)
          Computes rules based on default and participant list.
 boolean hasParticipantImmediateAction(String pid, Principal principal)
          Used by the dashboard actions bean to know if whether or not it should display the work item in its list for the current user.
 
Methods inherited from class org.nuxeo.ecm.platform.workflow.document.api.security.policy.AbstractWorkflowDocumentSecurityPolicy
getCreatorName, getCurrentReviewLevel, getDefaultRules, 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

PostModerationWorkflowSecurityPolicy

public PostModerationWorkflowSecurityPolicy()
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

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

hasParticipantImmediateAction

public boolean hasParticipantImmediateAction(String pid,
                                             Principal principal)
                                      throws WMWorkflowException
Used by the dashboard actions bean to know if whether or not it should display the work item in its list for the current user.

Parameters:
pid - the process id
principal - the principal
Returns:
true if direct action to perform, 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

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.