Interface JournalEntryLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving journal entries. A
JournalEntry is a version entry for an OSID Id .
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 journal view: All journal entry methods in this session
operate, retrieve and pertain to journal entries defined explicitly in
the current journal. Using an isolated view is useful for managing
journal entries with the
JournalEntryAdminSession. - federated journal view: All journal entry lookup methods in this session operate, retrieve and pertain to all journal entries defined in this journal and any other journals implicitly available in this journal through journal inheritence.
The methods useFederatedJournalView() and
useIsolatedJournalView() 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 jpurnal entries.Gets theJournalassociated with this session.Gets all journal entries.getJournalEntriesByDateForBranch(Id branchId, DateTime date) Gets the journal entry corresponding to a resourceIdand date.getJournalEntriesByDateForBranchAndSource(Id branchId, Id sourceId, DateTime date) Gets the journal entry corresponding to a branch and sourceIdand date.getJournalEntriesByDateForResource(Id resourceId, DateTime date) Gets the journal entry corresponding to a resourceIdand date.getJournalEntriesByDateForSource(Id sourceId, DateTime date) Gets the journal entry corresponding to a sourceIdand date.getJournalEntriesByDateRangeForBranch(Id branchId, DateTime from, DateTime to) Gets a list of journal entries corresponding to a branchIdand date range.getJournalEntriesByDateRangeForBranchAndSource(Id branchId, Id sourceId, DateTime from, DateTime to) Gets a list of journal entries corresponding to a branch and sourceIdand date range.getJournalEntriesByDateRangeForResource(Id resourceId, DateTime from, DateTime to) Gets a list of journal entries corresponding to a resourceIdand date range.getJournalEntriesByDateRangeForSource(Id sourceId, DateTime from, DateTime to) Gets a list of journal entries corresponding to a sourceIdand date range.getJournalEntriesByGenusType(Type journalEntryGenusType) Gets aJournalEntryListcorresponding to the given journal entry genusTypewhich does not include journal entries of genus types derived from the specifiedType.getJournalEntriesByIds(IdList journalEntryIds) Gets aJournalEntryListcorresponding to the givenIdList.getJournalEntriesByParentGenusType(Type journalEntryGenusType) Gets aJournalEntryListcorresponding to the given journal entry genusTypeand include any additional journal entries with genus types derived from the specifiedType.getJournalEntriesByRecordType(Type journalEntryRecordType) Gets aJournalEntryListcontaining the given journal entry recordType.getJournalEntriesForBranch(Id branchId) Gets a list of journal entries corresponding to a branchId.getJournalEntriesForBranchAndSource(Id branchId, Id sourceId) Gets a list of journal entries corresponding to a branch and sourceId.getJournalEntriesForResource(Id resourceId) Gets a list of journal entries corresponding to a resourceId.getJournalEntriesForSource(Id sourceId) Gets a list of journal entries corresponding to a sourceId.getJournalEntry(Id journalEntryId) Gets theJournalEntryspecified by itsId.Gets theJournalIdassociated with this session.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 theJournalEntryreturns 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
-
getJournalId
Id getJournalId()Gets theJournalIdassociated with this session.- Returns:
- the
Journal Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getJournal
Gets theJournalassociated with this session.- Returns:
- the journal
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupJournalEntries
boolean canLookupJournalEntries()Tests if this user can lookup jpurnal entries. 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 journal reading methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeJournalEntryView
void useComparativeJournalEntryView()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.
-
usePlenaryJournalEntryView
void usePlenaryJournalEntryView()A complete view of theJournalEntryreturns 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.
-
useFederatedJournalView
void useFederatedJournalView()Federates the view for methods in this session. A federated view will include entries in journals which are children of this journal in the journal hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedJournalView
void useIsolatedJournalView()Isolates the view for methods in this session. An isolated view restricts retrievals to this journal only.- Compliance:
mandatory- This method is must be implemented.
-
getJournalEntry
JournalEntry getJournalEntry(Id journalEntryId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theJournalEntryspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedJournalEntrymay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aJournalEntryand retained for compatibility.- Parameters:
journalEntryId- theIdof theJournalEntryto retrieve- Returns:
- the returned
JournalEntry - Throws:
NotFoundException- noJournalEntryfound with the givenIdNullArgumentException-journalEntryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesByIds
JournalEntryList getJournalEntriesByIds(IdList journalEntryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aJournalEntryListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the entries 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 entries may be omitted from the list and may present the elements in any order including returning a unique set.- Parameters:
journalEntryIds- the list ofIdsto retrieve- Returns:
- the returned
JournalEntry list - Throws:
NotFoundException- anId wasnot foundNullArgumentException-journalEntryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesByGenusType
JournalEntryList getJournalEntriesByGenusType(Type journalEntryGenusType) throws OperationFailedException, PermissionDeniedException Gets aJournalEntryListcorresponding to the given journal entry genusTypewhich does not include journal entries of genus types derived from the specifiedType. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
journalEntryGenusType- a journal entry genus type- Returns:
- the returned
JournalEntrylist - Throws:
NullArgumentException-journalEntryGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesByParentGenusType
JournalEntryList getJournalEntriesByParentGenusType(Type journalEntryGenusType) throws OperationFailedException, PermissionDeniedException Gets aJournalEntryListcorresponding to the given journal entry genusTypeand include any additional journal entries with genus types derived from the specifiedType. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
journalEntryGenusType- a journal entry genus type- Returns:
- the returned
JournalEntrylist - Throws:
NullArgumentException-journalEntryGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesByRecordType
JournalEntryList getJournalEntriesByRecordType(Type journalEntryRecordType) throws OperationFailedException, PermissionDeniedException Gets aJournalEntryListcontaining the given journal entry recordType. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
journalEntryRecordType- a journal entry record type- Returns:
- the returned
JournalEntrylist - Throws:
NullArgumentException-journalEntryRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesForBranch
JournalEntryList getJournalEntriesForBranch(Id branchId) throws OperationFailedException, PermissionDeniedException Gets a list of journal entries corresponding to a branchId. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
branchId- theIdof the branch- Returns:
- the returned
JournalEntryList - Throws:
NullArgumentException-branchIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesByDateForBranch
JournalEntryList getJournalEntriesByDateForBranch(Id branchId, DateTime date) throws OperationFailedException, PermissionDeniedException Gets the journal entry corresponding to a resourceIdand date. The entries returned have a date equal to or more recent than the requested date. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
branchId- theIdof the branchdate- from date- Returns:
- the returned
JournalEntryList - Throws:
NullArgumentException-branchIdordateisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesByDateRangeForBranch
JournalEntryList getJournalEntriesByDateRangeForBranch(Id branchId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of journal entries corresponding to a branchIdand date range. Entries are returned with dates that fall between the requested dates inclusive. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
branchId- theIdof the branchfrom- from dateto- to date- Returns:
- the returned
JournalEntryList - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-branchId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesForSource
JournalEntryList getJournalEntriesForSource(Id sourceId) throws OperationFailedException, PermissionDeniedException Gets a list of journal entries corresponding to a sourceId. A sourceIdof any version may be requested. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
sourceId- theIdof the source- Returns:
- the returned
JournalEntryList - Throws:
NullArgumentException-sourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesByDateForSource
JournalEntryList getJournalEntriesByDateForSource(Id sourceId, DateTime date) throws OperationFailedException, PermissionDeniedException Gets the journal entry corresponding to a sourceIdand date. The entry returned has a date equal to or more recent than the requested date. ThesourceIdmay correspond to any version. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
sourceId- a sourceIddate- from date- Returns:
- the returned
JournalEntryList - Throws:
NullArgumentException-sourceIdortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesByDateRangeForSource
JournalEntryList getJournalEntriesByDateRangeForSource(Id sourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of journal entries corresponding to a sourceIdand date range. Entries are returned with dates that fall between the requested dates inclusive. ThesourceIdmay correspond to any version. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
sourceId- a sourceIdfrom- from dateto- to date- Returns:
- the returned
JournalEntryList - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-sourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesForBranchAndSource
JournalEntryList getJournalEntriesForBranchAndSource(Id branchId, Id sourceId) throws OperationFailedException, PermissionDeniedException Gets a list of journal entries corresponding to a branch and sourceId. A sourceIdof any version may be requested. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
branchId- theIdof the branchsourceId- theIdof the source- Returns:
- the returned
JournalEntryList - Throws:
NullArgumentException-branchIdorsourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesByDateForBranchAndSource
JournalEntryList getJournalEntriesByDateForBranchAndSource(Id branchId, Id sourceId, DateTime date) throws OperationFailedException, PermissionDeniedException Gets the journal entry corresponding to a branch and sourceIdand date. The entry returned has a date equal to or more recent than the requested date. ThesourceIdmay correspond to any version. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
branchId- a branchIdsourceId- theIdof the sourcedate- from date- Returns:
- the returned
JournalEntryList - Throws:
NullArgumentException-branchId, sourceIdordateisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesByDateRangeForBranchAndSource
JournalEntryList getJournalEntriesByDateRangeForBranchAndSource(Id branchId, Id sourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of journal entries corresponding to a branch and sourceIdand date range. Entries are returned with dates that fall between the requested dates inclusive. ThesourceIdmay correspond to any version In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
branchId- a branchIdsourceId- theIdof the sourcefrom- from dateto- to date- Returns:
- the returned
JournalEntryList - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-branchId, sourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesForResource
JournalEntryList getJournalEntriesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list of journal entries corresponding to a resourceId. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
resourceId- theIdof the resource- Returns:
- the returned
JournalEntryList - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesByDateForResource
JournalEntryList getJournalEntriesByDateForResource(Id resourceId, DateTime date) throws OperationFailedException, PermissionDeniedException Gets the journal entry corresponding to a resourceIdand date. The entry returned has a date equal to or more recent than the requested date. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
resourceId- theIdof the resourcedate- from date- Returns:
- the returned
JournalEntryList - Throws:
NullArgumentException-resourceIdordateisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntriesByDateRangeForResource
JournalEntryList getJournalEntriesByDateRangeForResource(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of journal entries corresponding to a resourceIdand date range. Entries are returned with dates that fall between the requested dates inclusive. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Parameters:
resourceId- theIdof the resourcefrom- from dateto- to date- Returns:
- the returned
JournalEntryList - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-resourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getJournalEntries
Gets all journal entries. In plenary mode, the returned list contains all known entries or an error results. Otherwise, the returned list may contain only those entries that are accessible through this session. In both cases, the order of the set is not specifed. In plenary mode, the returned list contains all known journal entries or an error results. Otherwise, the returned list may contain only those journal entries that are accessible through this session.- Returns:
- a list of journal entries
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-