Package org.ametys.cms.repository
Interface CommentableAmetysObject
-
- All Known Subinterfaces:
CommentableContent,Task
- All Known Implementing Classes:
AbstractProgram,AbstractProgramPart,AbstractTraversableProgramPart,Container,Course,CourseList,CoursePart,JCRTask,ModifiableDefaultContent,ModifiableDefaultWebContent,OrgUnit,Person,Program,SubProgram
public interface CommentableAmetysObject
A commentable ametys object
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommentcreateComment()Creates a commentCommentcreateComment(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.CommentgetComment(String commentId)Get a commentList<Comment>getComments(boolean includeNotValidatedComments, boolean includeValidatedComments)Get the list of available comments (validated, not validated, both or none :))
-
-
-
Method Detail
-
createComment
Comment createComment()
Creates a comment- Returns:
- The new comment
-
createComment
Comment createComment(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. Be careful using this method- Parameters:
commentId- the comment's idcreationDate- the comment's creation date- Returns:
- the new comment
-
getComment
Comment getComment(String commentId) throws AmetysRepositoryException
Get a comment- Parameters:
commentId- The comment- Returns:
- The comment
- Throws:
AmetysRepositoryException- if error occurs
-
getComments
List<Comment> getComments(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
-
-