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
Modifier and TypeFieldDescriptionstatic final String
Attribute Assignmentsstatic final String
Attribute Attachmentsstatic final String
Attribute Authorstatic final String
Attribute CheckListstatic final String
Attribute IsChecked for checkListstatic final String
Attribute Label for checkListstatic final String
Attribute CloseAuthorstatic final String
Attribute CloseDatestatic final String
Attribute Creationdatestatic final String
Attribute Descriptionstatic final String
Attribute DueDatestatic final String
Attribute IsClosedstatic final String
Attribute Labelstatic final String
Attribute Lastmodifiedstatic final String
Attribute Startdatestatic final String
Attribute Tagsstatic final String
Attribute Taskidstatic final String
Attribute Taskidstatic final String
Attribute TaskidFields inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
PROTECTED_PROPERTIES
Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX
-
Constructor Summary
ConstructorDescriptionJCRTask
(javax.jcr.Node node, String parentPath, JCRTaskFactory factory) Default constructor for the JCRTask -
Method Summary
Modifier and TypeMethodDescriptionvoid
close
(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 theDataHolder
of 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 listboolean
isClosed()
True if the task is closedvoid
setAssignments
(List<UserIdentity> assignments) Set the list of user assigned to this taskvoid
setAttachments
(List<Binary> attachments) Set the attachments listvoid
setAuthor
(UserIdentity author) Set the author of this task.void
setCheckListItem
(List<Task.CheckItem> checkItems) Set the list of check itemvoid
setCloseAuthor
(UserIdentity author) Set the author who close the task.void
setCloseDate
(LocalDate closedDate) Set the task's date of closurevoid
setCreationDate
(ZonedDateTime creationDate) Set the post's creation date.void
setDescription
(String description) Set the description of the taskvoid
setDueDate
(LocalDate dueDate) Set the due date of the taskvoid
Set the label of the taskvoid
setLastModified
(ZonedDateTime lastModifiedDate) Set the post's modification date.void
setPosition
(Long position) Set the position into the task listvoid
setStartDate
(LocalDate startDate) Set the starting date of the taskvoid
setTasksListId
(String taskListId) Set the identifier of a tasks listvoid
Tags.void
Untags.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, switchToRevision
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
Methods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX
Methods inherited from interface org.ametys.cms.data.ametysobject.ModelAwareDataAwareAmetysObject
getSystemPropertyExtensionPoint, indexData, indexData
Methods 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, hasValueOrEmpty
Methods 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, isMultiple
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModifiableDataHolder
getRepositoryData
Methods inherited from interface org.ametys.cms.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getComposite, getComposite, getExternalComposite, getExternalComposite, getExternalRepeater, getExternalRepeater, getLocalComposite, getLocalComposite, getLocalRepeater, getLocalRepeater, getParentDataHolder, getRepeater, getRepeater, getRootDataHolder
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getRepositoryData, removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setComments, setExternalValue, setLocalValue, setStatus, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValues
Methods 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:Task
The identifier of a task list- Specified by:
getTaskListId
in interfaceTask
- Returns:
- The id
-
setTasksListId
Description copied from interface:Task
Set the identifier of a tasks list- Specified by:
setTasksListId
in interfaceTask
- Parameters:
taskListId
- The tasks list id
-
getPosition
Description copied from interface:Task
The position into the task list- Specified by:
getPosition
in interfaceTask
- Returns:
- The position
-
setPosition
Description copied from interface:Task
Set the position into the task list- Specified by:
setPosition
in interfaceTask
- Parameters:
position
- The position into the task list
-
getLabel
Description copied from interface:Task
The title of the task -
setLabel
Description copied from interface:Task
Set the label of the task -
getDescription
Description copied from interface:Task
The description of the task- Specified by:
getDescription
in interfaceTask
- Returns:
- The description
-
setDescription
Description copied from interface:Task
Set the description of the task- Specified by:
setDescription
in interfaceTask
- Parameters:
description
- The description
-
getStartDate
Description copied from interface:Task
The starting date of the task- Specified by:
getStartDate
in interfaceTask
- Returns:
- The start date
-
setStartDate
Description copied from interface:Task
Set the starting date of the task- Specified by:
setStartDate
in interfaceTask
- Parameters:
startDate
- The start date
-
getDueDate
Description copied from interface:Task
The due date of the task- Specified by:
getDueDate
in interfaceTask
- Returns:
- The due date
-
setDueDate
Description copied from interface:Task
Set the due date of the task- Specified by:
setDueDate
in interfaceTask
- Parameters:
dueDate
- The due date
-
isClosed
Description copied from interface:Task
True if the task is closed -
close
Description copied from interface:Task
Close the task -
getCloseAuthor
Description copied from interface:Task
Get the author who close the task- Specified by:
getCloseAuthor
in interfaceTask
- Returns:
- the author who close the task
-
setCloseAuthor
Description copied from interface:Task
Set the author who close the task.- Specified by:
setCloseAuthor
in interfaceTask
- Parameters:
author
- the author
-
getCloseDate
Description copied from interface:Task
Get the task's date of closure- Specified by:
getCloseDate
in interfaceTask
- Returns:
- the task's date of closure
-
setCloseDate
Description copied from interface:Task
Set the task's date of closure- Specified by:
setCloseDate
in interfaceTask
- Parameters:
closedDate
- The date of closure
-
getAuthor
Description copied from interface:Task
Get the author of the task -
setAuthor
Description copied from interface:Task
Set the author of this task. -
getAssignments
Description copied from interface:Task
Get the list of user assigned to this task- Specified by:
getAssignments
in interfaceTask
- Returns:
- The assignment list
-
setAssignments
Description copied from interface:Task
Set the list of user assigned to this task- Specified by:
setAssignments
in interfaceTask
- Parameters:
assignments
- The assignment list
-
getCreationDate
Description copied from interface:Task
Get the task's creation date.- Specified by:
getCreationDate
in interfaceTask
- Returns:
- the task's creation date.
-
setCreationDate
Description copied from interface:Task
Set the post's creation date.- Specified by:
setCreationDate
in interfaceTask
- Parameters:
creationDate
- the post's creation date.
-
getLastModified
Description copied from interface:Task
Get the task's last modification date.- Specified by:
getLastModified
in interfaceTask
- Returns:
- the task's last modification date.
-
setLastModified
Description copied from interface:Task
Set the post's modification date.- Specified by:
setLastModified
in interfaceTask
- Parameters:
lastModifiedDate
- the last modification date to set.
-
getAttachments
Description copied from interface:AttachableAmetysObject
Get the attachments list- Specified by:
getAttachments
in interfaceAttachableAmetysObject
- Returns:
- the attachments list
-
setAttachments
Description copied from interface:AttachableAmetysObject
Set the attachments list- Specified by:
setAttachments
in interfaceAttachableAmetysObject
- Parameters:
attachments
- the attachments list
-
tag
Description copied from interface:TaggableAmetysObject
Tags.- Specified by:
tag
in interfaceTaggableAmetysObject
- Parameters:
tag
- the tag to add.- Throws:
AmetysRepositoryException
- if an error occurs.
-
untag
Description copied from interface:TaggableAmetysObject
Untags.- Specified by:
untag
in interfaceTaggableAmetysObject
- Parameters:
tag
- the tag to remove.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getTags
Description copied from interface:TagAwareAmetysObject
Retrieves current tags.- Specified by:
getTags
in interfaceTagAwareAmetysObject
- Returns:
- the current tags.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getCheckList
Description copied from interface:Task
Get the task's check list- Specified by:
getCheckList
in interfaceTask
- Returns:
- the task's check list
-
setCheckListItem
Description copied from interface:Task
Set the list of check item- Specified by:
setCheckListItem
in interfaceTask
- Parameters:
checkItems
- the list of check item
-
createComment
Description copied from interface:CommentableAmetysObject
Creates a comment- Specified by:
createComment
in interfaceCommentableAmetysObject<Comment>
- Returns:
- The new comment
-
createComment
Description copied from interface:CommentableAmetysObject
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. Be careful using this method- Specified by:
createComment
in interfaceCommentableAmetysObject<Comment>
- Parameters:
commentId
- the comment's idcreationDate
- the comment's creation date- Returns:
- the new comment
-
getComment
Description copied from interface:CommentableAmetysObject
Get a comment- Specified by:
getComment
in 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:CommentableAmetysObject
Get the list of available comments (validated, not validated, both or none :))- Specified by:
getComments
in 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:DataAwareAmetysObject
Returns theDataHolder
of thisAmetysObject
.- Specified by:
getDataHolder
in interfaceDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelAwareDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelAwareDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModifiableModelAwareDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModifiableModelAwareDataAwareAmetysObject
- Returns:
- the
DataHolder
of thisAmetysObject
-