Interface ProcessesStorage
-
public interface ProcessesStorage
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.List<Work>findAllWorkDraftsByUser(WorkFilter workFilter, int offset, int limit, long userIdentityId)Retrieves a list of accessible WorkDraft, for a selected user.List<WorkFlow>findAllWorkFlows(int offset, int limit)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.List<WorkFlow>findDisabledWorkFlows(int offset, int limit)Retrieves a list of disabled workflows, The returned results will be of typeWorkFlowonly.List<WorkFlow>findEnabledWorkFlows(int offset, int limit)List<WorkFlow>findEnabledWorkFlowsByUser(ProcessesFilter filter, int offset, int limit, long userIdentityId)List<WorkFlow>findWorkFlows(ProcessesFilter processesFilter, int offset, int limit)Retrieves list fo filtered workflowsList<WorkStatus>getAvailableWorkStatuses()Retrieves the list of available statuses in all workflowsIllustrativeAttachmentgetIllustrationImageById(Long illustrationId)Retrieves an illustration image by its given idWorkgetWorkById(long id)WorkgetWorkById(long userIdentityId, long workId)Retrieves a Work by its given idWorkgetWorkDraftyId(long id)Retrieves a work draft by its given idWorkFlowgetWorkFlowById(long id)WorkFlowgetWorkFlowByProjectId(long projectId)List<Work>getWorks(long userIdentityId, WorkFilter workFilter, int offset, int limit)Retrieves list of filtered worksWorksaveWork(Work work, long userId)Saving a work and deletes its related draft if it was created from draftWorksaveWorkDraft(Work work, long userId)Save a draft of a workWorkFlowsaveWorkFlow(WorkFlow workFlow, long userId)WorkupdateWorkCompleted(Long workId, boolean completed)update the completed property of the task of a work to completed or uncompleted
-
-
-
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 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
-
findEnabledWorkFlowsByUser
List<WorkFlow> findEnabledWorkFlowsByUser(ProcessesFilter filter, int offset, int limit, long userIdentityId)
-
findDisabledWorkFlows
List<WorkFlow> findDisabledWorkFlows(int offset, int limit)
Retrieves a list of disabled workflows, The returned results will be of typeWorkFlowonly.
-
getWorkFlowById
WorkFlow getWorkFlowById(long id)
-
getWorkFlowByProjectId
WorkFlow getWorkFlowByProjectId(long projectId)
-
saveWorkFlow
WorkFlow saveWorkFlow(WorkFlow workFlow, long userId) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getWorks
List<Work> getWorks(long userIdentityId, WorkFilter workFilter, int offset, int limit) throws Exception
Retrieves list of filtered works
-
getWorkById
Work getWorkById(long id)
-
saveWork
Work saveWork(Work work, long userId) throws IllegalArgumentException
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
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 idworkId- Work id- Returns:
Work- Throws:
javax.persistence.EntityNotFoundException
-
countWorksByWorkflow
int countWorksByWorkflow(long projectId, boolean isCompleted) throws Exception- Parameters:
projectId- : Tasks project idisCompleted- : 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 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
Work saveWorkDraft(Work work, long userId)
Save a draft of a work- Parameters:
work- work draft objectuserId- 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.EntityNotFoundExceptionDelete 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:
ListofWorkStatus
-
findWorkFlows
List<WorkFlow> findWorkFlows(ProcessesFilter processesFilter, 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
-
-