Interface ReplyLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving replies.
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 forum view: All reply methods in this session operate,
retrieve and pertain to replies defined explicitly in the current
forum. Using an isolated view is useful for managing replies with the
ReplyAdminSession. - federated forum view: All reply lookup methods in this session operate, retrieve and pertain to all replies defined in this forum and any other forums implicitly available in this forum through forum inheritence.
- sequestered reply viiew: All reply methods suppress sequestered replies.
- unsequestered reply view: All reply methods return all replies.
The methods useFederatedForumView() and
useIsolatedForumView() behave as a radio group and one should be selected
before invoking any lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can lookup replies.getForum()Gets theForumassociated with this session.Gets theForumIdassociated with this session.Gets a list of all replies.getRepliesByDate(DateTime from, DateTime to) Gets a list of all replies corresponding to the given date range inclusive.getRepliesByDateForPost(Id postId, DateTime from, DateTime to) Gets a list of all replies corresponding to postIdin the given date range inclusive.getRepliesByDateForPostAndPoster(Id postId, Id resourceId, DateTime from, DateTime to) Gets a list of all replies corresponding to a postIdand poster within the given daterange incluisve.getRepliesByDateForPoster(Id resourceId, DateTime from, DateTime to) Gets a list of all replies corresponding to a postIdfor the given poster within the date range inclusive.getRepliesByGenusType(Type replyGenusType) Gets aReplyListcorresponding to the given reply genusTypewhich does not include replies of genus types derived from the specifiedType.getRepliesByIds(IdList replyIds) Gets aReplyListcorresponding to the givenIdList.getRepliesByParentGenusType(Type replyGenusType) Gets aReplyListcorresponding to the given reply genusTypeand include any additional replies with genus types derived from the specifiedType.getRepliesByRecordType(Type replyRecordType) Gets aReplyListcontaining the given reply recordType.getRepliesForPost(Id postId) Gets a list of all replies corresponding to a postId.getRepliesForPostAndPoster(Id postId, Id resourceId) Gets a list of all replies corresponding to a postIdand poster.getRepliesForPoster(Id resourceId) Gets a list of all replies corresponding to a poster.Gets theReplyspecified by itsId.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theReplyreturns is desired.voidThe returns from the lookup methods omit sequestered replies.voidAll replies are returned including sequestered replies.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getForumId
Id getForumId()Gets theForumIdassociated with this session.- Returns:
- the
Forum Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getForum
Gets theForumassociated with this session.- Returns:
- the forum
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupReplies
boolean canLookupReplies()Tests if this user can lookup replies. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer these operations.- Returns:
falseif reply lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeReplyView
void useComparativeReplyView()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.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryReplyView
void usePlenaryReplyView()A complete view of theReplyreturns 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.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedForumView
void useFederatedForumView()Federates the view for methods in this session. A federated view will include replies in forums which are children of this forum in the forum hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedForumView
void useIsolatedForumView()Isolates the view for methods in this session. An isolated view restricts retrievals to this forum only.- Compliance:
mandatory- This method is must be implemented.
-
useSequesteredReplyView
void useSequesteredReplyView()The returns from the lookup methods omit sequestered replies.- Compliance:
mandatory- This method is must be implemented.
-
useUnsequesteredReplyView
void useUnsequesteredReplyView()All replies are returned including sequestered replies.- Compliance:
mandatory- This method is must be implemented.
-
getReply
Reply getReply(Id replyId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theReplyspecified by itsId. In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Reply may have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aReplyand retained for compatibility. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.- Parameters:
replyId- theIdof theReplyto retrieve- Returns:
- the returned
Reply - Throws:
NotFoundException- noReplyfound with the givenIdNullArgumentException-replyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRepliesByIds
ReplyList getRepliesByIds(IdList replyIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aReplyListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the replies specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessible replies may be omitted from the list and may present the elements in any order including returning a unique set. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.- Parameters:
replyIds- the list ofIdsto retrieve- Returns:
- the returned
Reply list - Throws:
NotFoundException- anId wasnot foundNullArgumentException-replyIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRepliesByGenusType
ReplyList getRepliesByGenusType(Type replyGenusType) throws OperationFailedException, PermissionDeniedException Gets aReplyListcorresponding to the given reply genusTypewhich does not include replies of genus types derived from the specifiedType. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.- Parameters:
replyGenusType- a reply genus type- Returns:
- the returned
Replylist - Throws:
NullArgumentException-replyGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRepliesByParentGenusType
ReplyList getRepliesByParentGenusType(Type replyGenusType) throws OperationFailedException, PermissionDeniedException Gets aReplyListcorresponding to the given reply genusTypeand include any additional replies with genus types derived from the specifiedType. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.- Parameters:
replyGenusType- a reply genus type- Returns:
- the returned
Postlist - Throws:
NullArgumentException-postGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRepliesByRecordType
ReplyList getRepliesByRecordType(Type replyRecordType) throws OperationFailedException, PermissionDeniedException Gets aReplyListcontaining the given reply recordType. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.- Parameters:
replyRecordType- a reply record type- Returns:
- the returned
Postlist - Throws:
NullArgumentException-replyRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRepliesByDate
ReplyList getRepliesByDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all replies corresponding to the given date range inclusive. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
ReplyList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRepliesForPost
Gets a list of all replies corresponding to a postId. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.- Parameters:
postId- theIdof the post- Returns:
- the returned
ReplyList - Throws:
NullArgumentException-postIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRepliesByDateForPost
ReplyList getRepliesByDateForPost(Id postId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all replies corresponding to postIdin the given date range inclusive. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replis that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.- Parameters:
postId- theIdof the postfrom- start of date rangeto- end of date range- Returns:
- the returned
ReplyList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-postId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRepliesForPoster
ReplyList getRepliesForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list of all replies corresponding to a poster. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.- Parameters:
resourceId- the resourceId- Returns:
- the returned
ReplyList - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRepliesByDateForPoster
ReplyList getRepliesByDateForPoster(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all replies corresponding to a postIdfor the given poster within the date range inclusive. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.- Parameters:
resourceId- the resourceIdfrom- start of date rangeto- end of date range- Returns:
- the returned
ReplyList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRepliesForPostAndPoster
ReplyList getRepliesForPostAndPoster(Id postId, Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list of all replies corresponding to a postIdand poster. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.- Parameters:
postId- theIdof the postresourceId- the resourceId- Returns:
- the returned
ReplyList - Throws:
NullArgumentException-postIdorresourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRepliesByDateForPostAndPoster
ReplyList getRepliesByDateForPostAndPoster(Id postId, Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of all replies corresponding to a postIdand poster within the given daterange incluisve. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.- Parameters:
postId- theIdof the postresourceId- the resourceIdfrom- start of date rangeto- end of date range- Returns:
- the returned
ReplyList - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-postId, resourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getReplies
Gets a list of all replies. In plenary mode, the returned list contains all known replies or an error results. Otherwise, the returned list may contain only those replies that are accessible through this session. In sequestered mode, no sequestered replies are returned. In unsequestered mode, all replies are returned.- Returns:
- the returned
ReplyList - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-