OSID Logo
OSID Specifications
commenting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.commenting.Comment
Implementsosid.OsidRelationship
Description

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

MethodgetReferenceId
Description

Gets the Id of the referenced object to which this comment pertains.

Returnosid.id.Idthe reference Id
CompliancemandatoryThis method must be implemented.
MethodgetCommentorId
Description

Gets the Id of the resource who created this comment.

Returnosid.id.Idthe Resource Id
CompliancemandatoryThis method must be implemented.
MethodgetCommentor
Description

Gets the resource who created this comment.

Returnosid.resource.Resourcethe Resource
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetCommentingAgentId
Description

Gets the Id of the agent who created this comment.

Returnosid.id.Idthe Agent Id
CompliancemandatoryThis method must be implemented.
MethodgetCommentingAgent
Description

Gets the agent who created this comment.

Returnosid.authentication.Agentthe Agent
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetText
Description

Gets the comment text.

Returnosid.locale.DisplayTextthe comment text
CompliancemandatoryThis method must be implemented.
MethodhasRating
Description

Tests if this comment includes a rating.

Returnboolean true if this comment includes a rating, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetRatingId
Description

Gets the Id of the Grade.

Returnosid.id.Idthe Agent Id
ErrorsILLEGAL_STATE hasRating() is false
CompliancemandatoryThis method must be implemented.
MethodgetRating
Description

Gets the Grade.

Returnosid.grading.Gradethe Grade
ErrorsILLEGAL_STATE hasRating() is false
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetCommentRecord
Description

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 .

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