Interface ProcessesStorage


  • public interface ProcessesStorage
    • Method Detail

      • 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
        Throws:
        IllegalAccessException - when the user isn't allowed to access documents of the designated ownerId
        org.exoplatform.commons.exception.ObjectNotFoundException - when ownerId doesn't exisits
      • 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)
      • 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)
      • deleteWorkflowById

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

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

        int countWorksByWorkflow​(long projectId,
                                 boolean isCompleted)
                          throws Exception
        Parameters:
        projectId - : Tasks project id
        isCompleted - : filter by completed and uncompleted tasks
        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 javax.persistence.EntityNotFoundException
        Delete a work draft by its given id
        Parameters:
        id - Work draft id
        Throws:
        javax.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,
                                     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