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_PREFIX
Custom 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 int
getActionId()
String
getCaller()
Date
getDueDate()
long
getEntryId()
Date
getFinishDate()
long
getId()
protected Object
getMultiValuedProperty(Property property)
Get a multi-valued property.String
getOwner()
long[]
getPreviousStepIds()
Object
getProperty(String name)
Get a custom property value.Set<String>
getPropertyNames()
Get all the custom property names.protected Object
getSingleValuedProperty(Property property)
Get a single-valued property.Date
getStartDate()
String
getStatus()
int
getStepId()
void
save()
Save the step.void
setActionId(int actionId)
Set the action ID.void
setCaller(String caller)
Set the caller.void
setDueDate(Date dueDate)
Set the step due date.void
setFinishDate(Date finishDate)
Set the step finish date.void
setOwner(String owner)
Set the owner.void
setPreviousStepIds(long[] previousStepIds)
Set the previous step IDs.void
setProperty(String name, Object value)
Set a custom property value.void
setStartDate(Date startDate)
Set the step start date.void
setStatus(String status)
Set the status.void
setStepId(int stepId)
Set the step ID.String
toString()
-
-
-
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:
getId
in interfacecom.opensymphony.workflow.spi.Step
-
getEntryId
public long getEntryId()
- Specified by:
getEntryId
in interfacecom.opensymphony.workflow.spi.Step
-
getStepId
public int getStepId()
- Specified by:
getStepId
in 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:
getActionId
in 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:
getCaller
in 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:
getStartDate
in 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:
getDueDate
in 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:
getFinishDate
in 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:
getOwner
in interfacecom.opensymphony.workflow.spi.Step
-
getPreviousStepIds
public long[] getPreviousStepIds()
- Specified by:
getPreviousStepIds
in 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:
getStatus
in 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.
-
-