Interface ProcessesService


  • public interface ProcessesService
    • Method Detail

      • getWorkFlows

        List<WorkFlow> getWorkFlows​(ProcessesFilter filter,
                                    int offset,
                                    int limit,
                                    long userIdentityId)
                             throws IllegalAccessException
        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
      • getWorks

        List<Work> getWorks​(long userIdentityId,
                            WorkFilter workFilter,
                            int offset,
                            int limit)
                     throws Exception
        Retrieves list of filtered works
        Parameters:
        userIdentityId - user identity id
        workFilter - works filter
        offset - offset of the work lits result
        limit - limit of the queried result list
        Returns:
        List of Work
        Throws:
        Exception
      • getWorkFlowByProjectId

        WorkFlow getWorkFlowByProjectId​(long projectId)
      • deleteWorkflowById

        void deleteWorkflowById​(Long workflowId)
        Delete a workflow by its given Id.
        Parameters:
        workflowId - : workflow id
      • 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
      • updateWorkDraft

        Work updateWorkDraft​(Work work,
                             long userId)
                      throws IllegalArgumentException,
                             org.exoplatform.commons.exception.ObjectNotFoundException
        Updates a work draft
        Parameters:
        work - Work draft object
        userId - user identity
        Returns:
        Work
        Throws:
        IllegalArgumentException
        org.exoplatform.commons.exception.ObjectNotFoundException
      • getWorkDrafts

        List<Work> getWorkDrafts​(long userIdentityId,
                                 WorkFilter workFilter,
                                 int offset,
                                 int limit)
        Retrieves a list of accessible WorkDraft, for a selected user
        Parameters:
        userIdentityId - user identity
        workFilter - work filter
        offset - Offset of the result list
        limit - Limit of the result list
        Returns:
        List of Work
      • deleteWorkDraftById

        void deleteWorkDraftById​(Long id)
        Deletes a work draft by its given id
        Parameters:
        id - Work draft id
      • getAvailableWorkStatuses

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

        Work getWorkById​(long userIdentityId,
                         Long workId)
        Retrieves a Work by its given id
        Parameters:
        userIdentityId - user identity id
        workId - Work id
        Returns:
        Work
      • 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