Class StatusServiceImpl
- java.lang.Object
-
- org.exoplatform.task.service.impl.StatusServiceImpl
-
- All Implemented Interfaces:
StatusService
@Singleton public class StatusServiceImpl extends Object implements StatusService
-
-
Constructor Summary
Constructors Constructor Description StatusServiceImpl(DAOHandler daoHandler)StatusServiceImpl(DAOHandler daoHandler, StatusStorage statusStorage, ProjectStorage projectStorage, org.exoplatform.services.listener.ListenerService listenerService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateInitialStatuses(ProjectDto proj)Create initial statuses for givenproject.StatusDtocreateStatus(ProjectDto project, String name)StatusDtocreateStatus(ProjectDto project, String name, int rank)StatusDtogetDefaultStatus(long projectId)Return the default status of the project which is ideally the first step in the project workflow.StatusDtogetStatus(long statusId)Return theStatuswith givenstatusId.List<StatusDto>getStatuses(long projectId)Return the list of statuses from a project with givenprojectId.voidremoveStatus(long statusID)StatusDtoupdateStatus(long id, String name)StatusDtoupdateStatus(StatusDto statusDto)
-
-
-
Constructor Detail
-
StatusServiceImpl
public StatusServiceImpl(DAOHandler daoHandler, StatusStorage statusStorage, ProjectStorage projectStorage, org.exoplatform.services.listener.ListenerService listenerService)
-
StatusServiceImpl
public StatusServiceImpl(DAOHandler daoHandler)
-
-
Method Detail
-
createInitialStatuses
public void createInitialStatuses(ProjectDto proj)
Description copied from interface:StatusServiceCreate initial statuses for givenproject.The initial statuses can be configured via a system exo property
exo.tasks.default.status. If it's not configured, the default{"To Do", "In Progress", "Waiting On", "Done"}will be used.- Specified by:
createInitialStatusesin interfaceStatusService- Parameters:
proj- The given project.
-
getStatus
public StatusDto getStatus(long statusId)
Description copied from interface:StatusServiceReturn theStatuswith givenstatusId.- Specified by:
getStatusin interfaceStatusService- Parameters:
statusId- The status id.- Returns:
- The status of the given statusId.
-
getDefaultStatus
public StatusDto getDefaultStatus(long projectId)
Description copied from interface:StatusServiceReturn the default status of the project which is ideally the first step in the project workflow.- Specified by:
getDefaultStatusin interfaceStatusService- Parameters:
projectId- The project id.- Returns:
- The default status of the given project.
-
getStatuses
public List<StatusDto> getStatuses(long projectId)
Description copied from interface:StatusServiceReturn the list of statuses from a project with givenprojectId.- Specified by:
getStatusesin interfaceStatusService- Parameters:
projectId- The project id.- Returns:
- The status of the given project.
-
createStatus
public StatusDto createStatus(ProjectDto project, String name)
- Specified by:
createStatusin interfaceStatusService
-
createStatus
public StatusDto createStatus(ProjectDto project, String name, int rank) throws NotAllowedOperationOnEntityException
- Specified by:
createStatusin interfaceStatusService- Throws:
NotAllowedOperationOnEntityException
-
removeStatus
public void removeStatus(long statusID) throws Exception- Specified by:
removeStatusin interfaceStatusService- Throws:
Exception
-
updateStatus
public StatusDto updateStatus(long id, String name) throws EntityNotFoundException, NotAllowedOperationOnEntityException
- Specified by:
updateStatusin interfaceStatusService- Throws:
EntityNotFoundExceptionNotAllowedOperationOnEntityException
-
updateStatus
public StatusDto updateStatus(StatusDto statusDto) throws EntityNotFoundException, NotAllowedOperationOnEntityException
- Specified by:
updateStatusin interfaceStatusService- Throws:
EntityNotFoundExceptionNotAllowedOperationOnEntityException
-
-