Package org.ametys.plugins.bpm.jcr
Class JCRWorkflow
- java.lang.Object
-
- org.ametys.plugins.repository.AbstractAmetysObject
-
- org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
-
- org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject<JCRWorkflowFactory>
-
- org.ametys.plugins.bpm.jcr.JCRWorkflow
-
- All Implemented Interfaces:
Workflow,ACLAmetysObject,AmetysObject,JCRAmetysObject,JCRTraversableAmetysObject,MetadataAwareAmetysObject,ModifiableMetadataAwareAmetysObject,ModifiableACLAmetysObject,ModifiableAmetysObject,ModifiableTraversableAmetysObject,RemovableAmetysObject,TraversableAmetysObject
public class JCRWorkflow extends DefaultTraversableAmetysObject<JCRWorkflowFactory> implements Workflow
Class representing of workflow, backed by a JCR node.
-
-
Constructor Summary
Constructors Constructor Description JCRWorkflow(Node node, String parentPath, JCRWorkflowFactory factory)Creates anJCRWorkflow.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupIdentity[]getAllowedGroups()Get the list of groups allowed to create a process from this workflowUserIdentity[]getAllowedUsers()Get the list of users allowed to create a process from this workflowStringgetDescription()Get the workflow descriptionUserIdentitygetOwner()Get the owner of the workflowResourceCollectiongetRootAttachments()Retrieves the attachments root nodeStringgetTitle()Get the workflow titleObjectgetVariable(String variableName)Get the value of a variable of the workflowStringgetWorkflowDefinition()Get the workflow definition linked to this workflowvoidsetAllowedGroups(GroupIdentity[] allowedGroups)Set the list of groups allowed to create a process from this workflowvoidsetAllowedUsers(UserIdentity[] allowedUsers)Set the list of users allowed to create a process from this workflowvoidsetDescription(String description)Set the workflow descriptionvoidsetOwner(UserIdentity owner)Set the owner of the workflowvoidsetTitle(String title)Set the workflow titlevoidsetVariable(String variableName, Object value)Set the value of a variable of the workflowvoidsetWorkflowDefinition(String workflowDefId)Set the workflow definition linked to this workflow-
Methods inherited from class org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, createChild, disallowInheritance, getChild, getChildren, getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, hasChild, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers
-
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
-
Methods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
-
Methods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNode
-
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
-
Methods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolder
-
Methods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
-
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChildAt, getChildPosition
-
-
-
-
Constructor Detail
-
JCRWorkflow
public JCRWorkflow(Node node, String parentPath, JCRWorkflowFactory factory)
Creates anJCRWorkflow.- Parameters:
node- the node backing thisAmetysObjectparentPath- the parentPath in the Ametys hierarchyfactory- the JCRWorkflowFactory which created the AmetysObject
-
-
Method Detail
-
getTitle
public String getTitle() throws AmetysRepositoryException
Description copied from interface:WorkflowGet the workflow title- Specified by:
getTitlein interfaceWorkflow- Returns:
- The workflow title
- Throws:
AmetysRepositoryException- If a repository error occurred
-
setTitle
public void setTitle(String title)
Description copied from interface:WorkflowSet the workflow title
-
getWorkflowDefinition
public String getWorkflowDefinition() throws AmetysRepositoryException
Description copied from interface:WorkflowGet the workflow definition linked to this workflow- Specified by:
getWorkflowDefinitionin interfaceWorkflow- Returns:
- The workflow definition id
- Throws:
AmetysRepositoryException- If a repository error occurred
-
setWorkflowDefinition
public void setWorkflowDefinition(String workflowDefId)
Description copied from interface:WorkflowSet the workflow definition linked to this workflow- Specified by:
setWorkflowDefinitionin interfaceWorkflow- Parameters:
workflowDefId- The workflow definition id
-
getDescription
public String getDescription() throws AmetysRepositoryException
Description copied from interface:WorkflowGet the workflow description- Specified by:
getDescriptionin interfaceWorkflow- Returns:
- The description
- Throws:
AmetysRepositoryException- If a repository error occurred
-
setDescription
public void setDescription(String description)
Description copied from interface:WorkflowSet the workflow description- Specified by:
setDescriptionin interfaceWorkflow- Parameters:
description- The description
-
getVariable
public Object getVariable(String variableName) throws AmetysRepositoryException
Description copied from interface:WorkflowGet the value of a variable of the workflow- Specified by:
getVariablein interfaceWorkflow- Parameters:
variableName- The name of the variable to retrieve- Returns:
- The value of the variable
- Throws:
AmetysRepositoryException- If a repository error occurred
-
setVariable
public void setVariable(String variableName, Object value)
Description copied from interface:WorkflowSet the value of a variable of the workflow- Specified by:
setVariablein interfaceWorkflow- Parameters:
variableName- The name of the variable to setvalue- The value to set
-
getOwner
public UserIdentity getOwner() throws AmetysRepositoryException
Description copied from interface:WorkflowGet the owner of the workflow- Specified by:
getOwnerin interfaceWorkflow- Returns:
- The owner
- Throws:
AmetysRepositoryException- If a repository error occurred
-
setOwner
public void setOwner(UserIdentity owner)
Description copied from interface:WorkflowSet the owner of the workflow
-
getAllowedUsers
public UserIdentity[] getAllowedUsers() throws AmetysRepositoryException
Description copied from interface:WorkflowGet the list of users allowed to create a process from this workflow- Specified by:
getAllowedUsersin interfaceWorkflow- Returns:
- The list of allowed users
- Throws:
AmetysRepositoryException- If a repository error occurred
-
setAllowedUsers
public void setAllowedUsers(UserIdentity[] allowedUsers)
Description copied from interface:WorkflowSet the list of users allowed to create a process from this workflow- Specified by:
setAllowedUsersin interfaceWorkflow- Parameters:
allowedUsers- The list of allowed users
-
getAllowedGroups
public GroupIdentity[] getAllowedGroups() throws AmetysRepositoryException
Description copied from interface:WorkflowGet the list of groups allowed to create a process from this workflow- Specified by:
getAllowedGroupsin interfaceWorkflow- Returns:
- The list of allowed groups
- Throws:
AmetysRepositoryException- If a repository error occurred
-
setAllowedGroups
public void setAllowedGroups(GroupIdentity[] allowedGroups)
Description copied from interface:WorkflowSet the list of groups allowed to create a process from this workflow- Specified by:
setAllowedGroupsin interfaceWorkflow- Parameters:
allowedGroups- The list of allowed groups
-
getRootAttachments
public ResourceCollection getRootAttachments() throws AmetysRepositoryException
Description copied from interface:WorkflowRetrieves the attachments root node- Specified by:
getRootAttachmentsin interfaceWorkflow- Returns:
- The the attachments root node
- Throws:
AmetysRepositoryException- if an error occurs.
-
-