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
Fields Modifier and Type Field Description private static String
ATTACHMENTS_NODE_NAME
static String
METADATA_CURRENT_STEP_ID
Constants for currentStepId Metadata*static String
METADATA_WORKFLOW_ID
Constants for workflowId Metadata*private static String
NODE_NAME_CREATOR
private static String
PROPERTY_CREATION_DATE
private static String
PROPERTY_DESCRIPTION
private static String
PROPERTY_SITE
private static String
PROPERTY_TITLE
private static String
PROPERTY_WORKFLOW
-
Constructor Summary
Constructors Constructor Description JCRWorkflowProcess(Node node, String parentPath, JCRWorkflowProcessFactory factory)
Creates anJCRWorkflowProcess
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
getCreationDate()
Get the creation date of the processUserIdentity
getCreator()
Get the creator of the processlong
getCurrentStepId()
Retrieves the current step id of the Ametys objectString
getDescription()
Get the process descriptionResourceCollection
getRootAttachments(boolean create)
Retrieves the attachments root nodeString
getSite()
Get the site where the process was createdString
getTitle()
Get the process titleString
getWorkflow()
Get the workflow linked to this processlong
getWorkflowId()
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
setSite(String site)
Set the site where the process was createdvoid
setTitle(String title)
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, getAllowedGroups, getAllowedProfilesForAnonymous, getAllowedProfilesForAnyConnectedUser, getAllowedProfilesForGroups, getAllowedProfilesForUser, getAllowedProfilesForUsers, getAllowedUsers, getChild, getChildren, getDeniedGroups, getDeniedProfilesForAnonymous, getDeniedProfilesForAnyConnectedUser, getDeniedProfilesForGroups, getDeniedProfilesForUser, getDeniedProfilesForUsers, getDeniedUsers, 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 Detail
-
METADATA_WORKFLOW_ID
public static final String METADATA_WORKFLOW_ID
Constants for workflowId Metadata*- See Also:
- Constant Field Values
-
METADATA_CURRENT_STEP_ID
public static final String METADATA_CURRENT_STEP_ID
Constants for currentStepId Metadata*- See Also:
- Constant Field Values
-
PROPERTY_DESCRIPTION
private static final String PROPERTY_DESCRIPTION
- See Also:
- Constant Field Values
-
PROPERTY_TITLE
private static final String PROPERTY_TITLE
- See Also:
- Constant Field Values
-
PROPERTY_WORKFLOW
private static final String PROPERTY_WORKFLOW
- See Also:
- Constant Field Values
-
PROPERTY_SITE
private static final String PROPERTY_SITE
- See Also:
- Constant Field Values
-
PROPERTY_CREATION_DATE
private static final String PROPERTY_CREATION_DATE
- See Also:
- Constant Field Values
-
NODE_NAME_CREATOR
private static final String NODE_NAME_CREATOR
- See Also:
- Constant Field Values
-
ATTACHMENTS_NODE_NAME
private static final String ATTACHMENTS_NODE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JCRWorkflowProcess
public JCRWorkflowProcess(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 Detail
-
getTitle
public String getTitle() throws AmetysRepositoryException
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
public void setTitle(String title)
Description copied from interface:WorkflowProcess
Set the process title- Specified by:
setTitle
in interfaceWorkflowProcess
- Parameters:
title
- The title
-
getWorkflow
public String getWorkflow() throws AmetysRepositoryException
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
public void setWorkflow(String workflowId)
Description copied from interface:WorkflowProcess
Set the workflow linked to this process- Specified by:
setWorkflow
in interfaceWorkflowProcess
- Parameters:
workflowId
- The workflow id
-
getDescription
public String getDescription() throws AmetysRepositoryException
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
public void setDescription(String description)
Description copied from interface:WorkflowProcess
Set the process description- Specified by:
setDescription
in interfaceWorkflowProcess
- Parameters:
description
- The description
-
getCreator
public UserIdentity getCreator() throws AmetysRepositoryException
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
public void setCreator(UserIdentity creator)
Description copied from interface:WorkflowProcess
Set the creator of the process- Specified by:
setCreator
in interfaceWorkflowProcess
- Parameters:
creator
- The creator
-
getSite
public String getSite() throws AmetysRepositoryException
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
public void setSite(String site)
Description copied from interface:WorkflowProcess
Set the site where the process was created- Specified by:
setSite
in interfaceWorkflowProcess
- Parameters:
site
- The site
-
getCreationDate
public Date getCreationDate() throws AmetysRepositoryException
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
public void setCreationDate(Date creationDate)
Description copied from interface:WorkflowProcess
Set the creation date of the process- Specified by:
setCreationDate
in interfaceWorkflowProcess
- Parameters:
creationDate
- The creation date
-
getRootAttachments
public ResourceCollection getRootAttachments(boolean create) throws AmetysRepositoryException
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
public long getWorkflowId() throws AmetysRepositoryException
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
public void setWorkflowId(long workflowId) throws AmetysRepositoryException
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
public long getCurrentStepId() throws AmetysRepositoryException
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
public void setCurrentStepId(long stepId) throws AmetysRepositoryException
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.
-
-