OSID Logo
OSID Specifications
commenting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.commenting.CommentLookupSession
Implementsosid.OsidSession
Description

This session defines methods for retrieving comments.

This lookup session defines several views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
  • isolated book view: All comment methods in this session operate, retrieve and pertain to comments defined explicitly in the current book. Using an isolated view is useful for managing comments with the CommentAdminSession.
  • federated book view: All comment lookup methods in this session operate, retrieve and pertain to all comments defined in this book and any other books implicitly available in this book through book inheritence.
  • effective comment view: All comment lookup methods return comments where the current dates falls in between the effective dates inclusive.
  • any effective comment view: Comments of any effective date are returned.

The methods useFederatedBookView() and useIsolatedBookView() behave as a radio group and one should be selected before invoking any lookup methods.

MethodgetBookId
Description

Gets the Book Id associated with this session.

Returnosid.id.Idthe Book Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetBook
Description

Gets the Book associated with this session.

Returnosid.commenting.Bookthe book
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupComments
Description

Tests if this user can examine this book. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer these operations.

Returnboolean false if book reading methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeCommentView
Description

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryCommentView
Description

A complete view of the Comment returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedBookView
Description

Federates the view for methods in this session. A federated view will include comments in books which are children of this book in the book hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedBookView
Description

Isolates the view for methods in this session. An isolated view restricts retrievals to this book only.

CompliancemandatoryThis method is must be implemented.
MethoduseEffectiveCommentView
Description

Only comments whose effective dates are current are returned by methods in this session.

CompliancemandatoryThis method is must be implemented.
MethoduseAnyEffectiveCommentView
Description

All comments of any effective dates are returned by all methods in this session.

CompliancemandatoryThis method is must be implemented.
MethodgetComment
Description

Gets the Comment specified by its Id.

In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Comment may have a different Id than requested, such as the case where a duplicate Id was assigned to a Comment and retained for compatibility.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdcommentIdthe Id of the Comment to retrieve
Returnosid.commenting.Commentthe returned Comment
ErrorsNOT_FOUNDno Comment found with the given Id
NULL_ARGUMENT commentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsByIds
Description

Gets a CommentList corresponding to the given IdList.

In plenary mode, the returned list contains all of the comments specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible comments may be omitted from the list and may present the elements in any order including returning a unique set.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdListcommentIdsthe list of Ids to retrieve
Returnosid.commenting.CommentListthe returned Comment list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT commentIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsByGenusType
Description

Gets a CommentList corresponding to the given comment genus Type which does not include comments of genus types derived from the specified Type.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.type.TypecommentGenusTypea comment genus type
Returnosid.commenting.CommentListthe returned Comment list
ErrorsNULL_ARGUMENT commentGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsByParentGenusType
Description

Gets a CommentList corresponding to the given comment genus Type and include any additional comments with genus types derived from the specified Type.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.type.TypecommentGenusTypea comment genus type
Returnosid.commenting.CommentListthe returned Comment list
ErrorsNULL_ARGUMENT commentGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsByRecordType
Description

Gets a CommentList containing the given comment record Type.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.type.TypecommentRecordTypea comment record type
Returnosid.commenting.CommentListthe returned Comment list
ErrorsNULL_ARGUMENT commentRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsOnDate
Description

Gets a CommentList effective during the entire given date range inclusive but not confined to the date range.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.commenting.CommentListthe returned Comment list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsByGenusTypeOnDate
Description

Gets a CommentList of a given genus type and effective during the entire given date range inclusive but not confined to the date range.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.type.TypecommentGenusTypea comment genus type
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.commenting.CommentListthe returned Comment list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT commentGenusType, from, or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsForCommentor
Description

Gets a list of comments corresponding to a resource Id.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdresourceIdthe Id of the resource
Returnosid.commenting.CommentListthe returned CommentList
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsForCommentorOnDate
Description

Gets a list of all comments corresponding to a resource Id and effective during the entire given date range inclusive but not confined to the date range.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdresourceIdthe Id of the resource
osid.calendaring.DateTimefromfrom date
osid.calendaring.DateTimetoto date
Returnosid.commenting.CommentListthe returned CommentList
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT resourceId, from, or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsByGenusTypeForCommentor
Description

