public interface CommentLookupSession extends OsidSession
This session defines methods for retrieving comments.
This lookup session defines several views:
CommentAdminSession. The methods useFederatedBookView() and
useIsolatedBookView() behave as a radio group and one should be
selected before invoking any lookup methods.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupComments()
Tests if this user can examine this book.
|
Book |
getBook()
Gets the
Book associated with this session. |
Id |
getBookId()
Gets the
Book Id associated with this
session. |
Comment |
getComment(Id commentId)
Gets the
Comment specified by its Id. |
CommentList |
getComments()
Gets all comments.
|
CommentList |
getCommentsByGenusType(Type commentGenusType)
Gets a
CommentList corresponding to the given comment
genus Type which does not include comments of genus
types derived from the specified Type. |
CommentList |
getCommentsByGenusTypeForCommentor(Id resourceId,
Type commentGenusType)
Gets a list of comments of the given genus type corresponding to a
resource
Id. |
CommentList |
getCommentsByGenusTypeForCommentorAndReference(Id resourceId,
Id referenceId,
Type commentGenusType)
Gets a list of comments of the given genus type corresponding to a
resource and reference
Id. |
CommentList |
getCommentsByGenusTypeForCommentorAndReferenceOnDate(Id resourceId,
Id referenceId,
Type commentGenusType,
DateTime from,
DateTime to)
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. |
CommentList |
getCommentsByGenusTypeForCommentorOnDate(Id resourceId,
Type commentGenusType,
DateTime from,
DateTime to)
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. |
CommentList |
getCommentsByGenusTypeForReference(Id referenceId,
Type commentGenusType)
Gets a list of comments of the given genus type corresponding to a
reference
Id. |
CommentList |
getCommentsByGenusTypeForReferenceOnDate(Id referenceId,
Type commentGenusType,
DateTime from,
DateTime to)
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. |
CommentList |
getCommentsByGenusTypeOnDate(Type commentGenusType,
DateTime from,
DateTime to)
Gets a
CommentList of a given genus type and effective
during the entire given date range inclusive but not confined to the
date range. |
CommentList |
getCommentsByIds(IdList commentIds)
Gets a
CommentList corresponding to the given
IdList. |
CommentList |
getCommentsByParentGenusType(Type commentGenusType)
Gets a
CommentList corresponding to the given comment
genus Type and include any additional comments with
genus types derived from the specified Type. |
CommentList |
getCommentsByRecordType(Type commentRecordType)
Gets a
CommentList containing the given comment record
Type. |
CommentList |
getCommentsForCommentor(Id resourceId)
Gets a list of comments corresponding to a resource
Id. |
CommentList |
getCommentsForCommentorAndReference(Id resourceId,
Id referenceId)
Gets a list of comments corresponding to a resource and reference
Id. |
CommentList |
getCommentsForCommentorAndReferenceOnDate(Id resourceId,
Id referenceId,
DateTime from,
DateTime to)
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. |
CommentList |
getCommentsForCommentorOnDate(Id resourceId,
DateTime from,
DateTime to)
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. |
CommentList |
getCommentsForReference(Id referenceId)
Gets a list of comments corresponding to a reference
Id. |
CommentList |
getCommentsForReferenceOnDate(Id referenceId,
DateTime from,
DateTime to)
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. |
CommentList |
getCommentsOnDate(DateTime from,
DateTime to)
Gets a
CommentList effective during the entire given
date range inclusive but not confined to the date range. |
void |
useAnyEffectiveCommentView()
All comments of any effective dates are returned by all methods in
this session.
|
void |
useComparativeCommentView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
useEffectiveCommentView()
Only comments whose effective dates are current are returned by
methods in this session.
|
void |
useFederatedBookView()
Federates the view for methods in this session.
|
void |
useIsolatedBookView()
Isolates the view for methods in this session.
|
void |
usePlenaryCommentView()
A complete view of the
Comment returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getBookId()
Book Id associated with this
session. Book Id associated with this sessionmandatory - This method must be implemented. Book getBook() throws OperationFailedException, PermissionDeniedException
Book associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupComments()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer these operations. false if book reading methods are not
authorized, true otherwisemandatory - This method must be implemented. void useComparativeCommentView()
mandatory - This method is must be implemented. void usePlenaryCommentView()
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.mandatory - This method is must be implemented. void useFederatedBookView()
mandatory - This method is must be implemented. void useIsolatedBookView()
mandatory - This method is must be implemented. void useEffectiveCommentView()
mandatory - This method is must be implemented. void useAnyEffectiveCommentView()
mandatory - This method is must be implemented. Comment getComment(Id commentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.commentId - the Id of the Comment
to retrieve Comment NotFoundException - no Comment found
with the given Id NullArgumentException - commentId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsByIds(IdList commentIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.commentIds - the list of Ids to retrieve Comment list NotFoundException - an Id was not foundNullArgumentException - commentIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsByGenusType(Type commentGenusType) throws OperationFailedException, PermissionDeniedException
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.commentGenusType - a comment genus type Comment listNullArgumentException - commentGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsByParentGenusType(Type commentGenusType) throws OperationFailedException, PermissionDeniedException
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.commentGenusType - a comment genus type Comment listNullArgumentException - commentGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsByRecordType(Type commentRecordType) throws OperationFailedException, PermissionDeniedException
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.commentRecordType - a comment record type Comment listNullArgumentException - commentRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
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.from - starting dateto - ending date Comment listInvalidArgumentException - from is
greater than to NullArgumentException - from or
to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsByGenusTypeOnDate(Type commentGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
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.commentGenusType - a comment genus typefrom - starting dateto - ending date Comment listInvalidArgumentException - from is
greater than to NullArgumentException - commentGenusType, from,
or to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsForCommentor(Id resourceId) throws OperationFailedException, PermissionDeniedException
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.resourceId - the Id of the resource CommentList NullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsForCommentorOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
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.resourceId - the Id of the resourcefrom - from dateto - to date CommentList InvalidArgumentException - to is less
than from NullArgumentException - resourceId, from,
or to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsByGenusTypeForCommentor(Id resourceId, Type commentGenusType) throws OperationFailedException, PermissionDeniedException
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.resourceId - the Id of the resourcecommentGenusType - the comment genus type CommentList NullArgumentException - resourceId or
commentGenusType is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsByGenusTypeForCommentorOnDate(Id resourceId, Type commentGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
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.resourceId - the Id of the resourcecommentGenusType - the comment genus typefrom - from dateto - to date CommentList InvalidArgumentException - to is less
than from NullArgumentException - resourceId,
commentGenusType, from, or to is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsForReference(Id referenceId) throws OperationFailedException, PermissionDeniedException
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.referenceId - the Id of the reference CommentList NullArgumentException - referenceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsForReferenceOnDate(Id referenceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
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.referenceId - a reference Id from - from dateto - to date CommentList InvalidArgumentException - to is less
than from NullArgumentException - referenceId, from,
or to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsByGenusTypeForReference(Id referenceId, Type commentGenusType) throws OperationFailedException, PermissionDeniedException
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.referenceId - the Id of the referencecommentGenusType - the comment genus type CommentList NullArgumentException - referenceId or
commentGenusType is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsByGenusTypeForReferenceOnDate(Id referenceId, Type commentGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
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.referenceId - a reference Id commentGenusType - the comment genus typefrom - from dateto - to date CommentList InvalidArgumentException - to is less
than from NullArgumentException - referenceId,
commentGenusType, from, or to is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsForCommentorAndReference(Id resourceId, Id referenceId) throws OperationFailedException, PermissionDeniedException
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.resourceId - the Id of the resourcereferenceId - the Id of the reference CommentList NullArgumentException - resourceId or
referenceId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsForCommentorAndReferenceOnDate(Id resourceId, Id referenceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
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.resourceId - the Id of the resourcereferenceId - a reference Id from - from dateto - to date CommentList InvalidArgumentException - to is less
than from NullArgumentException - resourceId, referenceId,
from, or to is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsByGenusTypeForCommentorAndReference(Id resourceId, Id referenceId, Type commentGenusType) throws OperationFailedException, PermissionDeniedException
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.resourceId - the Id of the resourcereferenceId - the Id of the referencecommentGenusType - the comment genus type CommentList NullArgumentException - resourceId, referenceId
or commentGenusType is null
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getCommentsByGenusTypeForCommentorAndReferenceOnDate(Id resourceId, Id referenceId, Type commentGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
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.resourceId - the Id of the resourcereferenceId - a reference Id commentGenusType - the comment genus typefrom - from dateto - to date CommentList InvalidArgumentException - to is less
than from NullArgumentException - resourceId, referenceId,
commentGenusType, from, or to is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. CommentList getComments() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.