Class ProcessesStorageImpl

java.lang.Object
org.exoplatform.processes.storage.ProcessesStorageImpl
All Implemented Interfaces:
org.exoplatform.processes.storage.ProcessesStorage

public class ProcessesStorageImpl extends Object implements org.exoplatform.processes.storage.ProcessesStorage
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProcessesStorageImpl(WorkFlowDAO workFlowDAO, WorkDraftDAO workDraftDAO, org.exoplatform.task.service.TaskService taskService, org.exoplatform.task.service.ProjectService projectService, org.exoplatform.task.service.StatusService statusService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.services.listener.ListenerService listenerService, org.exoplatform.processes.service.ProcessesAttachmentService processesAttachmentService, org.exoplatform.commons.file.services.FileService fileService, org.exoplatform.services.organization.OrganizationService organizationService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    countWorkFlows(org.exoplatform.processes.model.ProcessesFilter processesFilter)
    int
    countWorksByWorkflow(long projectId, boolean isCompleted)
    void
    void
    void
    List<org.exoplatform.processes.model.Work>
    findAllWorkDraftsByUser(org.exoplatform.processes.model.WorkFilter workFilter, int offset, int limit, long userIdentityId)
    List<org.exoplatform.processes.model.WorkFlow>
    findAllWorkFlows(int offset, int limit)
     
    List<org.exoplatform.processes.model.WorkFlow>
    findAllWorkFlowsByUser(org.exoplatform.processes.model.ProcessesFilter filter, int offset, int limit, long userIdentityId)
     
    List<org.exoplatform.processes.model.WorkFlow>
    findDisabledWorkFlows(int offset, int limit)
     
    List<org.exoplatform.processes.model.WorkFlow>
    findEnabledWorkFlows(int offset, int limit)
     
    List<org.exoplatform.processes.model.WorkFlow>
    findEnabledWorkFlowsByUser(org.exoplatform.processes.model.ProcessesFilter filter, int offset, int limit, long userIdentityId)
     
    List<org.exoplatform.processes.model.WorkFlow>
    findWorkFlows(org.exoplatform.processes.model.ProcessesFilter processesFilter, long userIdentityId, int offset, int limit)
    List<org.exoplatform.processes.model.WorkStatus>
    org.exoplatform.processes.model.IllustrativeAttachment
    org.exoplatform.processes.model.Work
    getWorkById(long id)
     
    org.exoplatform.processes.model.Work
    getWorkById(long userIdentityId, long workId)
     
    org.exoplatform.processes.model.Work
    getWorkDraftyId(long id)
    org.exoplatform.processes.model.WorkFlow
    getWorkFlowById(long id)
     
    org.exoplatform.processes.model.WorkFlow
    getWorkFlowByProjectId(long projectId)
     
    List<org.exoplatform.processes.model.Work>
    getWorks(long userIdentityId, org.exoplatform.processes.model.WorkFilter workFilter, int offset, int limit)
     
    org.exoplatform.processes.model.Work
    saveWork(org.exoplatform.processes.model.Work work, long userId)
     
    org.exoplatform.processes.model.Work
    saveWorkDraft(org.exoplatform.processes.model.Work work, long userId)
    org.exoplatform.processes.model.WorkFlow
    saveWorkFlow(org.exoplatform.processes.model.WorkFlow workFlow, long userId)
     
    org.exoplatform.processes.model.Work
    updateWorkCompleted(Long workId, boolean completed)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProcessesStorageImpl

      public ProcessesStorageImpl(WorkFlowDAO workFlowDAO, WorkDraftDAO workDraftDAO, org.exoplatform.task.service.TaskService taskService, org.exoplatform.task.service.ProjectService projectService, org.exoplatform.task.service.StatusService statusService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.services.listener.ListenerService listenerService, org.exoplatform.processes.service.ProcessesAttachmentService processesAttachmentService, org.exoplatform.commons.file.services.FileService fileService, org.exoplatform.services.organization.OrganizationService organizationService)
  • Method Details

    • findAllWorkFlowsByUser

      public List<org.exoplatform.processes.model.WorkFlow> findAllWorkFlowsByUser(org.exoplatform.processes.model.ProcessesFilter filter, int offset, int limit, long userIdentityId)
      Specified by:
      findAllWorkFlowsByUser in interface org.exoplatform.processes.storage.ProcessesStorage
    • findEnabledWorkFlowsByUser

      public List<org.exoplatform.processes.model.WorkFlow> findEnabledWorkFlowsByUser(org.exoplatform.processes.model.ProcessesFilter filter, int offset, int limit, long userIdentityId)
      Specified by:
      findEnabledWorkFlowsByUser in interface org.exoplatform.processes.storage.ProcessesStorage
    • findAllWorkFlows

      public List<org.exoplatform.processes.model.WorkFlow> findAllWorkFlows(int offset, int limit)
      Specified by:
      findAllWorkFlows in interface org.exoplatform.processes.storage.ProcessesStorage
    • findEnabledWorkFlows

      public List<org.exoplatform.processes.model.WorkFlow> findEnabledWorkFlows(int offset, int limit)
      Specified by:
      findEnabledWorkFlows in interface org.exoplatform.processes.storage.ProcessesStorage
    • findDisabledWorkFlows

      public List<org.exoplatform.processes.model.WorkFlow> findDisabledWorkFlows(int offset, int limit)
      Specified by:
      findDisabledWorkFlows in interface org.exoplatform.processes.storage.ProcessesStorage
    • getWorkFlowById

      public org.exoplatform.processes.model.WorkFlow getWorkFlowById(long id)
      Specified by:
      getWorkFlowById in interface org.exoplatform.processes.storage.ProcessesStorage
    • getWorkFlowByProjectId

      public org.exoplatform.processes.model.WorkFlow getWorkFlowByProjectId(long projectId)
      Specified by:
      getWorkFlowByProjectId in interface org.exoplatform.processes.storage.ProcessesStorage
    • saveWorkFlow

      public org.exoplatform.processes.model.WorkFlow saveWorkFlow(org.exoplatform.processes.model.WorkFlow workFlow, long userId) throws IllegalArgumentException
      Specified by:
      saveWorkFlow in interface org.exoplatform.processes.storage.ProcessesStorage
      Throws:
      IllegalArgumentException
    • getIllustrationImageById

      public org.exoplatform.processes.model.IllustrativeAttachment getIllustrationImageById(Long illustrationId) throws org.exoplatform.commons.file.services.FileStorageException, org.exoplatform.commons.exception.ObjectNotFoundException, IOException
      Specified by:
      getIllustrationImageById in interface org.exoplatform.processes.storage.ProcessesStorage
      Throws:
      org.exoplatform.commons.file.services.FileStorageException
      org.exoplatform.commons.exception.ObjectNotFoundException
      IOException
    • getWorks

      public List<org.exoplatform.processes.model.Work> getWorks(long userIdentityId, org.exoplatform.processes.model.WorkFilter workFilter, int offset, int limit) throws Exception
      Specified by:
      getWorks in interface org.exoplatform.processes.storage.ProcessesStorage
      Throws:
      Exception
    • getWorkById

      public org.exoplatform.processes.model.Work getWorkById(long userIdentityId, long workId)
      Specified by:
      getWorkById in interface org.exoplatform.processes.storage.ProcessesStorage
    • countWorksByWorkflow

      public int countWorksByWorkflow(long projectId, boolean isCompleted) throws Exception
      Specified by:
      countWorksByWorkflow in interface org.exoplatform.processes.storage.ProcessesStorage
      Throws:
      Exception
    • getWorkById

      public org.exoplatform.processes.model.Work getWorkById(long id)
      Specified by:
      getWorkById in interface org.exoplatform.processes.storage.ProcessesStorage
    • saveWork

      public org.exoplatform.processes.model.Work saveWork(org.exoplatform.processes.model.Work work, long userId) throws IllegalArgumentException
      Specified by:
      saveWork in interface org.exoplatform.processes.storage.ProcessesStorage
      Throws:
      IllegalArgumentException
    • deleteWorkflowById

      public void deleteWorkflowById(Long workflowId) throws javax.persistence.EntityNotFoundException
      Specified by:
      deleteWorkflowById in interface org.exoplatform.processes.storage.ProcessesStorage
      Throws:
      javax.persistence.EntityNotFoundException
    • deleteWorkById

      public void deleteWorkById(Long workId)
      Specified by:
      deleteWorkById in interface org.exoplatform.processes.storage.ProcessesStorage
    • updateWorkCompleted

      public org.exoplatform.processes.model.Work updateWorkCompleted(Long workId, boolean completed)
      Specified by:
      updateWorkCompleted in interface org.exoplatform.processes.storage.ProcessesStorage
    • findAllWorkDraftsByUser

      public List<org.exoplatform.processes.model.Work> findAllWorkDraftsByUser(org.exoplatform.processes.model.WorkFilter workFilter, int offset, int limit, long userIdentityId)
      Specified by:
      findAllWorkDraftsByUser in interface org.exoplatform.processes.storage.ProcessesStorage
    • saveWorkDraft

      public org.exoplatform.processes.model.Work saveWorkDraft(org.exoplatform.processes.model.Work work, long userId)
      Specified by:
      saveWorkDraft in interface org.exoplatform.processes.storage.ProcessesStorage
    • getWorkDraftyId

      public org.exoplatform.processes.model.Work getWorkDraftyId(long id)
      Specified by:
      getWorkDraftyId in interface org.exoplatform.processes.storage.ProcessesStorage
    • deleteWorkDraftById

      public void deleteWorkDraftById(long id) throws javax.persistence.EntityNotFoundException
      Specified by:
      deleteWorkDraftById in interface org.exoplatform.processes.storage.ProcessesStorage
      Throws:
      javax.persistence.EntityNotFoundException
    • getAvailableWorkStatuses

      public List<org.exoplatform.processes.model.WorkStatus> getAvailableWorkStatuses()
      Specified by:
      getAvailableWorkStatuses in interface org.exoplatform.processes.storage.ProcessesStorage
    • findWorkFlows

      public List<org.exoplatform.processes.model.WorkFlow> findWorkFlows(org.exoplatform.processes.model.ProcessesFilter processesFilter, long userIdentityId, int offset, int limit)
      Specified by:
      findWorkFlows in interface org.exoplatform.processes.storage.ProcessesStorage
    • countWorkFlows

      public int countWorkFlows(org.exoplatform.processes.model.ProcessesFilter processesFilter)
      Specified by:
      countWorkFlows in interface org.exoplatform.processes.storage.ProcessesStorage