public interface BranchLookupSession extends OsidSession
This session defines methods for retrieving branches. A Branch
is an arbitrary entity that may represent a person, place or thing
used to identify an object used in various services.
This lookup session defines several views:
Branches with the BranchAdminSession. The methods useFederatedJournalView() and
useIsolatedJournalView() behave as a radio group and one should be
selected before invoking any lookup methods.
Branches may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Branch.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupBranches()
Tests if this user can perform
Branch lookups. |
Branch |
getBranch(Id branchId)
Gets the
Branch specified by its Id. |
BranchList |
getBranches()
Gets all
Branches. |
BranchList |
getBranchesByGenusType(Type branchGenusType)
Gets a
BranchList corresponding to the given branch
genus Type which does not include branches of types
derived from the specified Type. |
BranchList |
getBranchesByIds(IdList branchIds)
Gets a
BranchList corresponding to the given
IdList. |
BranchList |
getBranchesByParentGenusType(Type branchGenusType)
Gets a
BranchList corresponding to the given branch
genus Type and include any additional branches with
genus types derived from the specified Type. |
BranchList |
getBranchesByRecordType(Type branchRecordType)
Gets a
BranchList containing the given branch record
Type. |
Journal |
getJournal()
Gets the
Journal associated with this session. |
Id |
getJournalId()
Gets the
Journal Id associated with this
session. |
void |
useActiveBranchView()
Methods return only branches that are active.
|
void |
useAnyStatusBranchView()
Actuve and inactive branches are returned from lookup methods in this
session.
|
void |
useComparativeBranchView()
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 |
useFederatedJournalView()
Federates the view for methods in this session.
|
void |
useIsolatedJournalView()
Isolates the view for methods in this session.
|
void |
usePlenaryBranchView()
A complete view of the
Branch returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getJournalId()
Journal Id associated with this
session. Journal Id associated with this sessionmandatory - This method must be implemented. Journal getJournal() throws OperationFailedException, PermissionDeniedException
Journal associated with this session. Journal associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupBranches()
Branch lookups. 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 lookup operations. false if lookup methods are not authorized,
true otherwisemandatory - This method must be implemented. void useComparativeBranchView()
mandatory - This method is must be implemented. void usePlenaryBranchView()
Branch 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 useFederatedJournalView()
mandatory - This method is must be implemented. void useIsolatedJournalView()
mandatory - This method is must be implemented. void useActiveBranchView()
mandatory - This method is must be implemented. void useAnyStatusBranchView()
mandatory - This method is must be implemented. Branch getBranch(Id branchId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Branch specified by its Id. In
plenary mode, the exact Id is found or a
NOT_FOUND results. Otherwise, the returned Branch
may have a different Id than requested, such as
the case where a duplicate Id was assigned to a
Branch and retained for compatibility.branchId - the Id of the Branch to
retrieve Branch NotFoundException - no Branch found with
the given Id NullArgumentException - branchId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BranchList getBranchesByIds(IdList branchIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
BranchList corresponding to the given
IdList. In plenary mode, the returned list contains all of the
branches 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 Branches may be omitted from the list and
may present the elements in any order including returning a unique
set.branchIds - the list of Ids to retrieve Branch listNotFoundException - an Id was not foundNullArgumentException - branchIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BranchList getBranchesByGenusType(Type branchGenusType) throws OperationFailedException, PermissionDeniedException
BranchList corresponding to the given branch
genus Type which does not include branches of types
derived from the specified Type. In plenary mode, the
returned list contains all known branches or an error results.
Otherwise, the returned list may contain only those branches that are
accessible through this session.branchGenusType - a branch genus type Branch listNullArgumentException - branchGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BranchList getBranchesByParentGenusType(Type branchGenusType) throws OperationFailedException, PermissionDeniedException
BranchList corresponding to the given branch
genus Type and include any additional branches with
genus types derived from the specified Type. In plenary
mode, the returned list contains all known branches or an error
results. Otherwise, the returned list may contain only those branches
that are accessible through this session.branchGenusType - a branch genus type Branch listNullArgumentException - branchGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BranchList getBranchesByRecordType(Type branchRecordType) throws OperationFailedException, PermissionDeniedException
BranchList containing the given branch record
Type. In plenary mode, the returned list contains all
known branches or an error results. Otherwise, the returned list may
contain only those branches that are accessible through this session.branchRecordType - a branch record type Branch listNullArgumentException - branchRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BranchList getBranches() throws OperationFailedException, PermissionDeniedException
Branches. In plenary mode, the returned list
contains all known branches or an error results. Otherwise, the
returned list may contain only those branches that are accessible
through this session. Branches OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.