Interface ProcessesStorage
public interface ProcessesStorage
-
Method Summary
Modifier and TypeMethodDescriptionintcountWorkFlows(ProcessesFilter processesFilter) intcountWorksByWorkflow(long projectId, boolean isCompleted) voiddeleteWorkById(Long workId) Delete a work by its given idvoiddeleteWorkDraftById(long id) Delete a work draft by its given idvoiddeleteWorkflowById(Long workflowId) Delete a workflow by its given Id.findAllWorkDraftsByUser(WorkFilter workFilter, int offset, int limit, long userIdentityId) Retrieves a list of accessible WorkDraft, for a selected user.findAllWorkFlows(int offset, int limit) findAllWorkFlowsByUser(ProcessesFilter filter, int offset, int limit, long userIdentityId) Retrieves a list of accessible WorkFlows, for a selected user, by applying the designated filter.findDisabledWorkFlows(int offset, int limit) Retrieves a list of disabled workflows, The returned results will be of typeWorkFlowonly.findEnabledWorkFlows(int offset, int limit) findEnabledWorkFlowsByUser(ProcessesFilter filter, int offset, int limit, long userIdentityId) findWorkFlows(ProcessesFilter processesFilter, long userIdentityId, int offset, int limit) Retrieves list fo filtered workflowsRetrieves the list of available statuses in all workflowsgetIllustrationImageById(Long illustrationId) Retrieves an illustration image by its given idgetWorkById(long id) getWorkById(long userIdentityId, long workId) Retrieves a Work by its given idgetWorkDraftyId(long id) Retrieves a work draft by its given idgetWorkFlowById(long id) getWorkFlowByProjectId(long projectId) getWorks(long userIdentityId, WorkFilter workFilter, int offset, int limit) Retrieves list of filtered worksSaving a work and deletes its related draft if it was created from draftsaveWorkDraft(Work work, long userId) Save a draft of a worksaveWorkFlow(WorkFlow workFlow, long userId) updateWorkCompleted(Long workId, boolean completed) update the completed property of the task of a work to completed or uncompleted
-
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 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
-
findEnabledWorkFlowsByUser
List<WorkFlow> findEnabledWorkFlowsByUser(ProcessesFilter filter, int offset, int limit, long userIdentityId) -
findAllWorkFlows
-
findEnabledWorkFlows
-
findDisabledWorkFlows
Retrieves a list of disabled workflows, The returned results will be of typeWorkFlowonly. -
getWorkFlowById
-
getWorkFlowByProjectId
-
saveWorkFlow
- Throws:
IllegalArgumentException
-
getWorks
List<Work> getWorks(long userIdentityId, WorkFilter workFilter, int offset, int limit) throws Exception Retrieves list of filtered works -
getWorkById
-
saveWork
Saving a work and deletes its related draft if it was created from draft- Parameters:
work- Work ObjectuserId- user Id- Returns:
Work- Throws:
IllegalArgumentException
-
deleteWorkflowById
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 idworkId- Work id- Returns:
Work- Throws:
jakarta.persistence.EntityNotFoundException
-
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
-
findAllWorkDraftsByUser
List<Work> findAllWorkDraftsByUser(WorkFilter workFilter, int offset, int limit, long userIdentityId) Retrieves a list of accessible WorkDraft, for a selected user. -
saveWorkDraft
Save a draft of a work- Parameters:
work- work draft objectuserId- user id of the creator- Returns:
Work
-
getWorkDraftyId
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:
ListofWorkStatus
-
findWorkFlows
List<WorkFlow> findWorkFlows(ProcessesFilter processesFilter, long userIdentityId, int offset, int limit) Retrieves list fo filtered workflows -
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
-
countWorkFlows
-