public interface PositionRealmSession extends OsidSession
This session provides methods to retrieve Position
to
Realm
mappings. A Position
may appear in
multiple Realms.
Each Realm
may have its own
authorizations governing who is allowed to look at it.
This lookup session defines several views:
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupPositionRealmMappings()
Tests if this user can perform lookups of position/realm mappings.
|
IdList |
getPositionIdsByRealm(Id realmId)
Gets the list of Position Ids associated with a
Realm. |
IdList |
getPositionIdsByRealms(IdList realmIds)
Gets the list of
Position Ids corresponding to a list
of Realm objects. |
PositionList |
getPositionsByRealm(Id realmId)
Gets the list of
Positions associated with a
Realm. |
PositionList |
getPositionsByRealms(IdList realmIds)
Gets the list of
Positions corresponding to a list of
Realms. |
IdList |
getRealmIdsByPosition(Id positionId)
Gets the list of
Realm Ids mapped to a
Position. |
RealmList |
getRealmsByPosition(Id positionId)
Gets the list of
Realm objects mapped to a
Position. |
void |
useComparativeRealmView()
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 |
usePlenaryRealmView()
A complete view of the
Position and Realm
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupPositionRealmMappings()
PERMISSION_DENIED.
This is intendedas
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 useComparativeRealmView()
mandatory
- This method is must be implemented. void usePlenaryRealmView()
Position
and Realm
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 getPositionIdsByRealm(Id realmId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Realm.
realmId
- Id
of a Realms.
Ids
NotFoundException
- realmId
is not foundNullArgumentException
- realmId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PositionList getPositionsByRealm(Id realmId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Positions
associated with a
Realm.
realmId
- Id
of a Realm
NotFoundException
- realmId
is not foundNullArgumentException
- realmId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getPositionIdsByRealms(IdList realmIds) throws OperationFailedException, PermissionDeniedException
Position Ids
corresponding to a list
of Realm
objects.realmIds
- list of realm Ids
Ids
NullArgumentException
- realmIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. PositionList getPositionsByRealms(IdList realmIds) throws OperationFailedException, PermissionDeniedException
Positions
corresponding to a list of
Realms.
realmIds
- list of realm Ids
NullArgumentException
- realmIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getRealmIdsByPosition(Id positionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Realm
Ids
mapped to a
Position.
positionId
- Id
of a Position
Ids
NotFoundException
- positionId
is not
foundNullArgumentException
- positionId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. RealmList getRealmsByPosition(Id positionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Realm
objects mapped to a
Position.
positionId
- Id
of a Position
NotFoundException
- positionId
is not
foundNullArgumentException
- positionId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.