Class AmetysStep
- java.lang.Object
-
- org.ametys.plugins.workflow.store.AmetysStep
-
- All Implemented Interfaces:
com.opensymphony.workflow.spi.Step
public class AmetysStep extends Object implements com.opensymphony.workflow.spi.Step
OSWorkflow step with additional properties.
-
-
Field Summary
Fields Modifier and Type Field Description protected static String__CUSTOM_PROP_PREFIXCustom property prefix.
-
Constructor Summary
Constructors Constructor Description AmetysStep(Node node, AbstractJackrabbitWorkflowStore store)Build an ametys step.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetActionId()StringgetCaller()DategetDueDate()longgetEntryId()DategetFinishDate()longgetId()protected ObjectgetMultiValuedProperty(Property property)Get a multi-valued property.StringgetOwner()long[]getPreviousStepIds()ObjectgetProperty(String name)Get a custom property value.Set<String>getPropertyNames()Get all the custom property names.protected ObjectgetSingleValuedProperty(Property property)Get a single-valued property.DategetStartDate()StringgetStatus()intgetStepId()voidsave()Save the step.voidsetActionId(int actionId)Set the action ID.voidsetCaller(String caller)Set the caller.voidsetDueDate(Date dueDate)Set the step due date.voidsetFinishDate(Date finishDate)Set the step finish date.voidsetOwner(String owner)Set the owner.voidsetPreviousStepIds(long[] previousStepIds)Set the previous step IDs.voidsetProperty(String name, Object value)Set a custom property value.voidsetStartDate(Date startDate)Set the step start date.voidsetStatus(String status)Set the status.voidsetStepId(int stepId)Set the step ID.StringtoString()
-
-
-
Field Detail
-
__CUSTOM_PROP_PREFIX
protected static final String __CUSTOM_PROP_PREFIX
Custom property prefix.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AmetysStep
public AmetysStep(Node node, AbstractJackrabbitWorkflowStore store)
Build an ametys step.- Parameters:
node- the backing JCR node.store- the workflow store.
-
-
Method Detail
-
getId
public long getId()
- Specified by:
getIdin interfacecom.opensymphony.workflow.spi.Step
-
getEntryId
public long getEntryId()
- Specified by:
getEntryIdin interfacecom.opensymphony.workflow.spi.Step
-
getStepId
public int getStepId()
- Specified by:
getStepIdin interfacecom.opensymphony.workflow.spi.Step
-
setStepId
public void setStepId(int stepId)
Set the step ID.- Parameters:
stepId- the step ID to set.
-
getActionId
public int getActionId()
- Specified by:
getActionIdin interfacecom.opensymphony.workflow.spi.Step
-
setActionId
public void setActionId(int actionId)
Set the action ID.- Parameters:
actionId- the action ID to set.
-
getCaller
public String getCaller()
- Specified by:
getCallerin interfacecom.opensymphony.workflow.spi.Step
-
setCaller
public void setCaller(String caller)
Set the caller.- Parameters:
caller- the caller to set.
-
getStartDate
public Date getStartDate()
- Specified by:
getStartDatein interfacecom.opensymphony.workflow.spi.Step
-
setStartDate
public void setStartDate(Date startDate)
Set the step start date.- Parameters:
startDate- the start date to set.
-
getDueDate
public Date getDueDate()
- Specified by:
getDueDatein interfacecom.opensymphony.workflow.spi.Step
-
setDueDate
public void setDueDate(Date dueDate)
Set the step due date.- Parameters:
dueDate- the due date to set.
-
getFinishDate
public Date getFinishDate()
- Specified by:
getFinishDatein interfacecom.opensymphony.workflow.spi.Step
-
setFinishDate
public void setFinishDate(Date finishDate)
Set the step finish date.- Parameters:
finishDate- the finish date to set.
-
getOwner
public String getOwner()
- Specified by:
getOwnerin interfacecom.opensymphony.workflow.spi.Step
-
getPreviousStepIds
public long[] getPreviousStepIds()
- Specified by:
getPreviousStepIdsin interfacecom.opensymphony.workflow.spi.Step
-
setPreviousStepIds
public void setPreviousStepIds(long[] previousStepIds)
Set the previous step IDs.- Parameters:
previousStepIds- the previous step IDs to set.
-
getStatus
public String getStatus()
- Specified by:
getStatusin interfacecom.opensymphony.workflow.spi.Step
-
setStatus
public void setStatus(String status)
Set the status.- Parameters:
status- the status to set.
-
getProperty
public Object getProperty(String name)
Get a custom property value.- Parameters:
name- the property name.- Returns:
- the custom property value.
-
setProperty
public void setProperty(String name, Object value)
Set a custom property value.- Parameters:
name- the property name.value- the value to set.
-
getPropertyNames
public Set<String> getPropertyNames()
Get all the custom property names.- Returns:
- the custom property names.
-
save
public void save()
Save the step.
-
getSingleValuedProperty
protected Object getSingleValuedProperty(Property property) throws RepositoryException
Get a single-valued property.- Parameters:
property- the JCR property.- Returns:
- the property value.
- Throws:
RepositoryException- if an error occurs.
-
getMultiValuedProperty
protected Object getMultiValuedProperty(Property property) throws RepositoryException
Get a multi-valued property.- Parameters:
property- the JCR property.- Returns:
- the property value (as an array).
- Throws:
RepositoryException- if an error occurs.
-
-