public interface ResourceAgentSession extends OsidSession
This session provides methods to retrieve Resource
to
Agent
mappings. An Agent
may map to only one
Resource
while a Resource
may map to
multiple Agents.
This lookup session defines several views
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupResourceAgentMappings()
Tests if this user can perform lookups of resource/agent mappings.
|
IdList |
getAgentIdsByResource(Id resourceId)
Gets the list of
Agent Ids mapped to a
Resource. |
AgentList |
getAgentsByResource(Id resourceId)
Gets the list of
Agents mapped to a Resource. |
Bin |
getBin()
Gets the
Bin associated with this session. |
Id |
getBinId()
Gets the
Bin Id associated with this
session. |
Resource |
getResourceByAgent(Id agentId)
Gets the
Resource associated with the given agent. |
Id |
getResourceIdByAgent(Id agentId)
Gets the
Resource Id associated with the
given agent. |
void |
useComparativeAgentView()
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 |
useFederatedBinView()
Federates the view for methods in this session.
|
void |
useIsolatedBinView()
Isolates the view for methods in this session.
|
void |
usePlenaryAgentView()
A complete view of the
Agent returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBinId()
Bin
Id
associated with this
session. Bin Id
associated with this sessionmandatory
- This method must be implemented. Bin getBin() throws OperationFailedException, PermissionDeniedException
Bin
associated with this session. Bin
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupResourceAgentMappings()
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 useComparativeAgentView()
mandatory
- This method is must be implemented. void usePlenaryAgentView()
Agent
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 useFederatedBinView()
mandatory
- This method is must be implemented. void useIsolatedBinView()
mandatory
- This method is must be implemented. Id getResourceIdByAgent(Id agentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Resource
Id
associated with the
given agent.agentId
- Id
of the Agent
NotFoundException
- agentId
is not foundNullArgumentException
- agentId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. Resource getResourceByAgent(Id agentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Resource
associated with the given agent.agentId
- Id
of the Agent
NotFoundException
- agentId
is not foundNullArgumentException
- agentId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getAgentIdsByResource(Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Agent
Ids
mapped to a
Resource.
resourceId
- Id
of a Resource
Ids
NotFoundException
- resourceId
is not
foundNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AgentList getAgentsByResource(Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Agents
mapped to a Resource.
resourceId
- Id
of a Resource
NotFoundException
- resourceId
is not
foundNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.