Interface CommentableContent

All Superinterfaces:
ACLAmetysObject, AmetysObject, Content, DataAwareAmetysObject, DataHolder, DublinCoreAwareAmetysObject, MetadataAwareAmetysObject, ModelAwareDataAwareAmetysObject, ModelAwareDataHolder, ModifiableACLAmetysObject, ModifiableAmetysObject, ModifiableContent, ModifiableDataHolder, ModifiableDublinCoreAwareAmetysObject, ModifiableMetadataAwareAmetysObject, ModifiableModelAwareDataAwareAmetysObject, ModifiableModelAwareDataHolder, RemovableAmetysObject, TagAwareAmetysObject, TaggableAmetysObject
All Known Implementing Classes:
AbstractProgram, AbstractProgramPart, AbstractTraversableProgramPart, Container, Course, CourseList, CoursePart, ModifiableDefaultContent, ModifiableDefaultWebContent, OrgUnit, Person, Program, SubProgram

public interface CommentableContent extends ModifiableContent
A content that can be commented by the users
  • Method Details

    • 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 id
      creationDate - the comment's creation date
      Returns:
      the new comment
    • getComment

      Get a comment
      Parameters:
      commentId - The comment
      Returns:
      The comment
      Throws:
      AmetysRepositoryException - if the comment does not exist
    • 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 content.
      Throws:
      AmetysRepositoryException - if an error occurred