OSID Logo
OSID Specifications
commenting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.commenting.CommentQuery
Implementsosid.OsidRelationshipQuery
Description

This is the query for searching comments. Each method specifies an AND term while multiple invocations of the same method produce a nested OR.

MethodmatchReferenceId
Description

Sets reference Id.

Parametersosid.id.IdsourceIda source Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT sourceId is null
CompliancemandatoryThis method must be implemented.
MethodclearReferenceIdTerms
Description

Clears the reference Id terms.

CompliancemandatoryThis method must be implemented.
MethodmatchCommentorId
Description

Sets a resource Id to match a commentor.

Parametersosid.id.IdresourceIda resource Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT resourceId is null
CompliancemandatoryThis method must be implemented.
MethodclearCommentorIdTerms
Description

Clears the resource Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsCommentorQuery
Description

Tests if a ResourceQuery is available.

Returnboolean true if a resource query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetCommentorQuery
Description

Gets the query for a resource query. Multiple retrievals produce a nested OR term.

Returnosid.resource.ResourceQuerythe resource query
ErrorsUNIMPLEMENTED supportsCommentorQuery() is false
ComplianceoptionalThis method must be implemented if supportsCommentorQuery() is true.
MethodclearCommentorTerms
Description

Clears the resource terms.

CompliancemandatoryThis method must be implemented.
MethodmatchCommentingAgentId
Description

Sets an agent Id.

Parametersosid.id.IdagentIdan agent Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT agentId is null
CompliancemandatoryThis method must be implemented.
MethodclearCommentingAgentIdTerms
Description

Clears the agent Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsCommentingAgentQuery
Description

Tests if an AgentQuery is available.

Returnboolean true if an agent query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetCommentingAgentQuery
Description

Gets the query for an agent query. Multiple retrievals produce a nested OR term.

Returnosid.authentication.AgentQuerythe agent query
ErrorsUNIMPLEMENTED supportsCommentingAgentQuery() is false
ComplianceoptionalThis method must be implemented if supportsCommentingAgentQuery() is true.
MethodclearCommentingAgentTerms
Description

Clears the agent terms.

CompliancemandatoryThis method must be implemented.
MethodmatchText
Description

Matches text.

Parametersstringtextthe text
osid.type.TypestringMatchTypea string match type
booleanmatch true for a positive match, false for a negative match
ErrorsINVALID_ARGUMENT text is not of stringMatchType
NULL_ARGUMENT text is null
UNSUPPORTED supportsStringMatchType(stringMatchType) is false
CompliancemandatoryThis method must be implemented.
MethodmatchAnyText
Description

Matches a comment that has any text assigned.

Parametersbooleanmatch true to match comments with any text, false to match comments with no text
CompliancemandatoryThis method must be implemented.
MethodclearTextTerms
Description

Clears the text terms.

CompliancemandatoryThis method must be implemented.
MethodmatchRatingId
Description

Sets a grade Id.

Parametersosid.id.IdgradeIda grade Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT gradeId is null
CompliancemandatoryThis method must be implemented.
MethodclearRatingIdTerms
Description

Clears the rating Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsRatingQuery
Description

Tests if a GradeQuery is available.

Returnboolean true if a rating query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetRatingQuery
Description

Gets the query for a rating query. Multiple retrievals produce a nested OR term.

Returnosid.grading.GradeQuerythe rating query
ErrorsUNIMPLEMENTED supportsRatingQuery() is false
ComplianceoptionalThis method must be implemented if supportsRatingQuery() is true.
MethodmatchAnyRating
Description

Matches books with any rating.

Parametersbooleanmatch true to match comments with any rating, false to match comments with no ratings
CompliancemandatoryThis method must be implemented.
MethodclearRatingTerms
Description

Clears the rating terms.

CompliancemandatoryThis method must be implemented.
MethodmatchBookId
Description

Sets the book Id for this query to match comments assigned to books.

Parametersosid.id.IdbookIda book Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT bookId is null
CompliancemandatoryThis method must be implemented.
MethodclearBookIdTerms
Description

Clears the book Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsBookQuery
Description

Tests if a BookQuery is available.

Returnboolean true if a book query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetBookQuery
Description

Gets the query for a book query. Multiple retrievals produce a nested OR term.

Returnosid.commenting.BookQuerythe book query
ErrorsUNIMPLEMENTED supportsBookQuery() is false
ComplianceoptionalThis method must be implemented if supportsBookQuery() is true.
MethodclearBookTerms
Description

Clears the book terms.

CompliancemandatoryThis method must be implemented.
MethodgetCommentQueryRecord
Description

Gets the comment query record corresponding to the given Comment record Type. Multiple record retrievals produce a nested OR term.

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