Interface ProcessesService
-
public interface ProcessesService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcountWorksByWorkflow(Long projectId, Boolean isCompleted)WorkcreateWork(Work work, long userId)Creates a work from new work object or from exiting work draftWorkcreateWorkDraft(Work work, long userId)Creates a work draftWorkFlowcreateWorkFlow(WorkFlow workFlow, long userId)voiddeleteWorkById(Long workId)Delete a work by its given id.voiddeleteWorkDraftById(Long id)Deletes a work draft by its given idvoiddeleteWorkflowById(Long workflowId)Delete a workflow by its given Id.List<WorkStatus>getAvailableWorkStatuses()Retrieves the list of available statuses in all workflowsIllustrativeAttachmentgetIllustrationImageById(Long illustrationId)Retrieves an illustration image by its given idWorkgetWorkById(long userIdentityId, Long workId)Retrieves a Work by its given idList<Work>getWorkDrafts(long userIdentityId, WorkFilter workFilter, int offset, int limit)Retrieves a list of accessible WorkDraft, for a selected userWorkFlowgetWorkFlow(long id)WorkFlowgetWorkFlowByProjectId(long projectId)List<WorkFlow>getWorkFlows(ProcessesFilter filter, int offset, int limit, long userIdentityId)Retrieves a list of accessible WorkFlows, for a selected user, by applying the designated filter.List<Work>getWorks(long userIdentityId, WorkFilter workFilter, int offset, int limit)Retrieves list of filtered worksWorkupdateWork(Work work, long userId)WorkupdateWorkCompleted(Long workId, boolean completed)update the completed property of the task of a work to completed or uncompletedWorkupdateWorkDraft(Work work, long userId)Updates a work draftWorkFlowupdateWorkFlow(WorkFlow workFlow, long userId)
-
-
-
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 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 ownerIdorg.exoplatform.commons.exception.ObjectNotFoundException- when ownerId doesn't exisits
-
getWorkFlow
WorkFlow getWorkFlow(long id) throws IllegalAccessException
- Throws:
IllegalAccessException
-
createWorkFlow
WorkFlow createWorkFlow(WorkFlow workFlow, long userId) throws IllegalAccessException
- 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
WorkFlow getWorkFlowByProjectId(long projectId)
-
createWork
Work createWork(Work work, long userId) throws IllegalAccessException
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
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 idisCompleted- : 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 idcompleted- work completed property, can be true or false- Returns:
Work
-
createWorkDraft
Work createWorkDraft(Work work, long userId) throws IllegalArgumentException
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
List<Work> getWorkDrafts(long userIdentityId, WorkFilter workFilter, int offset, int limit)
Retrieves a list of accessible WorkDraft, for a selected user
-
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:
ListofWorkStatus
-
getWorkById
Work getWorkById(long userIdentityId, Long workId)
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
-
-