Interface ProcessesService
public interface ProcessesService
-
Method Summary
Modifier and TypeMethodDescriptionintcountWorkFlows(ProcessesFilter filter, long userIdentityId) intcountWorksByWorkflow(Long projectId, Boolean isCompleted) createWork(Work work, long userId) Creates a work from new work object or from exiting work draftcreateWorkDraft(Work work, long userId) Creates a work draftcreateWorkFlow(WorkFlow workFlow, long userId) voiddeleteWorkById(Long workId) Delete a work by its given id.voidDeletes a work draft by its given idvoiddeleteWorkflowById(Long workflowId) Delete a workflow by its given Id.Retrieves the list of available statuses in all workflowsgetIllustrationImageById(Long illustrationId) Retrieves an illustration image by its given idgetWorkById(long userIdentityId, Long workId) Retrieves a Work by its given idgetWorkDrafts(long userIdentityId, WorkFilter workFilter, int offset, int limit) Retrieves a list of accessible WorkDraft, for a selected usergetWorkFlow(long id) getWorkFlowByProjectId(long projectId) getWorkFlows(ProcessesFilter filter, int offset, int limit, long userIdentityId) Retrieves a list of accessible WorkFlows, for a selected user, by applying the designated filter.getWorks(long userIdentityId, WorkFilter workFilter, int offset, int limit) Retrieves list of filtered worksupdateWork(Work work, long userId) updateWorkCompleted(Long workId, boolean completed) update the completed property of the task of a work to completed or uncompletedupdateWorkDraft(Work work, long userId) Updates a work draftupdateWorkFlow(WorkFlow workFlow, long userId)
-
Method Details
-
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 typeWorkFlowonly. The ownerId of filter object will be used to select the list of accessible WorkFlows to retrieve.- Parameters:
filter-ProcessesFilterthat contains filtering criteriaoffset- Offset of the result listlimit- Limit of the result listuserIdentityId-Identitytechnical identifier of the user acessing files- Returns:
ListofWorkFlow- Throws:
IllegalAccessException- when the user isn't allowed to access documents of the designated ownerId
-
countWorkFlows
- Throws:
IllegalAccessException
-
getWorkFlow
- Throws:
IllegalAccessException
-
createWorkFlow
- Throws:
IllegalAccessException
-
updateWorkFlow
WorkFlow updateWorkFlow(WorkFlow workFlow, long userId) throws IllegalArgumentException, org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
IllegalArgumentExceptionorg.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getWorks
List<Work> getWorks(long userIdentityId, WorkFilter workFilter, int offset, int limit) throws Exception Retrieves list of filtered works -
getWorkFlowByProjectId
-
createWork
Creates a work from new work object or from exiting work draft- Parameters:
work- Work ObjectuserId- user id- Returns:
Work- Throws:
IllegalAccessException
-
updateWork
Work updateWork(Work work, long userId) throws IllegalArgumentException, org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
IllegalArgumentExceptionorg.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
deleteWorkflowById
Delete a workflow by its given Id.- Parameters:
workflowId- : workflow id
-
countWorksByWorkflow
- Parameters:
projectId- : Tasks project idisCompleted- : filter by completed and uncompleted tasks- Returns:
- Filtered tasks count
- Throws:
Exception
-
deleteWorkById
Delete a work by its given id.- Parameters:
workId- : Work id
-
updateWorkCompleted
update the completed property of the task of a work to completed or uncompleted- Parameters:
workId- work idcompleted- work completed property, can be true or false- Returns:
Work
-
createWorkDraft
Creates a work draft- Parameters:
work- Work draft objectuserId- user identity- Returns:
Work- Throws:
IllegalArgumentException
-
updateWorkDraft
Work updateWorkDraft(Work work, long userId) throws IllegalArgumentException, org.exoplatform.commons.exception.ObjectNotFoundException Updates a work draft- Parameters:
work- Work draft objectuserId- user identity- Returns:
Work- Throws:
IllegalArgumentExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
getWorkDrafts
Retrieves a list of accessible WorkDraft, for a selected user -
deleteWorkDraftById
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:
ListofWorkStatus
-
getWorkById
Retrieves a Work by its given id- Parameters:
userIdentityId- user identity idworkId- 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.FileStorageExceptionorg.exoplatform.commons.exception.ObjectNotFoundExceptionIOException
-