Package com.flower.docs.service.api.task
Interface TaskService
-
- All Superinterfaces:
ComponentService<com.flower.docs.domain.task.Task>,CRUDService<com.flower.docs.domain.task.Task>,EditService<com.flower.docs.domain.task.Task>
public interface TaskService extends ComponentService<com.flower.docs.domain.task.Task>
Service dedicated toTaskmanagement- Author:
- shanthan SIVARAJAH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<com.flower.docs.domain.file.DocumentFile>addFiles(com.flower.docs.domain.common.Id id, java.util.List<com.flower.docs.domain.file.DocumentFile> files, boolean replace)Add multiple files to a taskvoidanswer(java.util.List<com.flower.docs.domain.common.Id> ids, com.flower.docs.domain.taskclass.Answer answer)Answers to multiple tasksvoidassign(java.util.List<com.flower.docs.domain.common.Id> ids, java.lang.String username)Assignes multiple tasks to a uservoiddeleteFiles(com.flower.docs.domain.common.Id id, java.util.List<com.flower.docs.domain.common.Id> files)Deletes files of a task.java.util.List<com.flower.docs.domain.file.DocumentFile>getFiles(com.flower.docs.domain.common.Id id, boolean includeContent)Get files of a task.-
Methods inherited from interface com.flower.docs.service.api.component.ComponentService
search
-
Methods inherited from interface com.flower.docs.service.api.common.CRUDService
create, delete, get, update
-
Methods inherited from interface com.flower.docs.service.api.component.EditService
edit, editNext
-
-
-
-
Method Detail
-
answer
void answer(java.util.List<com.flower.docs.domain.common.Id> ids, com.flower.docs.domain.taskclass.Answer answer) throws com.flower.docs.domain.exception.FunctionalException, com.flower.docs.domain.exception.TechnicalExceptionAnswers to multiple tasks- Parameters:
ids- The unique identifiers of the tasksanswer- The task answer. The answer should match with one of the task class- Throws:
com.flower.docs.domain.exception.FunctionalExceptioncom.flower.docs.domain.exception.TechnicalException
-
assign
void assign(java.util.List<com.flower.docs.domain.common.Id> ids, java.lang.String username) throws com.flower.docs.domain.exception.FunctionalException, com.flower.docs.domain.exception.TechnicalExceptionAssignes multiple tasks to a user- Parameters:
ids- The unique identifiers of the tasksusername- The username of new assignee- Throws:
com.flower.docs.domain.exception.FunctionalExceptioncom.flower.docs.domain.exception.TechnicalException
-
getFiles
java.util.List<com.flower.docs.domain.file.DocumentFile> getFiles(com.flower.docs.domain.common.Id id, boolean includeContent) throws com.flower.docs.domain.exception.TechnicalException, com.flower.docs.domain.exception.FunctionalExceptionGet files of a task.- Parameters:
id- The identifier of the task whose files are requestedIdentifiableElement.getId()includeContent- Determines if the file contents should be included or not- Returns:
- The requested files
- Throws:
com.flower.docs.domain.exception.TechnicalException- If a technical error occurred during processcom.flower.docs.domain.exception.FunctionalException- If a functional error occurred during process- See Also:
DocumentFile.getContent()
-
addFiles
java.util.List<com.flower.docs.domain.file.DocumentFile> addFiles(com.flower.docs.domain.common.Id id, java.util.List<com.flower.docs.domain.file.DocumentFile> files, boolean replace) throws com.flower.docs.domain.exception.TechnicalException, com.flower.docs.domain.exception.FunctionalExceptionAdd multiple files to a task- Parameters:
id- The task idfiles- The files to attachreplace- Determines if actual task files should be replaced by provided ones- Returns:
- The created files without their content
- Throws:
com.flower.docs.domain.exception.TechnicalException- If a technical error occurred during processcom.flower.docs.domain.exception.FunctionalException- If a functional error occurred during process
-
deleteFiles
void deleteFiles(com.flower.docs.domain.common.Id id, java.util.List<com.flower.docs.domain.common.Id> files) throws com.flower.docs.domain.exception.TechnicalException, com.flower.docs.domain.exception.FunctionalExceptionDeletes files of a task.- Parameters:
id- The task idIdentifiableElement.getId()files- The identifiers of files to deleteIdentifiableElement.getId()orTask#getfiles()- Throws:
com.flower.docs.domain.exception.TechnicalException- If a technical error occurred during processcom.flower.docs.domain.exception.FunctionalException- If a functional error occurred during process
-
-