Interface ProcessesStorage


public interface ProcessesStorage
  • Method Details

    • findAllWorkFlowsByUser

      List<WorkFlow> findAllWorkFlowsByUser(ProcessesFilter filter, int offset, int limit, long userIdentityId)
      Retrieves a list of accessible WorkFlows, for a selected user, by applying the designated filter. The returned results will be of type WorkFlow only. The ownerId of filter object will be used to select the list of accessible WorkFlows to retrieve.
      Parameters:
      filter - ProcessesFilter that contains filtering criteria
      offset - Offset of the result list
      limit - Limit of the result list
      userIdentityId - Identity technical identifier of the user acessing files
      Returns:
      List of WorkFlow
    • findEnabledWorkFlowsByUser

      List<WorkFlow> findEnabledWorkFlowsByUser(ProcessesFilter filter, int offset, int limit, long userIdentityId)
    • findAllWorkFlows

      List<WorkFlow> findAllWorkFlows(int offset, int limit)
    • findEnabledWorkFlows

      List<WorkFlow> findEnabledWorkFlows(int offset, int limit)
    • findDisabledWorkFlows

      List<WorkFlow> findDisabledWorkFlows(int offset, int limit)
      Retrieves a list of disabled workflows, The returned results will be of type WorkFlow only.
      Parameters:
      offset - Offset of the result list
      limit - Limit of the result list
      Returns:
      List of WorkFlow
    • getWorkFlowById

      WorkFlow getWorkFlowById(long id)
    • getWorkFlowByProjectId

      WorkFlow getWorkFlowByProjectId(long projectId)
    • saveWorkFlow

      WorkFlow saveWorkFlow(WorkFlow workFlow, long userId) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • getWorks

      List<Work> getWorks(long userIdentityId, WorkFilter workFilter, int offset, int limit) throws Exception
      Retrieves list of filtered works
      Parameters:
      userIdentityId - user identity ide
      workFilter - works filter
      offset - Offset of the result list
      limit - Limit of the result list
      Returns:
      List of Work
      Throws:
      Exception
    • getWorkById

      Work getWorkById(long id)
    • saveWork

      Work saveWork(Work work, long userId) throws IllegalArgumentException
      Saving a work and deletes its related draft if it was created from draft
      Parameters:
      work - Work Object
      userId - user Id
      Returns:
      Work
      Throws:
      IllegalArgumentException
    • deleteWorkflowById

      void deleteWorkflowById(Long workflowId) throws jakarta.persistence.EntityNotFoundException
      Delete a workflow by its given Id.
      Parameters:
      workflowId - : workflow id
      Throws:
      jakarta.persistence.EntityNotFoundException
    • getWorkById

      Work getWorkById(long userIdentityId, long workId) throws jakarta.persistence.EntityNotFoundException
      Retrieves a Work by its given id
      Parameters:
      userIdentityId - user identity id
      workId - Work id
      Returns:
      Work
      Throws:
      jakarta.persistence.EntityNotFoundException
    • countWorksByWorkflow

      int countWorksByWorkflow(long projectId, boolean isCompleted) throws Exception
      Parameters:
      projectId - : Tasks project id
      isCompleted - : filter by completed and uncompleted tasks
      Returns:
      Filtered tasks count
      Throws:
      Exception
    • deleteWorkById

      void deleteWorkById(Long workId)
      Delete a work by its given id
      Parameters:
      workId - : Work id
    • updateWorkCompleted

      Work updateWorkCompleted(Long workId, boolean completed)
      update the completed property of the task of a work to completed or uncompleted
      Parameters:
      workId - work id
      completed - work completed property, can be true or false
      Returns:
      Work
    • findAllWorkDraftsByUser

      List<Work> findAllWorkDraftsByUser(WorkFilter workFilter, int offset, int limit, long userIdentityId)
      Retrieves a list of accessible WorkDraft, for a selected user.
      Parameters:
      workFilter - work filter
      offset - Offset of the result list
      limit - Limit of the result list
      userIdentityId - Identity technical identifier of the user
      Returns:
      List of Work
    • saveWorkDraft

      Work saveWorkDraft(Work work, long userId)
      Save a draft of a work
      Parameters:
      work - work draft object
      userId - user id of the creator
      Returns:
      Work
    • getWorkDraftyId

      Work getWorkDraftyId(long id)
      Retrieves a work draft by its given id
      Parameters:
      id - Work draft id
      Returns:
      Work
    • deleteWorkDraftById

      void deleteWorkDraftById(long id) throws jakarta.persistence.EntityNotFoundException
      Delete a work draft by its given id
      Parameters:
      id - Work draft id
      Throws:
      jakarta.persistence.EntityNotFoundException
    • getAvailableWorkStatuses

      List<WorkStatus> getAvailableWorkStatuses()
      Retrieves the list of available statuses in all workflows
      Returns:
      List of WorkStatus
    • findWorkFlows

      List<WorkFlow> findWorkFlows(ProcessesFilter processesFilter, long userIdentityId, int offset, int limit)
      Retrieves list fo filtered workflows
      Parameters:
      processesFilter - processes filter
      offset - Offset of result list
      limit - limit of result list
      Returns:
      List of WorkFlow
    • getIllustrationImageById

      IllustrativeAttachment getIllustrationImageById(Long illustrationId) throws org.exoplatform.commons.file.services.FileStorageException, org.exoplatform.commons.exception.ObjectNotFoundException, IOException
      Retrieves an illustration image by its given id
      Parameters:
      illustrationId - illustration file id
      Returns:
      IllustrativeAttachment
      Throws:
      org.exoplatform.commons.file.services.FileStorageException
      org.exoplatform.commons.exception.ObjectNotFoundException
      IOException
    • countWorkFlows

      int countWorkFlows(ProcessesFilter processesFilter)