Class WorkflowRestImpl

java.lang.Object
org.alfresco.rest.workflow.api.impl.WorkflowRestImpl
Direct Known Subclasses:
ActivitiesImpl, DeploymentsImpl, ProcessDefinitionsImpl, ProcessesImpl, TasksImpl

public class WorkflowRestImpl extends Object
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 Details

    • BPM_PACKAGE

      protected static final String BPM_PACKAGE
      See Also:
    • tenantService

      protected TenantService tenantService
    • authorityService

      protected AuthorityService authorityService
    • namespaceService

      protected org.alfresco.service.namespace.NamespaceService namespaceService
    • dictionaryService

      protected org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService
    • nodeService

      protected NodeService nodeService
    • activitiProcessEngine

      protected org.activiti.engine.ProcessEngine activitiProcessEngine
    • deployWorkflowsInTenant

      protected boolean deployWorkflowsInTenant
    • excludeModelTypes

      protected List<String> excludeModelTypes
  • Constructor Details

    • WorkflowRestImpl

      public WorkflowRestImpl()
  • Method Details

    • setTenantService

      public void setTenantService(TenantService tenantService)
    • setAuthorityService

      public void setAuthorityService(AuthorityService authorityService)
    • setNamespaceService

      public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
    • setDictionaryService

      public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
    • setNodeService

      public void setNodeService(NodeService nodeService)
    • setActivitiProcessEngine

      public void setActivitiProcessEngine(org.activiti.engine.ProcessEngine activitiProcessEngine)
    • setDeployWorkflowsInTenant

      public void setDeployWorkflowsInTenant(boolean deployWorkflowsInTenant)
    • getNodeRef

      public NodeRef getNodeRef(String itemId)
      Create NodeRef from item id String
    • getItemsFromProcess

      public CollectionWithPagingInfo<Item> getItemsFromProcess(String processId, Paging paging)
      Get all items from the process package variable
    • getItemFromProcess

      public Item getItemFromProcess(String itemId, String processId)
      Get an item from the process package variable
    • createItemInProcess

      public Item createItemInProcess(String itemId, String processId)
      Create a new item in the process package variable
    • deleteItemFromProcess

      public void deleteItemFromProcess(String itemId, String processId)
      Delete an item from the process package variable
    • getParameter

      public <T> T getParameter(Parameters parameters, String parameterName, Class<T> returnType)
      Get the first parameter value, converted to the requested type.
      Parameters:
      parameters - used to extract parameter value from
      parameterName - name of the parameter
      returnType - 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 for
      paging - 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

      protected Item createItemForNodeRef(NodeRef nodeRef)
    • setActivitiWorkflowEngine

      public void setActivitiWorkflowEngine(ActivitiWorkflowEngine activitiWorkflowEngine)