OSID Logo
OSID Specifications
journaling package
Version 3.0.0
Release Candidate Preview
Interfaceosid.journaling.BranchLookupSession
Implementsosid.OsidSession
Description

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:

  • 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 branch methods in this session operate, retrieve and pertain to branches defined explicitly in the current journal. Using an isolated view is useful for managing Branches with the BranchAdminSession.
  • federated journal view: All branch methods in this session operate, retrieve and pertain to all branches defined in this journal and any other branches implicitly available in this journal through journal inheritence.
  • active branch view: Active brcnhes are returned in this session.
  • any status branch view: Active and inactive branches are returned in this session.

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.

MethodgetJournalId
Description

Gets the Journal Id associated with this session.

Returnosid.id.Idthe Journal Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetJournal
Description

Gets the Journal associated with this session.

Returnosid.journaling.Journalthe Journal associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupBranches
Description

Tests if this user can perform 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.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeBranchView
Description

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.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryBranchView
Description

A complete view of the 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.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedJournalView
Description

Federates the view for methods in this session. A federated view will include branches in journals which are children of this journal in the journal hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedJournalView
Description

Isolates the view for methods in this session. An isolated view restricts lookups to this journal only.

CompliancemandatoryThis method is must be implemented.
MethoduseActiveBranchView
Description

Methods return only branches that are active.

CompliancemandatoryThis method is must be implemented.
MethoduseAnyStatusBranchView
Description

Actuve and inactive branches are returned from lookup methods in this session.

CompliancemandatoryThis method is must be implemented.
MethodgetBranch
Description

Gets the 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.

Parametersosid.id.IdbranchIdthe Id of the Branch to retrieve
Returnosid.journaling.Branchthe returned Branch
ErrorsNOT_FOUNDno Branch found with the given Id
NULL_ARGUMENT branchId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetBranchesByIds
Description

Gets a 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.

Parametersosid.id.IdListbranchIdsthe list of Ids to retrieve
Returnosid.journaling.BranchListthe returned Branch list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT branchIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetBranchesByGenusType
Description

Gets a 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.

Parametersosid.type.TypebranchGenusTypea branch genus type
Returnosid.journaling.BranchListthe returned Branch list
ErrorsNULL_ARGUMENT branchGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetBranchesByParentGenusType
Description

Gets a 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.

Parametersosid.type.TypebranchGenusTypea branch genus type
Returnosid.journaling.BranchListthe returned Branch list
ErrorsNULL_ARGUMENT branchGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetBranchesByRecordType
Description

Gets a 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.

Parametersosid.type.TypebranchRecordTypea branch record type
Returnosid.journaling.BranchListthe returned Branch list
ErrorsNULL_ARGUMENT branchRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetBranches
Description

Gets all 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.

Returnosid.journaling.BranchLista list of Branches
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.