OSID Logo
OSID Specifications
commenting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.commenting.CommentForm
Implementsosid.OsidRelationshipForm
Description

This is the form for creating and updating Comment objects. 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.

MethodgetTextMetadata
Description

Gets the metadata for the text.

Returnosid.Metadatametadata for the text
CompliancemandatoryThis method must be implemented.
MethodsetText
Description

Sets the text.

Parametersstringtextthe new text
ErrorsINVALID_ARGUMENT text is invalid
NO_ACCESS Metadata.isReadOnly() is true
NULL_ARGUMENT text is null
CompliancemandatoryThis method must be implemented.
MethodclearText
Description

Clears the text.

ErrorsNO_ACCESS Metadata.isRequired() or Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodgetRatingMetadata
Description

Gets the metadata for a rating.

Returnosid.Metadatametadata for the rating
CompliancemandatoryThis method must be implemented.
MethodsetRating
Description

Sets the rating.

Parametersosid.id.IdgradeIdthe new rating
ErrorsINVALID_ARGUMENT gradeId is invalid
NO_ACCESS Metadata.isReadOnly() is true
NULL_ARGUMENT gradeId is null
CompliancemandatoryThis method must be implemented.
MethodclearRating
Description

Clears the rating.

ErrorsNO_ACCESS Metadata.isRequired() or Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodgetCommentFormRecord
Description

Gets the CommentFormRecord corresponding to the given comment record Type.

Parametersosid.type.TypecommentRecordTypethe comment record type
Returnosid.commenting.records.CommentFormRecordthe comment form record
ErrorsNULL_ARGUMENT commentRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(commentRecordType) is false
CompliancemandatoryThis method must be implemented.