Class JCRTask
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
org.ametys.plugins.repository.jcr.DefaultAmetysObject<JCRTaskFactory>
org.ametys.plugins.workspaces.tasks.jcr.JCRTask
- All Implemented Interfaces:
ModelAwareDataAwareAmetysObject,ModifiableModelAwareDataAwareAmetysObject,IndexableDataHolder,ModifiableIndexableDataHolder,AttachableAmetysObject,CommentableAmetysObject<Comment>,ACLAmetysObject,AmetysObject,DataAwareAmetysObject,ModelAwareDataAwareAmetysObject,ModifiableModelAwareDataAwareAmetysObject,DataHolder,ModelAwareDataHolder,ModifiableDataHolder,ModifiableModelAwareDataHolder,JCRAmetysObject,MetadataAwareAmetysObject,ModifiableMetadataAwareAmetysObject,ModifiableACLAmetysObject,ModifiableAmetysObject,RemovableAmetysObject,TagAwareAmetysObject,TaggableAmetysObject,DataAndVersionAwareAmetysObject,ModifiableDataAwareVersionableAmetysObject,VersionableAmetysObject,VersionAwareAmetysObject,Task
JCR implementation of a task
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.plugins.workspaces.tasks.Task
Task.CheckItem -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAttribute Assignmentsstatic final StringAttribute Attachmentsstatic final StringAttribute Authorstatic final StringAttribute CheckListstatic final StringAttribute IsChecked for checkListstatic final StringAttribute Label for checkListstatic final StringAttribute CloseAuthorstatic final StringAttribute CloseDatestatic final StringAttribute Creationdatestatic final StringAttribute Descriptionstatic final StringAttribute DueDatestatic final StringAttribute IsClosedstatic final StringAttribute Labelstatic final StringAttribute Lastmodifiedstatic final StringAttribute Startdatestatic final StringAttribute Tagsstatic final StringAttribute Taskidstatic final StringAttribute Taskidstatic final StringAttribute TaskidFields inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
__VERSION_COMPARATOR, PROTECTED_PROPERTIESFields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX -
Constructor Summary
ConstructorsConstructorDescriptionJCRTask(javax.jcr.Node node, String parentPath, JCRTaskFactory factory) Default constructor for the JCRTask -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(boolean isClosed) Close the taskCreates a commentcreateComment(String commentId, ZonedDateTime creationDate) Creates a comment with the given id and creation date This method allow to create a comment from existing data (ex: data import from archive) The id is not generated here, the source is trusted.Get the list of user assigned to this taskGet the attachments listGet the author of the taskGet the task's check listGet the author who close the taskGet the task's date of closuregetComment(String commentId) Get a commentgetComments(boolean includeNotValidatedComments, boolean includeValidatedComments) Get the list of available comments (validated, not validated, both or none :))Get the task's creation date.Returns theDataHolderof thisAmetysObject.The description of the taskThe due date of the taskgetLabel()The title of the taskGet the task's last modification date.The position into the task listThe starting date of the taskgetTags()Retrieves current tags.The identifier of a task listbooleanisClosed()True if the task is closedvoidsetAssignments(List<UserIdentity> assignments) Set the list of user assigned to this taskvoidsetAttachments(List<Binary> attachments) Set the attachments listvoidsetAuthor(UserIdentity author) Set the author of this task.voidsetCheckListItem(List<Task.CheckItem> checkItems) Set the list of check itemvoidsetCloseAuthor(UserIdentity author) Set the author who close the task.voidsetCloseDate(LocalDate closedDate) Set the task's date of closurevoidsetCreationDate(ZonedDateTime creationDate) Set the post's creation date.voidsetDescription(String description) Set the description of the taskvoidsetDueDate(LocalDate dueDate) Set the due date of the taskvoidSet the label of the taskvoidsetLastModified(ZonedDateTime lastModifiedDate) Set the post's modification date.voidsetPosition(Long position) Set the position into the task listvoidsetStartDate(LocalDate startDate) Set the starting date of the taskvoidsetTasksListId(String taskListId) Set the identifier of a tasks listvoidTags.voidUntags.Methods inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, addLabel, checkpoint, copyNode, disallowInheritance, getAllLabels, getAllRevisions, getBaseNode, getBaseVersion, getLabels, getLabels, getNode, getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, getRevision, getRevisionTimestamp, getRevisionTimestamp, getUnversionedDataHolder, getVersionHistory, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers, removeLabel, restoreFromLabel, restoreFromNode, restoreFromRevision, switchToLabel, switchToRevisionMethods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChangesMethods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCodeMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAXMethods inherited from interface org.ametys.cms.data.ametysobject.ModelAwareDataAwareAmetysObject
getSystemPropertyExtensionPoint, indexData, indexDataMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelAwareDataAwareAmetysObject
dataToJSON, dataToJSONForEdition, dataToMap, dataToSAX, dataToSAXForEdition, getComments, getDataNames, getDefinition, getDifferences, getDifferences, getDifferences, getDifferences, getExternalValue, getLocalValue, getModel, getStatus, getValue, getValue, hasComments, hasDefinition, hasDifferences, hasDifferences, hasDifferences, hasDifferences, hasExternalValue, hasExternalValueOrEmpty, hasLocalValue, hasLocalValueOrEmpty, hasValue, hasValueOrEmptyMethods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
commentsToSAX, dataToJSON, dataToJSON, dataToJSON, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, getDataNames, getType, getValue, hasValue, hasValueOrEmpty, isMultipleMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChangesMethods inherited from interface org.ametys.plugins.repository.data.holder.ModifiableDataHolder
getRepositoryDataMethods inherited from interface org.ametys.cms.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getComposite, getComposite, getExternalComposite, getExternalComposite, getExternalRepeater, getExternalRepeater, getLocalComposite, getLocalComposite, getLocalRepeater, getLocalRepeater, getParentDataHolder, getRepeater, getRepeater, getRootDataHolderMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getRepositoryData, removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setComments, setExternalValue, setLocalValue, setStatus, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValuesMethods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
-
Field Details
-
ATTRIBUTE_TASK_ID
Attribute Taskid- See Also:
-
ATTRIBUTE_TASKSLISTID
Attribute Taskid- See Also:
-
ATTRIBUTE_TASKSLISTPOSITION
Attribute Taskid- See Also:
-
ATTRIBUTE_LABEL
Attribute Label- See Also:
-
ATTRIBUTE_DESCRIPTION
Attribute Description- See Also:
-
ATTRIBUTE_STARTDATE
Attribute Startdate- See Also:
-
ATTRIBUTE_DUEDATE
Attribute DueDate- See Also:
-
ATTRIBUTE_ISCLOSED
Attribute IsClosed- See Also:
-
ATTRIBUTE_CLOSEDATE
Attribute CloseDate- See Also:
-
ATTRIBUTE_CLOSEAUTHOR
Attribute CloseAuthor- See Also:
-
ATTRIBUTE_AUTHOR
Attribute Author- See Also:
-
ATTRIBUTE_ASSIGNMENTS
Attribute Assignments- See Also:
-
ATTRIBUTE_CREATIONDATE
Attribute Creationdate- See Also:
-
ATTRIBUTE_LASTMODIFIED
Attribute Lastmodified- See Also:
-
ATTRIBUTE_ATTACHMENTS
Attribute Attachments- See Also:
-
ATTRIBUTE_CHECKLIST
Attribute CheckList- See Also:
-
ATTRIBUTE_CHECKLIST_LABEL
Attribute Label for checkList- See Also:
-
ATTRIBUTE_CHECKLIST_ISCHECKED
Attribute IsChecked for checkList- See Also:
-
ATTRIBUTE_TAGS
Attribute Tags- See Also:
-
-
Constructor Details
-
JCRTask
Default constructor for the JCRTask- Parameters:
node- The task nodeparentPath- The parent pathfactory- The factory
-
-
Method Details
-
getTaskListId
Description copied from interface:TaskThe identifier of a task list- Specified by:
getTaskListIdin interfaceTask- Returns:
- The id
-
setTasksListId
Description copied from interface:TaskSet the identifier of a tasks list- Specified by:
setTasksListIdin interfaceTask- Parameters:
taskListId- The tasks list id
-
getPosition
Description copied from interface:TaskThe position into the task list- Specified by:
getPositionin interfaceTask- Returns:
- The position
-
setPosition
Description copied from interface:TaskSet the position into the task list- Specified by:
setPositionin interfaceTask- Parameters:
position- The position into the task list
-
getLabel
Description copied from interface:TaskThe title of the task -
setLabel
Description copied from interface:TaskSet the label of the task -
getDescription
Description copied from interface:TaskThe description of the task- Specified by:
getDescriptionin interfaceTask- Returns:
- The description
-
setDescription
Description copied from interface:TaskSet the description of the task- Specified by:
setDescriptionin interfaceTask- Parameters:
description- The description
-
getStartDate
Description copied from interface:TaskThe starting date of the task- Specified by:
getStartDatein interfaceTask- Returns:
- The start date
-
setStartDate
Description copied from interface:TaskSet the starting date of the task- Specified by:
setStartDatein interfaceTask- Parameters:
startDate- The start date
-
getDueDate
Description copied from interface:TaskThe due date of the task- Specified by:
getDueDatein interfaceTask- Returns:
- The due date
-
setDueDate
Description copied from interface:TaskSet the due date of the task- Specified by:
setDueDatein interfaceTask- Parameters:
dueDate- The due date
-
isClosed
Description copied from interface:TaskTrue if the task is closed -
close
Description copied from interface:TaskClose the task -
getCloseAuthor
Description copied from interface:TaskGet the author who close the task- Specified by:
getCloseAuthorin interfaceTask- Returns:
- the author who close the task
-
setCloseAuthor
Description copied from interface:TaskSet the author who close the task.- Specified by:
setCloseAuthorin interfaceTask- Parameters:
author- the author
-
getCloseDate
Description copied from interface:TaskGet the task's date of closure- Specified by:
getCloseDatein interfaceTask- Returns:
- the task's date of closure
-
setCloseDate
Description copied from interface:TaskSet the task's date of closure- Specified by:
setCloseDatein interfaceTask- Parameters:
closedDate- The date of closure
-
getAuthor
Description copied from interface:TaskGet the author of the task -
setAuthor
Description copied from interface:TaskSet the author of this task. -
getAssignments
Description copied from interface:TaskGet the list of user assigned to this task- Specified by:
getAssignmentsin interfaceTask- Returns:
- The assignment list
-
setAssignments
Description copied from interface:TaskSet the list of user assigned to this task- Specified by:
setAssignmentsin interfaceTask- Parameters:
assignments- The assignment list
-
getCreationDate
Description copied from interface:TaskGet the task's creation date.- Specified by:
getCreationDatein interfaceTask- Returns:
- the task's creation date.
-
setCreationDate
Description copied from interface:TaskSet the post's creation date.- Specified by:
setCreationDatein interfaceTask- Parameters:
creationDate- the post's creation date.
-
getLastModified
Description copied from interface:TaskGet the task's last modification date.- Specified by:
getLastModifiedin interfaceTask- Returns:
- the task's last modification date.
-
setLastModified
Description copied from interface:TaskSet the post's modification date.- Specified by:
setLastModifiedin interfaceTask- Parameters:
lastModifiedDate- the last modification date to set.
-
getAttachments
Description copied from interface:AttachableAmetysObjectGet the attachments list- Specified by:
getAttachmentsin interfaceAttachableAmetysObject- Returns:
- the attachments list
-
setAttachments
Description copied from interface:AttachableAmetysObjectSet the attachments list- Specified by:
setAttachmentsin interfaceAttachableAmetysObject- Parameters:
attachments- the attachments list
-
tag
Description copied from interface:TaggableAmetysObjectTags.- Specified by:
tagin interfaceTaggableAmetysObject- Parameters:
tag- the tag to add.- Throws:
AmetysRepositoryException- if an error occurs.
-
untag
Description copied from interface:TaggableAmetysObjectUntags.- Specified by:
untagin interfaceTaggableAmetysObject- Parameters:
tag- the tag to remove.- Throws:
AmetysRepositoryException- if an error occurs.
-
getTags
Description copied from interface:TagAwareAmetysObjectRetrieves current tags.- Specified by:
getTagsin interfaceTagAwareAmetysObject- Returns:
- the current tags.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getCheckList
Description copied from interface:TaskGet the task's check list- Specified by:
getCheckListin interfaceTask- Returns:
- the task's check list
-
setCheckListItem
Description copied from interface:TaskSet the list of check item- Specified by:
setCheckListItemin interfaceTask- Parameters:
checkItems- the list of check item
-
createComment
Description copied from interface:CommentableAmetysObjectCreates a comment- Specified by:
createCommentin interfaceCommentableAmetysObject<Comment>- Returns:
- The new comment
-
createComment
Description copied from interface:CommentableAmetysObjectCreates a comment with the given id and creation date This method allow to create a comment from existing data (ex: data import from archive) The id is not generated here, the source is trusted. Be careful using this method- Specified by:
createCommentin interfaceCommentableAmetysObject<Comment>- Parameters:
commentId- the comment's idcreationDate- the comment's creation date- Returns:
- the new comment
-
getComment
Description copied from interface:CommentableAmetysObjectGet a comment- Specified by:
getCommentin interfaceCommentableAmetysObject<Comment>- Parameters:
commentId- The comment- Returns:
- The comment
- Throws:
AmetysRepositoryException- if error occurs
-
getComments
public List<Comment> getComments(boolean includeNotValidatedComments, boolean includeValidatedComments) throws AmetysRepositoryException Description copied from interface:CommentableAmetysObjectGet the list of available comments (validated, not validated, both or none :))- Specified by:
getCommentsin interfaceCommentableAmetysObject<Comment>- Parameters:
includeNotValidatedComments- true to get the non validated comments.includeValidatedComments- true to get the validated comment.- Returns:
- A non null list of comments on the ametys object.
- Throws:
AmetysRepositoryException- if an error occurred
-
getDataHolder
Description copied from interface:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
getDataHolderin interfaceDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelAwareDataAwareAmetysObject- Returns:
- the
DataHolderof thisAmetysObject
-