public interface AgentAgencySession extends OsidSession
This session provides methods to retrieve Agents
to
Agency
mappings. An Agent
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 |
canLookupAgentAgencyMappings()
Tests if this user can perform lookups of agent/agency mappings.
|
AgencyList |
getAgenciesByAgent(Id agentId)
Gets the list of
Agency objects mapped to an
Agent. |
IdList |
getAgencyIdsByAgent(Id agentId)
Gets the list of
Agency Ids mapped to an
Agent. |
IdList |
getAgentIdsByAgencies(IdList agencyIds)
Gets the list of
Agent Ids corresponding to a list of
Agency objects. |
IdList |
getAgentIdsByAgency(Id agencyId)
Gets the list of
Agent Ids associated
with an Agency. |
AgentList |
getAgentsByAgencies(IdList agencyIds)
Gets the list of
Agents corresponding to a list of
Agency objects. |
AgentList |
getAgentsByAgency(Id agencyId)
Gets the list of
Agents 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
Agent and Agency
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupAgentAgencyMappings()
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()
Agent
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 getAgentIdsByAgency(Id agencyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Agent
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. AgentList getAgentsByAgency(Id agencyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Agents
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 getAgentIdsByAgencies(IdList agencyIds) throws OperationFailedException, PermissionDeniedException
Agent 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. AgentList getAgentsByAgencies(IdList agencyIds) throws OperationFailedException, PermissionDeniedException
Agents
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 getAgencyIdsByAgent(Id agentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Agency
Ids
mapped to an
Agent.
agentId
- Id
of an Agent
Ids
NotFoundException
- agentId
is not foundNullArgumentException
- agentId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AgencyList getAgenciesByAgent(Id agentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Agency
objects mapped to an
Agent.
agentId
- Id
of an Agent
NotFoundException
- agentId
is not foundNullArgumentException
- agentId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.