Class ActivitiPropertyConverter
- java.lang.Object
-
- org.alfresco.repo.workflow.activiti.properties.ActivitiPropertyConverter
-
public class ActivitiPropertyConverter extends Object
- Since:
- 3.4.e
- Author:
- Nick Smith
-
-
Constructor Summary
Constructors Constructor Description ActivitiPropertyConverter(ActivitiUtil activitiUtil, WorkflowObjectFactory factory, WorkflowPropertyHandlerRegistry handlerRegistry, WorkflowAuthorityManager authorityManager, MessageService messageService, WorkflowNodeConverter nodeConverter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckMandatoryProperties(org.activiti.engine.delegate.DelegateTask task)Map<String,Object>convertHistoricDetails(List<org.activiti.engine.history.HistoricDetail> details)Convert a list ofHistoricDetailto a map with key-value pairs.ObjectconvertPropertyToValue(Object property)Performs basic conversion from a property to a value that can be uses as activiti variable.SerializableconvertPropertyValue(Object value)Convert an Activiti variable value to an Alfresco value.SerializableconvertValueToPropertyType(org.activiti.engine.task.Task task, Serializable value, QName propertyName)Converts aSerializablevalue to the type of the specified property.Map<String,Object>getHistoricActivityVariables(String activityId)Get all variable updates for activity, latest updates on topMap<String,Object>getHistoricProcessVariables(String processId)Get all variable updates for process instance, latest updates on topMap<String,Object>getHistoricTaskVariables(String taskId)Get all variable updates for task instance, latest updates on topMap<QName,Serializable>getPathProperties(String executionId)List<NodeRef>getPooledActorsReference(Collection<org.activiti.engine.task.IdentityLink> links)Map<QName,Serializable>getStartTaskProperties(org.activiti.engine.history.HistoricProcessInstance historicProcessInstance, String taskDefId, boolean completed)Map<String,Object>getStartVariables(String processDefId, Map<QName,Serializable> properties)Map<String,Object>getStartVariables(org.activiti.engine.history.HistoricProcessInstance historicProcessInstance)Map<QName,Serializable>getTaskProperties(org.activiti.engine.delegate.DelegateTask task, TypeDefinition typeDefinition, boolean localOnly)Map<QName,Serializable>getTaskProperties(org.activiti.engine.history.HistoricTaskInstance historicTask, Map<String,Object> localVariables)Map<QName,Serializable>getTaskProperties(org.activiti.engine.task.Task task)WorkflowObjectFactorygetWorkflowObjectFactory()voidsetDefaultTaskProperties(org.activiti.engine.delegate.DelegateTask task)Sets Default Properties of TaskvoidsetTaskProperties(org.activiti.engine.delegate.DelegateTask task, Map<QName,Serializable> properties)voidsetTaskProperties(org.activiti.engine.task.Task task, Map<QName,Serializable> properties)Sets the properties on the task, using Activiti API.org.activiti.engine.task.TaskupdateTask(org.activiti.engine.task.Task task, Map<QName,Serializable> properties, Map<QName,List<NodeRef>> add, Map<QName,List<NodeRef>> remove)
-
-
-
Constructor Detail
-
ActivitiPropertyConverter
public ActivitiPropertyConverter(ActivitiUtil activitiUtil, WorkflowObjectFactory factory, WorkflowPropertyHandlerRegistry handlerRegistry, WorkflowAuthorityManager authorityManager, MessageService messageService, WorkflowNodeConverter nodeConverter)
-
-
Method Detail
-
getTaskProperties
public Map<QName,Serializable> getTaskProperties(org.activiti.engine.task.Task task)
-
getPathProperties
public Map<QName,Serializable> getPathProperties(String executionId)
-
getPooledActorsReference
public List<NodeRef> getPooledActorsReference(Collection<org.activiti.engine.task.IdentityLink> links)
-
getTaskProperties
public Map<QName,Serializable> getTaskProperties(org.activiti.engine.delegate.DelegateTask task, TypeDefinition typeDefinition, boolean localOnly)
-
getTaskProperties
public Map<QName,Serializable> getTaskProperties(org.activiti.engine.history.HistoricTaskInstance historicTask, Map<String,Object> localVariables)
-
setDefaultTaskProperties
public void setDefaultTaskProperties(org.activiti.engine.delegate.DelegateTask task)
Sets Default Properties of Task- Parameters:
task- task instance
-
getStartTaskProperties
public Map<QName,Serializable> getStartTaskProperties(org.activiti.engine.history.HistoricProcessInstance historicProcessInstance, String taskDefId, boolean completed)
-
getStartVariables
public Map<String,Object> getStartVariables(org.activiti.engine.history.HistoricProcessInstance historicProcessInstance)
- Parameters:
historicProcessInstance- HistoricProcessInstance- Returns:
- Map
-
getHistoricProcessVariables
public Map<String,Object> getHistoricProcessVariables(String processId)
Get all variable updates for process instance, latest updates on top- Parameters:
processId- String- Returns:
- Map
-
getHistoricTaskVariables
public Map<String,Object> getHistoricTaskVariables(String taskId)
Get all variable updates for task instance, latest updates on top- Parameters:
taskId- String- Returns:
- Map
-
getHistoricActivityVariables
public Map<String,Object> getHistoricActivityVariables(String activityId)
Get all variable updates for activity, latest updates on top- Parameters:
activityId- String- Returns:
- Map
-
convertPropertyValue
public Serializable convertPropertyValue(Object value)
Convert an Activiti variable value to an Alfresco value.- Parameters:
value- activti value- Returns:
- alfresco value
-
convertPropertyToValue
public Object convertPropertyToValue(Object property)
Performs basic conversion from a property to a value that can be uses as activiti variable. If the type of the property is known, useconvertValueToPropertyType(Task, Serializable, QName)- Parameters:
property- the property to be converted- Returns:
- the value
-
convertValueToPropertyType
public Serializable convertValueToPropertyType(org.activiti.engine.task.Task task, Serializable value, QName propertyName)
Converts aSerializablevalue to the type of the specified property.- Parameters:
task- Taskvalue- SerializablepropertyName- QName- Returns:
- Serializable
-
setTaskProperties
public void setTaskProperties(org.activiti.engine.delegate.DelegateTask task, Map<QName,Serializable> properties)
-
setTaskProperties
public void setTaskProperties(org.activiti.engine.task.Task task, Map<QName,Serializable> properties)Sets the properties on the task, using Activiti API.
-
convertHistoricDetails
public Map<String,Object> convertHistoricDetails(List<org.activiti.engine.history.HistoricDetail> details)
Convert a list ofHistoricDetailto a map with key-value pairs.- Parameters:
details- the histroicDetails. Should be a list ofHistoricVariableUpdates.
-
getStartVariables
public Map<String,Object> getStartVariables(String processDefId, Map<QName,Serializable> properties)
-
getWorkflowObjectFactory
public WorkflowObjectFactory getWorkflowObjectFactory()
-
checkMandatoryProperties
public void checkMandatoryProperties(org.activiti.engine.delegate.DelegateTask task)
-
-