Interface Thread
- All Superinterfaces:
AmetysObject
,AttachableAmetysObject
,CommentableAmetysObject<RichTextComment>
,DataAwareAmetysObject
,DataHolder
,IndexableDataHolder
,ModelAwareDataAwareAmetysObject
,ModelAwareDataAwareAmetysObject
,ModelAwareDataHolder
,ModifiableAmetysObject
,ModifiableDataHolder
,ModifiableIndexableDataHolder
,ModifiableModelAwareDataAwareAmetysObject
,ModifiableModelAwareDataAwareAmetysObject
,ModifiableModelAwareDataHolder
,RemovableAmetysObject
,TagAwareAmetysObject
,TaggableAmetysObject
- All Known Implementing Classes:
JCRThread
public interface Thread
extends ModifiableModelAwareDataAwareAmetysObject, RemovableAmetysObject, TaggableAmetysObject, AttachableAmetysObject, CommentableAmetysObject<RichTextComment>
Interface representing a forum's thread
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Computed acceptedAnswer attributestatic final String
Attribute Attachmentsstatic final String
Attribute Authorstatic final String
Attribute Categorystatic final String
Attribute Categorystatic final String
Attribute Categorystatic final String
Attribute Commentsstatic final String
Attribute CommentAuthors, used to get number of comments without parsing themstatic final String
Attribute CommentsLength, used to get number of comments without parsing themstatic final String
Attribute Descriptionstatic final String
Attribute Description abstractstatic final String
Attribute Description for editingstatic final String
Attribute Description for editingstatic final String
Attribute Creationdatestatic final String
Attribute Threadidstatic final String
Attribute LastContribution : set on creation, updated for each anwer addedstatic final String
Attribute Lastmodifiedstatic final String
Attribute Tagsstatic final String
Attribute Labelstatic final String
Computed hasNotificationDot attributestatic final String
Computed isAuthor attributestatic final String
Computed unreadComments attributeFields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX
-
Method Summary
Modifier and TypeMethodDescriptionGet the accepted answer.Get the author of the threadThe category of the threadGet the close author of the threadGet the thread's close date.The content of the threadGet the thread's creation date.getFlattenComments
(boolean includeNotValidatedComments, boolean includeValidatedComments) Get the list of available comments (validated, not validated, both or none :))Get the thread's last contribution date.Get the thread's last modification date.getTitle()
The title of the threadvoid
setAuthor
(UserIdentity author) Set the author of this thread.void
setCategory
(ThreadCategoryEnum category) Set the category of the threadvoid
setCloseAuthor
(UserIdentity author) Set the close author of this thread.void
setCloseDate
(ZonedDateTime date) Set the thread's close date.void
setContent
(RichText content) Set the content of the threadvoid
setCreationDate
(ZonedDateTime startDate) Set the thread's creation date.void
Set the thread's contribution date.void
setLastModified
(ZonedDateTime date) Set the thread's modification date.void
Set the title of the threadMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
Methods inherited from interface org.ametys.cms.repository.AttachableAmetysObject
getAttachments, setAttachments
Methods inherited from interface org.ametys.cms.repository.CommentableAmetysObject
createComment, createComment, getComment, getComments
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, getDataHolder, 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
Methods inherited from interface org.ametys.plugins.repository.tag.TagAwareAmetysObject
getTags
Methods inherited from interface org.ametys.plugins.repository.tag.TaggableAmetysObject
tag, untag
-
Field Details
-
ATTRIBUTE_ID
Attribute Threadid- See Also:
-
ATTRIBUTE_TITLE
Attribute Label- See Also:
-
ATTRIBUTE_CONTENT
Attribute Description- See Also:
-
ATTRIBUTE_CONTENT_FOR_EDITING
Attribute Description for editing- See Also:
-
ATTRIBUTE_CONTENT_FOR_RENDERING
Attribute Description for editing- See Also:
-
ATTRIBUTE_CONTENT_ABSTRACT
Attribute Description abstract- See Also:
-
ATTRIBUTE_AUTHOR
Attribute Author- See Also:
-
ATTRIBUTE_CREATIONDATE
Attribute Creationdate- See Also:
-
ATTRIBUTE_LASTMODIFIED
Attribute Lastmodified- See Also:
-
ATTRIBUTE_LASTCONTRIBUTION
Attribute LastContribution : set on creation, updated for each anwer added- See Also:
-
ATTRIBUTE_CATEGORY
Attribute Category- See Also:
-
ATTRIBUTE_CLOSEAUTHOR
Attribute Category- See Also:
-
ATTRIBUTE_CLOSEDATE
Attribute Category- See Also:
-
ATTRIBUTE_ATTACHMENTS
Attribute Attachments- See Also:
-
ATTRIBUTE_TAGS
Attribute Tags- See Also:
-
ATTRIBUTE_COMMENTS
Attribute Comments- See Also:
-
ATTRIBUTE_COMMENTS_LENTGH
Attribute CommentsLength, used to get number of comments without parsing them- See Also:
-
ATTRIBUTE_COMMENTS_AUTHORS
Attribute CommentAuthors, used to get number of comments without parsing them- See Also:
-
HAS_UNOPENED_THREAD_NOTIFICATION
Computed hasNotificationDot attribute- See Also:
-
ACCEPTED_ANSWER_COMMENT_ID
Computed acceptedAnswer attribute- See Also:
-
UNREAD_COMMENTS
Computed unreadComments attribute- See Also:
-
IS_AUTHOR
Computed isAuthor attribute- See Also:
-
-
Method Details
-
getTitle
The title of the thread- Returns:
- The title
-
setTitle
Set the title of the thread- Parameters:
title
- The title
-
getContent
The content of the thread- Returns:
- The content
-
setContent
Set the content of the thread- Parameters:
content
- The content
-
getAuthor
Get the author of the thread- Returns:
- the author
-
setAuthor
Set the author of this thread.- Parameters:
author
- the author
-
getCreationDate
Get the thread's creation date.- Returns:
- the thread's creation date.
-
setCreationDate
Set the thread's creation date.- Parameters:
startDate
- the task's creation date.
-
getLastModified
Get the thread's last modification date.- Returns:
- the thread's last modification date.
-
setLastModified
Set the thread's modification date.- Parameters:
date
- the last modification date to set.
-
getLastContribution
Get the thread's last contribution date.- Returns:
- the thread's last contribution date.
-
setLastContribution
Set the thread's contribution date.- Parameters:
date
- the last contribution date to set.
-
getCategory
The category of the thread- Returns:
- The category
-
setCategory
Set the category of the thread- Parameters:
category
- The category
-
getCloseAuthor
Get the close author of the thread- Returns:
- the close author
-
setCloseAuthor
Set the close author of this thread.- Parameters:
author
- the close author
-
getCloseDate
Get the thread's close date.- Returns:
- the thread's close date.
-
setCloseDate
Set the thread's close date.- Parameters:
date
- the close date to set.
-
getAcceptedAnswer
Get the accepted answer.- Returns:
- the accepted answer if present, null otherwise.
-
getFlattenComments
List<RichTextComment> getFlattenComments(boolean includeNotValidatedComments, boolean includeValidatedComments) throws AmetysRepositoryException Get the list of available comments (validated, not validated, both or none :))- 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
-