Package org.ametys.plugins.bpm.jcr
Class JCRWorkflowProcess
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject<JCRWorkflowProcessFactory>
org.ametys.plugins.bpm.jcr.JCRWorkflowProcess
- All Implemented Interfaces:
WorkflowProcess
,ACLAmetysObject
,AmetysObject
,JCRAmetysObject
,JCRTraversableAmetysObject
,MetadataAwareAmetysObject
,ModifiableMetadataAwareAmetysObject
,ModifiableACLAmetysObject
,ModifiableAmetysObject
,ModifiableTraversableAmetysObject
,RemovableAmetysObject
,TraversableAmetysObject
,WorkflowAwareAmetysObject
public class JCRWorkflowProcess
extends DefaultTraversableAmetysObject<JCRWorkflowProcessFactory>
implements WorkflowProcess, WorkflowAwareAmetysObject
Class representing of workflow's process, backed by a JCR node.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionJCRWorkflowProcess
(javax.jcr.Node node, String parentPath, JCRWorkflowProcessFactory factory) Creates anJCRWorkflowProcess
. -
Method Summary
Modifier and TypeMethodDescriptionGet the creation date of the processGet the creator of the processlong
Retrieves the current step id of the Ametys objectGet the process descriptiongetRootAttachments
(boolean create) Retrieves the attachments root nodegetSite()
Get the site where the process was createdgetTitle()
Get the process titleGet the workflow linked to this processlong
Retrieves the workflow id associated with the Ametys object.void
setCreationDate
(Date creationDate) Set the creation date of the processvoid
setCreator
(UserIdentity creator) Set the creator of the processvoid
setCurrentStepId
(long stepId) Set the current step id of the Ametys objectvoid
setDescription
(String description) Set the process descriptionvoid
Set the site where the process was createdvoid
Set the process titlevoid
setWorkflow
(String workflowId) Set the workflow linked to this processvoid
setWorkflowId
(long workflowId) Set the workflow id of this Ametys object.
This method will throw Exception if the workflow id was already set on this Ametys object.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
-
Field Details
-
METADATA_WORKFLOW_ID
Constants for workflowId Metadata*- See Also:
-
METADATA_CURRENT_STEP_ID
Constants for currentStepId Metadata*- See Also:
-
-
Constructor Details
-
JCRWorkflowProcess
public JCRWorkflowProcess(javax.jcr.Node node, String parentPath, JCRWorkflowProcessFactory factory) Creates anJCRWorkflowProcess
.- Parameters:
node
- the node backing thisAmetysObject
parentPath
- the parentPath in the Ametys hierarchyfactory
- the JCRWorkflowProcessFactory which created the AmetysObject
-
-
Method Details
-
getTitle
Description copied from interface:WorkflowProcess
Get the process title- Specified by:
getTitle
in interfaceWorkflowProcess
- Returns:
- The process title
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setTitle
Description copied from interface:WorkflowProcess
Set the process title- Specified by:
setTitle
in interfaceWorkflowProcess
- Parameters:
title
- The title
-
getWorkflow
Description copied from interface:WorkflowProcess
Get the workflow linked to this process- Specified by:
getWorkflow
in interfaceWorkflowProcess
- Returns:
- The workflow id
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setWorkflow
Description copied from interface:WorkflowProcess
Set the workflow linked to this process- Specified by:
setWorkflow
in interfaceWorkflowProcess
- Parameters:
workflowId
- The workflow id
-
getDescription
Description copied from interface:WorkflowProcess
Get the process description- Specified by:
getDescription
in interfaceWorkflowProcess
- Returns:
- The description
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setDescription
Description copied from interface:WorkflowProcess
Set the process description- Specified by:
setDescription
in interfaceWorkflowProcess
- Parameters:
description
- The description
-
getCreator
Description copied from interface:WorkflowProcess
Get the creator of the process- Specified by:
getCreator
in interfaceWorkflowProcess
- Returns:
- The creator
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setCreator
Description copied from interface:WorkflowProcess
Set the creator of the process- Specified by:
setCreator
in interfaceWorkflowProcess
- Parameters:
creator
- The creator
-
getSite
Description copied from interface:WorkflowProcess
Get the site where the process was created- Specified by:
getSite
in interfaceWorkflowProcess
- Returns:
- The site
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setSite
Description copied from interface:WorkflowProcess
Set the site where the process was created- Specified by:
setSite
in interfaceWorkflowProcess
- Parameters:
site
- The site
-
getCreationDate
Description copied from interface:WorkflowProcess
Get the creation date of the process- Specified by:
getCreationDate
in interfaceWorkflowProcess
- Returns:
- The creation date
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setCreationDate
Description copied from interface:WorkflowProcess
Set the creation date of the process- Specified by:
setCreationDate
in interfaceWorkflowProcess
- Parameters:
creationDate
- The creation date
-
getRootAttachments
Description copied from interface:WorkflowProcess
Retrieves the attachments root node- Specified by:
getRootAttachments
in interfaceWorkflowProcess
- Parameters:
create
- True to create the node if it does not exist- Returns:
- The attachments root node.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getWorkflowId
Description copied from interface:WorkflowAwareAmetysObject
Retrieves the workflow id associated with the Ametys object.- Specified by:
getWorkflowId
in interfaceWorkflowAwareAmetysObject
- Returns:
- the workflow id.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setWorkflowId
Description copied from interface:WorkflowAwareAmetysObject
Set the workflow id of this Ametys object.
This method will throw Exception if the workflow id was already set on this Ametys object.- Specified by:
setWorkflowId
in interfaceWorkflowAwareAmetysObject
- Parameters:
workflowId
- the workflow id of the object.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getCurrentStepId
Description copied from interface:WorkflowAwareAmetysObject
Retrieves the current step id of the Ametys object- Specified by:
getCurrentStepId
in interfaceWorkflowAwareAmetysObject
- Returns:
- the current step id
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setCurrentStepId
Description copied from interface:WorkflowAwareAmetysObject
Set the current step id of the Ametys object- Specified by:
setCurrentStepId
in interfaceWorkflowAwareAmetysObject
- Parameters:
stepId
- the step id to set- Throws:
AmetysRepositoryException
- if an error occurs.
-