Nuxeo Enterprise Platform 5.1

org.nuxeo.ecm.platform.workflow.document.api.security.policy
Class AbstractWorkflowDocumentSecurityPolicy

java.lang.Object
  extended by org.nuxeo.ecm.platform.workflow.document.api.security.policy.AbstractWorkflowDocumentSecurityPolicy
All Implemented Interfaces:
Serializable, WorkflowDocumentSecurityPolicy
Direct Known Subclasses:
OrderedReviewWorkflowDocumentSecurityPolicy, ParallelReviewWorkflowDocumentSecurityPolicy, PostModerationWorkflowSecurityPolicy, PublishingSecurityPolicy

public abstract class AbstractWorkflowDocumentSecurityPolicy
extends Object
implements WorkflowDocumentSecurityPolicy

Abstract workflow document rights policy.

Author:
Julien Anguenot
See Also:
Serialized Form

Field Summary
protected  String name
           
 
Constructor Summary
protected AbstractWorkflowDocumentSecurityPolicy()
           
 
Method Summary
protected  String getCreatorName(String pid)
           
protected  int getCurrentReviewLevel(String pid)
           
 List<UserEntry> getDefaultRules(String pid, Map<String,Serializable> infos)
          Computes default rules
protected  Collection<WMWorkItemInstance> getFilteredTasksFor(String pid, Principal principal)
           
protected  String getModificationPolicy(String pid)
           
 String getName()
          Returns the policy name.
protected  Collection<WMWorkItemInstance> getTasksFor(String pid, Principal principal)
           
protected  WAPI getWAPI()
           
protected  Serializable getWorkflowVariable(String pid, String name)
           
protected  Map<String,Serializable> getWorkflowVariables(String pid)
           
protected  boolean isCreator(String pid, Principal principal)
           
 void setName(String name)
          Sets the policy name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.platform.workflow.document.api.security.policy.WorkflowDocumentSecurityPolicy
canEndWorkItem, canManageWorkflow, canMoveDown, canMoveUp, canRejectWorkItem, canRemoveWorkItem, getRules, hasParticipantImmediateAction
 

Field Detail

name

protected String name
Constructor Detail

AbstractWorkflowDocumentSecurityPolicy

protected AbstractWorkflowDocumentSecurityPolicy()
Method Detail

getName

public String getName()
Description copied from interface: WorkflowDocumentSecurityPolicy
Returns the policy name.

Specified by:
getName in interface WorkflowDocumentSecurityPolicy
Returns:
the policy name

setName

public void setName(String name)
Description copied from interface: WorkflowDocumentSecurityPolicy
Sets the policy name.

Specified by:
setName in interface WorkflowDocumentSecurityPolicy
Parameters:
name - the policy name

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
Parameters:
pid - the process id.
infos - a process info map.
Returns:
a list of user entries to use to build an ACL.
Throws:
WMWorkflowException

getTasksFor

protected Collection<WMWorkItemInstance> getTasksFor(String pid,
                                                     Principal principal)
                                              throws WMWorkflowException
Throws:
WMWorkflowException

getFilteredTasksFor

protected Collection<WMWorkItemInstance> getFilteredTasksFor(String pid,
                                                             Principal principal)
                                                      throws WMWorkflowException
Throws:
WMWorkflowException

getWAPI

protected WAPI getWAPI()
                throws WMWorkflowException
Throws:
WMWorkflowException

getModificationPolicy

protected String getModificationPolicy(String pid)
                                throws WMWorkflowException
Throws:
WMWorkflowException

getCurrentReviewLevel

protected int getCurrentReviewLevel(String pid)
                             throws WMWorkflowException
Throws:
WMWorkflowException

getWorkflowVariables

protected Map<String,Serializable> getWorkflowVariables(String pid)
                                                 throws WMWorkflowException
Throws:
WMWorkflowException

getWorkflowVariable

protected Serializable getWorkflowVariable(String pid,
                                           String name)
                                    throws WMWorkflowException
Throws:
WMWorkflowException

getCreatorName

protected String getCreatorName(String pid)
                         throws WMWorkflowException
Throws:
WMWorkflowException

isCreator

protected boolean isCreator(String pid,
                            Principal principal)
                     throws WMWorkflowException
Throws:
WMWorkflowException

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.