Interface ReceiptLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving receipts to messages.
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 mailbox view: All receipt methods in this session operate, retrieve and pertain to receipts and messages defined explicitly in the current mailbox.
- federated mailbox view: All receipt methods in this session operate, retrieve and pertain to all receipts and messages defined in this mailbox and any other messages implicitly available in this mailbox through mailbox inheritence.
The methods useFederatedReceiptView() and
useIsolatedReceiptView() behave as a radio group and one should be
selected before invoking any lookup methods.
Messages may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Message .
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performReceiptlookups.Gets theMailboxassociated with this session.Gets theMailboxIdassociated with this session.getReceipt(Id receiptId) Gets theReceiptspecified by itsId.Gets allReceipts.getReceiptsByGenusType(Type receiptGenusType) Gets aReceiptListcorresponding to the given receipt genusTypewhich does not include receipts of types derived from the specifiedType.In plenary mode, the returned list contains all known receipts or an error results.getReceiptsByIds(IdList receiptIds) Gets aReceiptListcorresponding to the givenIdList.getReceiptsByParentGenusType(Type receiptGenusType) Gets aReceiptListcorresponding to the given receipt genusTypeand include any additional receipts with genus types derived from the specifiedType.In plenary mode, the returned list contains all known receipts or an error results.getReceiptsByRecordType(Type receiptRecordType) Gets aReceiptListcontaining the given receipt recordType.getReceiptsForMessage(Id messageId) Gets aReceiptListfor the given message.getReceiptsForMessageAndRecipient(Id messageId, Id resourceId) Gets a list ofReceiptsfor the given message and recipient.getReceiptsForRecipient(Id resourceId) Gets aReceiptListfor the given recipient.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 theReceiptreturns is desired.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
-
getMailboxId
Id getMailboxId()Gets theMailboxIdassociated with this session.- Returns:
- the
Mailbox Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getMailbox
Gets theMailboxassociated with this session.- Returns:
- the
Mailboxassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupReceipts
boolean canLookupReceipts()Tests if this user can performReceiptlookups. 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 lookup operations.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeReceiptView
void useComparativeReceiptView()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.
-
usePlenaryReceiptView
void usePlenaryReceiptView()A complete view of theReceiptreturns 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.
-
useFederatedMailboxView
void useFederatedMailboxView()Federates the view for methods in this session. A federated view will include receipts in mailboxes which are children of this mailbox in the mailbox hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedMailboxView
void useIsolatedMailboxView()Isolates the view for methods in this session. An isolated view restricts lookups to this mailbox only.- Compliance:
mandatory- This method is must be implemented.
-
getReceipt
Receipt getReceipt(Id receiptId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theReceiptspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedReceiptmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aReceiptand retained for compatibility.- Parameters:
receiptId- theIdof theReceiptto retrieve- Returns:
- the returned
Receipt - Throws:
NotFoundException- noReceiptfound with the givenIdNullArgumentException-receiptIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getReceiptsByIds
ReceiptList getReceiptsByIds(IdList receiptIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aReceiptListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the receipts 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, inaccessibleReceiptsmay be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
receiptIds- the list ofIdsto retrieve- Returns:
- the returned
Receipt list - Throws:
NotFoundException- anId wasnot foundNullArgumentException-receiptIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getReceiptsByGenusType
ReceiptList getReceiptsByGenusType(Type receiptGenusType) throws OperationFailedException, PermissionDeniedException Gets aReceiptListcorresponding to the given receipt genusTypewhich does not include receipts of types derived from the specifiedType.In plenary mode, the returned list contains all known receipts or an error results. Otherwise, the returned list may contain only those receipts that are accessible through this session.- Parameters:
receiptGenusType- a receipt genus type- Returns:
- the returned
Receiptslist - Throws:
NullArgumentException-receiptGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getReceiptsByParentGenusType
ReceiptList getReceiptsByParentGenusType(Type receiptGenusType) throws OperationFailedException, PermissionDeniedException Gets aReceiptListcorresponding to the given receipt genusTypeand include any additional receipts with genus types derived from the specifiedType.In plenary mode, the returned list contains all known receipts or an error results. Otherwise, the returned list may contain only those receipts that are accessible through this session- Parameters:
receiptGenusType- a receipt genus type- Returns:
- the returned
Receiptslist - Throws:
NullArgumentException-receiptGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getReceiptsByRecordType
ReceiptList getReceiptsByRecordType(Type receiptRecordType) throws OperationFailedException, PermissionDeniedException Gets aReceiptListcontaining the given receipt recordType. In plenary mode, the returned list contains all known receipts or an error results. Otherwise, the returned list may contain only those receipts that are accessible through this session.- Parameters:
receiptRecordType- a receipt record type- Returns:
- the returned
Receiptlist - Throws:
NullArgumentException-receiptRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getReceiptsForMessage
ReceiptList getReceiptsForMessage(Id messageId) throws OperationFailedException, PermissionDeniedException Gets aReceiptListfor the given message. In plenary mode, the returned list contains all known receipts or an error results. Otherwise, the returned list may contain only those receipts that are accessible through this session.- Parameters:
messageId- a messageId- Returns:
- the returned
Receiptlist - Throws:
NullArgumentException-messageIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getReceiptsForRecipient
ReceiptList getReceiptsForRecipient(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets aReceiptListfor the given recipient. In plenary mode, the returned list contains all known receipts or an error results. Otherwise, the returned list may contain only those receipts that are accessible through this session.- Parameters:
resourceId- a resourceId- Returns:
- the returned
Receipts - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getReceiptsForMessageAndRecipient
ReceiptList getReceiptsForMessageAndRecipient(Id messageId, Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list ofReceiptsfor the given message and recipient. In plenary mode, the returned list contains all known receipts or an error results. Otherwise, the returned list may contain only those receipts that are accessible through this session.- Parameters:
messageId- a messageIdresourceId- a resourceId- Returns:
- the returned
Receipt - Throws:
NullArgumentException-messageIdorrecipientIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getReceipts
Gets allReceipts. In plenary mode, the returned list contains all known receipts or an error results. Otherwise, the returned list may contain only those receipts that are accessible through this session.- Returns:
- the returned
Receipt - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-