Gets a list of comments of the given genus type corresponding to a resource Id.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdresourceIdthe Id of the resource
osid.type.TypecommentGenusTypethe comment genus type
Returnosid.commenting.CommentListthe returned CommentList
ErrorsNULL_ARGUMENT resourceId or commentGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsByGenusTypeForCommentorOnDate
Description

Gets a list of all comments of the given genus type corresponding to a resource Id and effective during the entire given date range inclusive but not confined to the date range.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdresourceIdthe Id of the resource
osid.type.TypecommentGenusTypethe comment genus type
osid.calendaring.DateTimefromfrom date
osid.calendaring.DateTimetoto date
Returnosid.commenting.CommentListthe returned CommentList
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT resourceId, commentGenusType, from, or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsForReference
Description

Gets a list of comments corresponding to a reference Id.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdreferenceIdthe Id of the reference
Returnosid.commenting.CommentListthe returned CommentList
ErrorsNULL_ARGUMENT referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsForReferenceOnDate
Description

Gets a list of all comments corresponding to a reference Id and effective during the entire given date range inclusive but not confined to the date range.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdreferenceIda reference Id
osid.calendaring.DateTimefromfrom date
osid.calendaring.DateTimetoto date
Returnosid.commenting.CommentListthe returned CommentList
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT referenceId, from, or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsByGenusTypeForReference
Description

Gets a list of comments of the given genus type corresponding to a reference Id.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdreferenceIdthe Id of the reference
osid.type.TypecommentGenusTypethe comment genus type
Returnosid.commenting.CommentListthe returned CommentList
ErrorsNULL_ARGUMENT referenceId or commentGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsByGenusTypeForReferenceOnDate
Description

Gets a list of all comments of the given genus type corresponding to a reference Id and effective during the entire given date range inclusive but not confined to the date range.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdreferenceIda reference Id
osid.type.TypecommentGenusTypethe comment genus type
osid.calendaring.DateTimefromfrom date
osid.calendaring.DateTimetoto date
Returnosid.commenting.CommentListthe returned CommentList
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT referenceId, commentGenusType, from, or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsForCommentorAndReference
Description

Gets a list of comments corresponding to a resource and reference Id.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdresourceIdthe Id of the resource
osid.id.IdreferenceIdthe Id of the reference
Returnosid.commenting.CommentListthe returned CommentList
ErrorsNULL_ARGUMENT resourceId or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsForCommentorAndReferenceOnDate
Description

Gets a list of all comments corresponding to a resource and reference Id and effective during the entire given date range inclusive but not confined to the date range.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdresourceIdthe Id of the resource
osid.id.IdreferenceIda reference Id
osid.calendaring.DateTimefromfrom date
osid.calendaring.DateTimetoto date
Returnosid.commenting.CommentListthe returned CommentList
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT resourceId, referenceId, from, or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsByGenusTypeForCommentorAndReference
Description

Gets a list of comments of the given genus type corresponding to a resource and reference Id.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdresourceIdthe Id of the resource
osid.id.IdreferenceIdthe Id of the reference
osid.type.TypecommentGenusTypethe comment genus type
Returnosid.commenting.CommentListthe returned CommentList
ErrorsNULL_ARGUMENT resourceId, referenceId or commentGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetCommentsByGenusTypeForCommentorAndReferenceOnDate
Description

Gets a list of all comments corresponding to a resource and reference Id and effective during the entire given date range inclusive but not confined to the date range.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Parametersosid.id.IdresourceIdthe Id of the resource
osid.id.IdreferenceIda reference Id
osid.type.TypecommentGenusTypethe comment genus type
osid.calendaring.DateTimefromfrom date
osid.calendaring.DateTimetoto date
Returnosid.commenting.CommentListthe returned CommentList
ErrorsINVALID_ARGUMENT to is less than from
NULL_ARGUMENT resourceId, referenceId, commentGenusType, from, or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetComments
Description

Gets all comments.

In plenary mode, the returned list contains all known comments or an error results. Otherwise, the returned list may contain only those comments that are accessible through this session.

In effective mode, comments are returned that are currently effective. In any effective mode, effective comments and those currently expired are returned.

Returnosid.commenting.CommentLista list of comments
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.