Interface CommentForm

All Superinterfaces:
Extensible, Identifiable, OsidBrowsableForm, OsidExtensibleForm, OsidForm, OsidIdentifiableForm, OsidObjectForm, OsidRelationshipForm, OsidTemporalForm, Suppliable
All Known Subinterfaces:
CommentBatchForm

public interface CommentForm extends OsidRelationshipForm

This is the form for creating and updating Comments. Like all OsidForm objects, various data elements may be set here for use in the create and update methods in the CommentAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.

  • Method Details

    • getTextMetadata

      Metadata getTextMetadata()
      Gets the metadata for the text.
      Returns:
      metadata for the text
      Compliance:
      mandatory - This method must be implemented.
    • setText

      void setText(String text)
      Sets the text.
      Parameters:
      text - the new text
      Throws:
      InvalidArgumentException - text is invalid
      NoAccessException - Metadata.isReadOnly() is true
      NullArgumentException - text is null
      Compliance:
      mandatory - This method must be implemented.
    • clearText

      void clearText()
      Clears the text.
      Throws:
      NoAccessException - Metadata.isRequired() or Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • getRatingMetadata

      Metadata getRatingMetadata()
      Gets the metadata for a rating.
      Returns:
      metadata for the rating
      Compliance:
      mandatory - This method must be implemented.
    • setRating

      void setRating(Id gradeId)
      Sets the rating.
      Parameters:
      gradeId - the new rating
      Throws:
      InvalidArgumentException - gradeId is invalid
      NoAccessException - Metadata.isReadOnly() is true
      NullArgumentException - gradeId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearRating

      void clearRating()
      Clears the rating.
      Throws:
      NoAccessException - Metadata.isRequired() or Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • getCommentFormRecord

      CommentFormRecord getCommentFormRecord(Type commentRecordType) throws OperationFailedException
      Gets the CommentFormRecord corresponding to the given comment record Type.
      Parameters:
      commentRecordType - the comment record type
      Returns:
      the comment form record
      Throws:
      NullArgumentException - commentRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(commentRecordType) is false
      Compliance:
      mandatory - This method must be implemented.