public interface OrganizationLookupSession extends OsidSession
This session defines methods for retrieving organizations.
This lookup session defines several views:
OrganizationAdminSession.
The methods useFederatedRealmView()
and
useIsolatedRealmView()
behave as a radio group and one should be
selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupOrganizations()
Tests if this user can examine this realm.
|
Organization |
getOrganization(Id organizationId)
Gets the
Organization specified by its Id. |
OrganizationList |
getOrganizations()
Gets all organizations.
|
OrganizationList |
getOrganizationsByGenusType(Type organizationGenusType)
Gets an
OrganizationList corresponding to the given
organization genus Type which does not include
organizations of types derived from the specified Type. |
OrganizationList |
getOrganizationsByIds(IdList organizationIds)
Gets an
OrganizationList corresponding to the given
IdList. |
OrganizationList |
getOrganizationsByParentGenusType(Type organizationGenusType)
Gets an
OrganizationList corresponding to the given
organization genus Type and include any additional
organizations with genus types derived from the specified Type. |
OrganizationList |
getOrganizationsByRecordType(Type organizationRecordType)
Gets an
OrganizationList containing the given
organization record Type. |
OrganizationList |
getOrganizationsOnDate(DateTime from,
DateTime to)
Gets an
OrganizationList effective during the entire
given date range inclusive but not confined to the date range. |
Realm |
getRealm()
Gets the
Realm associated with this session. |
Id |
getRealmId()
Gets the
Realm Id associated with this
session. |
void |
useAnyEffectiveOrganizationView()
All organizations of any effective dates are returned by methods in
this session.
|
void |
useComparativeOrganizationView()
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 |
useEffectiveOrganizationView()
Only organizations whose effective dates are current are returned by
methods in this session.
|
void |
useFederatedRealmView()
Federates the view for methods in this session.
|
void |
useIsolatedRealmView()
Isolates the view for methods in this session.
|
void |
usePlenaryOrganizationView()
A complete view of the
Organization returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getRealmId()
Realm
Id
associated with this
session. Realm Id
associated with this sessionmandatory
- This method must be implemented. Realm getRealm() throws OperationFailedException, PermissionDeniedException
Realm
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupOrganizations()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer these operations. false
if realm reading methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useComparativeOrganizationView()
mandatory
- This method is must be implemented. void usePlenaryOrganizationView()
Organization
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 useFederatedRealmView()
mandatory
- This method is must be implemented. void useIsolatedRealmView()
mandatory
- This method is must be implemented. void useEffectiveOrganizationView()
mandatory
- This method is must be implemented. void useAnyEffectiveOrganizationView()
mandatory
- This method is must be implemented. Organization getOrganization(Id organizationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Organization
specified by its Id.
In plenary mode, the exact Id
is found
or a NOT_FOUND
results. Otherwise, the returned
Organization
may have a different Id
than
requested, such as the case where a duplicate Id
was
assigned to an Organization
and retained for
compatibility.
In effective mode, organizations are returned that are currently
effective. In any effective mode, effective organizations and those
currently expired are returned.organizationId
- the Id
of the
Organization
to retrieve Organization
NotFoundException
- no Organization
found with the given Id
NullArgumentException
- organizationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrganizationList getOrganizationsByIds(IdList organizationIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
OrganizationList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
organizations 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 organizations may be omitted from the list and may
present the elements in any order including returning a unique set.
In effective mode, organizations are returned that are currently
effective. In any effective mode, effective organizations and those
currently expired are returned.organizationIds
- the list of Ids
to retrieve Organization list
NotFoundException
- an Id was
not foundNullArgumentException
- organizationIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrganizationList getOrganizationsByGenusType(Type organizationGenusType) throws OperationFailedException, PermissionDeniedException
OrganizationList
corresponding to the given
organization genus Type
which does not include
organizations of types derived from the specified Type.
In plenary mode, the returned list contains all known
organizations or an error results. Otherwise, the returned list may
contain only those organizations that are accessible through this
session.
In effective mode, organizations are returned that are currently
effective. In any effective mode, effective organizations and those
currently expired are returned.organizationGenusType
- an organizations genus type Organization list
NullArgumentException
- organizationGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrganizationList getOrganizationsByParentGenusType(Type organizationGenusType) throws OperationFailedException, PermissionDeniedException
OrganizationList
corresponding to the given
organization genus Type
and include any additional
organizations with genus types derived from the specified Type.
In plenary mode, the returned list contains all known
organizations or an error results. Otherwise, the returned list may
contain only those organizations that are accessible through this
session.
In effective mode, organizations are returned that are currently
effective. In any effective mode, effective organizations and those
currently expired are returned.organizationGenusType
- an organization genus type Organization list
NullArgumentException
- organizationGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrganizationList getOrganizationsByRecordType(Type organizationRecordType) throws OperationFailedException, PermissionDeniedException
OrganizationList
containing the given
organization record Type.
In plenary mode, the returned list contains all known
organizations or an error results. Otherwise, the returned list may
contain only those organizations that are accessible through this
session.
In effective mode, organizations are returned that are currently
effective. In any effective mode, effective organizations and those
currently expired are returned.organizationRecordType
- an organization record type OrganizationList
NullArgumentException
- organizationRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrganizationList getOrganizationsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
OrganizationList
effective during the entire
given date range inclusive but not confined to the date range.
In plenary mode, the returned list contains all known organizations or
an error results. Otherwise, the returned list may contain only those
organizations that are accessible through this session.
In effective mode, organizations are returned that are currently
effective. In any effective mode, effective organizations and those
currently expired are returned.from
- start of date rangeto
- end of date range OrganizationList
InvalidArgumentException
- from
is
greater than to
NullArgumentException
- from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. OrganizationList getOrganizations() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.