Interface Comment

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal

public interface Comment extends OsidRelationship

A Comment represents a comment and/or rating related to a reference object in a book.

  • Method Details

    • getReferenceId

      Id getReferenceId()
      Gets the Id of the referenced object to which this comment pertains.
      Returns:
      the reference Id
      Compliance:
      mandatory - This method must be implemented.
    • getCommentorId

      Id getCommentorId()
      Gets the Id of the resource who created this comment.
      Returns:
      the Resource Id
      Compliance:
      mandatory - This method must be implemented.
    • getCommentor

      Resource getCommentor() throws OperationFailedException
      Gets the resource who created this comment.
      Returns:
      the Resource
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getCommentingAgentId

      Id getCommentingAgentId()
      Gets the Id of the agent who created this comment.
      Returns:
      the Agent Id
      Compliance:
      mandatory - This method must be implemented.
    • getCommentingAgent

      Agent getCommentingAgent() throws OperationFailedException
      Gets the agent who created this comment.
      Returns:
      the Agent
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getText

      DisplayText getText()
      Gets the comment text.
      Returns:
      the comment text
      Compliance:
      mandatory - This method must be implemented.
    • hasRating

      boolean hasRating()
      Tests if this comment includes a rating.
      Returns:
      true if this comment includes a rating, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getRatingId

      Id getRatingId()
      Gets the Id of the Grade .
      Returns:
      the Agent Id
      Throws:
      IllegalStateException - hasRating() is false
      Compliance:
      mandatory - This method must be implemented.
    • getRating

      Grade getRating() throws OperationFailedException
      Gets the Grade .
      Returns:
      the Grade
      Throws:
      IllegalStateException - hasRating() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getCommentRecord

      CommentRecord getCommentRecord(Type commentRecordType) throws OperationFailedException
      Gets the comment record corresponding to the given Comment record Type .This method is used to retrieve an object implementing the requested record. The commentRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(commentRecordType) is true .
      Parameters:
      commentRecordType - the type of comment record to retrieve
      Returns:
      the comment record
      Throws:
      NullArgumentException - commentRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(commentRecordType) is false
      Compliance:
      mandatory - This method must be implemented.