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
ConstructorDescriptionJCRWorkflow
(javax.jcr.Node node, String parentPath, JCRWorkflowFactory factory) Creates anJCRWorkflow
. -
Method Summary
Modifier and TypeMethodDescriptionGet the list of groups allowed to create a process from this workflowGet the list of users allowed to create a process from this workflowGet the workflow descriptiongetOwner()
Get the owner of the workflowRetrieves the attachments root nodegetTitle()
Get the workflow titlegetVariable
(String variableName) Get the value of a variable of the workflowGet the workflow definition linked to this workflowvoid
setAllowedGroups
(GroupIdentity[] allowedGroups) Set the list of groups allowed to create a process from this workflowvoid
setAllowedUsers
(UserIdentity[] allowedUsers) Set the list of users allowed to create a process from this workflowvoid
setDescription
(String description) Set the workflow descriptionvoid
setOwner
(UserIdentity owner) Set the owner of the workflowvoid
Set the workflow titlevoid
setVariable
(String variableName, Object value) Set the value of a variable of the workflowvoid
setWorkflowDefinition
(String workflowDefId) Set the workflow definition linked to this workflowMethods 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 Details
-
JCRWorkflow
Creates anJCRWorkflow
.- Parameters:
node
- the node backing thisAmetysObject
parentPath
- the parentPath in the Ametys hierarchyfactory
- the JCRWorkflowFactory which created the AmetysObject
-
-
Method Details
-
getTitle
Description copied from interface:Workflow
Get the workflow title- Specified by:
getTitle
in interfaceWorkflow
- Returns:
- The workflow title
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setTitle
Description copied from interface:Workflow
Set the workflow title -
getWorkflowDefinition
Description copied from interface:Workflow
Get the workflow definition linked to this workflow- Specified by:
getWorkflowDefinition
in interfaceWorkflow
- Returns:
- The workflow definition id
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setWorkflowDefinition
Description copied from interface:Workflow
Set the workflow definition linked to this workflow- Specified by:
setWorkflowDefinition
in interfaceWorkflow
- Parameters:
workflowDefId
- The workflow definition id
-
getDescription
Description copied from interface:Workflow
Get the workflow description- Specified by:
getDescription
in interfaceWorkflow
- Returns:
- The description
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setDescription
Description copied from interface:Workflow
Set the workflow description- Specified by:
setDescription
in interfaceWorkflow
- Parameters:
description
- The description
-
getVariable
Description copied from interface:Workflow
Get the value of a variable of the workflow- Specified by:
getVariable
in interfaceWorkflow
- Parameters:
variableName
- The name of the variable to retrieve- Returns:
- The value of the variable
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setVariable
Description copied from interface:Workflow
Set the value of a variable of the workflow- Specified by:
setVariable
in interfaceWorkflow
- Parameters:
variableName
- The name of the variable to setvalue
- The value to set
-
getOwner
Description copied from interface:Workflow
Get the owner of the workflow- Specified by:
getOwner
in interfaceWorkflow
- Returns:
- The owner
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setOwner
Description copied from interface:Workflow
Set the owner of the workflow -
getAllowedUsers
Description copied from interface:Workflow
Get the list of users allowed to create a process from this workflow- Specified by:
getAllowedUsers
in interfaceWorkflow
- Returns:
- The list of allowed users
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setAllowedUsers
Description copied from interface:Workflow
Set the list of users allowed to create a process from this workflow- Specified by:
setAllowedUsers
in interfaceWorkflow
- Parameters:
allowedUsers
- The list of allowed users
-
getAllowedGroups
Description copied from interface:Workflow
Get the list of groups allowed to create a process from this workflow- Specified by:
getAllowedGroups
in interfaceWorkflow
- Returns:
- The list of allowed groups
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setAllowedGroups
Description copied from interface:Workflow
Set the list of groups allowed to create a process from this workflow- Specified by:
setAllowedGroups
in interfaceWorkflow
- Parameters:
allowedGroups
- The list of allowed groups
-
getRootAttachments
Description copied from interface:Workflow
Retrieves the attachments root node- Specified by:
getRootAttachments
in interfaceWorkflow
- Returns:
- The the attachments root node
- Throws:
AmetysRepositoryException
- if an error occurs.
-