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.ProcessEngine
protected AuthorityService
protected static final String
protected boolean
protected org.alfresco.service.cmr.dictionary.DictionaryService
protected org.alfresco.service.namespace.NamespaceService
protected NodeService
protected TenantService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Item
createItemForNodeRef
(NodeRef nodeRef) createItemInProcess
(String itemId, String processId) Create a new item in the process package variablevoid
deleteItemFromProcess
(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> T
getParameter
(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) void
setActivitiProcessEngine
(org.activiti.engine.ProcessEngine activitiProcessEngine) void
setActivitiWorkflowEngine
(ActivitiWorkflowEngine activitiWorkflowEngine) void
setAuthorityService
(AuthorityService authorityService) void
setDeployWorkflowsInTenant
(boolean deployWorkflowsInTenant) void
setDictionaryService
(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) void
setNamespaceService
(org.alfresco.service.namespace.NamespaceService namespaceService) void
setNodeService
(NodeService nodeService) void
setTenantService
(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
-