Class WorkflowRestImpl
java.lang.Object
org.alfresco.rest.workflow.api.impl.WorkflowRestImpl
- Direct Known Subclasses:
ActivitiesImpl,DeploymentsImpl,ProcessDefinitionsImpl,ProcessesImpl,TasksImpl
Base class for rest-implementations related to workflow. Contains utility-methods that
can be used, regardless of the type of resources the implementing class can handle.
- Author:
- Frederik Heremans
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.activiti.engine.ProcessEngineprotected AuthorityServiceprotected static final Stringprotected booleanprotected org.alfresco.service.cmr.dictionary.DictionaryServiceprotected org.alfresco.service.namespace.NamespaceServiceprotected NodeServiceprotected TenantService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ItemcreateItemForNodeRef(NodeRef nodeRef) createItemInProcess(String itemId, String processId) Create a new item in the process package variablevoiddeleteItemFromProcess(String itemId, String processId) Delete an item from the process package variablegetFormModelElements(org.alfresco.service.cmr.dictionary.TypeDefinition type, Paging paging) getItemFromProcess(String itemId, String processId) Get an item from the process package variablegetItemsFromProcess(String processId, Paging paging) Get all items from the process package variablegetNodeRef(String itemId) Create NodeRef from item id String<T> TgetParameter(Parameters parameters, String parameterName, Class<T> returnType) Get the first parameter value, converted to the requested type.protected Set<org.alfresco.service.namespace.QName>getTypesToExclude(org.alfresco.service.cmr.dictionary.TypeDefinition taskType) voidsetActivitiProcessEngine(org.activiti.engine.ProcessEngine activitiProcessEngine) voidsetActivitiWorkflowEngine(ActivitiWorkflowEngine activitiWorkflowEngine) voidsetAuthorityService(AuthorityService authorityService) voidsetDeployWorkflowsInTenant(boolean deployWorkflowsInTenant) voidsetDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) voidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) voidsetNodeService(NodeService nodeService) voidsetTenantService(TenantService tenantService) protected List<org.activiti.engine.history.HistoricVariableInstance>validateIfUserAllowedToWorkWithProcess(String processId) Validates if the logged in user is allowed to get information about a specific process instance.
-
Field Details
-
BPM_PACKAGE
- See Also:
-
tenantService
-
authorityService
-
namespaceService
protected org.alfresco.service.namespace.NamespaceService namespaceService -
dictionaryService
protected org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService -
nodeService
-
activitiProcessEngine
protected org.activiti.engine.ProcessEngine activitiProcessEngine -
deployWorkflowsInTenant
protected boolean deployWorkflowsInTenant -
excludeModelTypes
-
-
Constructor Details
-
WorkflowRestImpl
public WorkflowRestImpl()
-
-
Method Details
-
setTenantService
-
setAuthorityService
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) -
setDictionaryService
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) -
setNodeService
-
setActivitiProcessEngine
public void setActivitiProcessEngine(org.activiti.engine.ProcessEngine activitiProcessEngine) -
setDeployWorkflowsInTenant
public void setDeployWorkflowsInTenant(boolean deployWorkflowsInTenant) -
getNodeRef
Create NodeRef from item id String -
getItemsFromProcess
Get all items from the process package variable -
getItemFromProcess
Get an item from the process package variable -
createItemInProcess
Create a new item in the process package variable -
deleteItemFromProcess
Delete an item from the process package variable -
getParameter
Get the first parameter value, converted to the requested type.- Parameters:
parameters- used to extract parameter value fromparameterName- name of the parameterreturnType- type of object to return- Returns:
- the converted parameter value. Null, if the parameter has no value.
- Throws:
IllegalArgumentException- when no conversion for the given returnType is available or if returnType is null.InvalidArgumentException- when conversion to the given type was not possible
-
getFormModelElements
public CollectionWithPagingInfo<FormModelElement> getFormModelElements(org.alfresco.service.cmr.dictionary.TypeDefinition type, Paging paging) - Parameters:
type- the type to get the elements forpaging- Paging- Returns:
- collection with all valid form-model elements for the given type.
-
getTypesToExclude
protected Set<org.alfresco.service.namespace.QName> getTypesToExclude(org.alfresco.service.cmr.dictionary.TypeDefinition taskType) - Parameters:
taskType- type of the task- Returns:
- all types (and aspects) which properties should not be used for form-model elements
-
validateIfUserAllowedToWorkWithProcess
protected List<org.activiti.engine.history.HistoricVariableInstance> validateIfUserAllowedToWorkWithProcess(String processId) Validates if the logged in user is allowed to get information about a specific process instance. If the user is not allowed an exception is thrown.- Parameters:
processId- identifier of the process instance
-
createItemForNodeRef
-
setActivitiWorkflowEngine
-