public interface KeyAgencySession extends OsidSession
This session provides methods to retrieve Keys
to
Agency
mappings. An Key
may appear in multiple
Agency
objects. Each Agency
may have its own
authorizations governing who is allowed to look at it.
This lookup session defines two views:
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupKeyAgencyMappings()
Tests if this user can perform lookups of key/agency mappings.
|
AgencyList |
getAgenciesByKey(Id keyId)
Gets the list of
Agency objects mapped to an
Key. |
IdList |
getAgencyIdsByKey(Id keyId)
Gets the list of
Agency Ids mapped to an
Key. |
IdList |
getKeyIdsByAgencies(IdList agencyIds)
Gets the list of
Key Ids corresponding to a list of
Agency objects. |
IdList |
getKeyIdsByAgency(Id agencyId)
Gets the list of
Key Ids associated with
an Agency. |
KeyList |
getKeysByAgencies(IdList agencyIds)
Gets the list of
Keys corresponding to a list of
Agency objects. |
KeyList |
getKeysByAgency(Id agencyId)
Gets the list of
Keys associated with an Agency. |
void |
useComparativeAgencyView()
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 |
usePlenaryAgencyView()
A complete view of the
Key and Agency
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupKeyAgencyMappings()
PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer lookup operations
to unauthorized users. false
if looking up mappings is not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeAgencyView()
mandatory
- This method is must be implemented. void usePlenaryAgencyView()
Key
and Agency
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. IdList getKeyIdsByAgency(Id agencyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Key
Ids
associated with
an Agency.
agencyId
- Id
of the Agency
Ids
NotFoundException
- agencyId
is not
foundNullArgumentException
- agencyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. KeyList getKeysByAgency(Id agencyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Keys
associated with an Agency.
agencyId
- Id
of the Agency
NotFoundException
- agencyId
is not
foundNullArgumentException
- agencyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getKeyIdsByAgencies(IdList agencyIds) throws OperationFailedException, PermissionDeniedException
Key Ids
corresponding to a list of
Agency
objects.agencyIds
- list of agency Ids
Ids
NullArgumentException
- agencyIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. KeyList getKeysByAgencies(IdList agencyIds) throws OperationFailedException, PermissionDeniedException
Keys
corresponding to a list of
Agency
objects.agencyIds
- list of agency Ids
NullArgumentException
- agencyIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getAgencyIdsByKey(Id keyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Agency
Ids
mapped to an
Key.
keyId
- Id
of an Key
Ids
NotFoundException
- keyId
is not foundNullArgumentException
- keyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AgencyList getAgenciesByKey(Id keyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Agency
objects mapped to an
Key.
keyId
- Id
of an Key
NotFoundException
- keyId
is not foundNullArgumentException
- keyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.