Interface CommentableAmetysObject<T extends AbstractComment>

Type Parameters:
T - type of the referenced model item
All Known Subinterfaces:
CommentableContent, Task, Thread
All Known Implementing Classes:
AbstractProgram, AbstractProgramPart, AbstractTraversableProgramPart, Container, Course, CourseList, CoursePart, JCRTask, JCRThread, ModifiableDefaultContent, ModifiableDefaultWebContent, OrgUnit, Person, Program, SubProgram

public interface CommentableAmetysObject<T extends AbstractComment>
A commentable ametys object
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a 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.
    getComment(String commentId)
    Get a comment
    getComments(boolean includeNotValidatedComments, boolean includeValidatedComments)
    Get the list of available comments (validated, not validated, both or none :))
  • Method Details

    • createComment

      Creates a comment
      Returns:
      The new comment
    • createComment

      T 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 error occurs
    • getComments

      List<T> 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