OSID Logo
OSID Specifications
resource package
Version 3.1.0
Interfaceosid.resource.ResourceAgentSession
Implementsosid.OsidSession
Used Byosid.resource.ResourceManager
osid.resource.ResourceProxyManager
Description

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

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
MethodgetBinId
Description

Gets the Bin Id associated with this session.

Returnosid.id.Id the Bin Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetBin
Description

Gets the Bin associated with this session.

Returnosid.resource.Bin the Bin associated with this session
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanLookupResourceAgentMappings
Description

Tests if this user can perform lookups of resource/agent mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returnboolean false if looking up mappings is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoduseComparativeAgentView
Description

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.

Compliancemandatory This method is must be implemented.
MethodusePlenaryAgentView
Description

A complete view of the 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.

Compliancemandatory This method is must be implemented.
MethoduseFederatedBinView
Description

Federates the view for methods in this session. A federated view will include resources in bins which are children of this bin in the bin hierarchy.

Compliancemandatory This method is must be implemented.
MethoduseIsolatedBinView
Description

Isolates the view for methods in this session. An isolated view restricts lookups to this bin only.

Compliancemandatory This method is must be implemented.
MethoduseImplicitResourceView
Description

Returns the Agents directly mapped to the Resource and any Resource implied by the given Resource through grouping or demographic rules.

Compliancemandatory This method is must be implemented.
MethoduseExplciitResourceView
Description

Returns the Agents only directly mapped to the given Resource.

Compliancemandatory This method is must be implemented.
MethodgetResourceIdByAgent
Description

Gets the Resource Id directly associated with the given agent.

Parametersosid.id.IdagentId Id of the Agent
Returnosid.id.Id associated resource
ErrorsNOT_FOUND agentId is not found
NULL_ARGUMENT agentId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetResourceByAgent
Description

Gets the Resource directly associated with the given agent.

Parametersosid.id.IdagentId Id of the Agent
Returnosid.resource.Resource associated resource
ErrorsNOT_FOUND agentId is not found
NULL_ARGUMENT agentId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetAgentIdsByResource
Description

Gets the list of Agent Ids associated with a Resource.

In implicit resource mode, Agents are returns for the given Resource and any Resource implied through grouping or demographic rules. Otherwise, only Agents explicitly mapped to the given Resource are returned.

Parametersosid.id.IdresourceId Id of a Resource
Returnosid.id.IdList list of agent Ids
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetAgentsByResource
Description

Gets the list of Agent Ids associated with a Resource.

In implicit resource mode, Agents are returns for the given Resource and any Resource implied through grouping or demographic rules. Otherwise, only Agents explicitly mapped to the given Resource are returned.

Parametersosid.id.IdresourceId Id of a Resource
Returnosid.authentication.AgentList list of agents
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetAgentIdsByResources
Description

Gets the list of Agent Ids associated with any of the given Resources.

In implicit resource mode, Agents are returns for the given Resource and any Resource implied through grouping or demographic rules. Otherwise, only Agents explicitly mapped to the given Resource are returned.

Parametersosid.id.IdListresourceIds Ids of the Resources
Returnosid.id.IdList list of agent Ids
ErrorsNULL_ARGUMENT resourceIds is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetAgentsByResources
Description

Gets the list of Agents associated with any of the given Resources.

In implicit resource mode, Agents are returns for the given Resource and any Resource implied through grouping or demographic rules. Otherwise, only Agents explicitly mapped to the given Resource are returned.

Parametersosid.id.IdListresourceIds Ids of the Resources
Returnosid.authentication.AgentList list of agents
ErrorsNULL_ARGUMENT resourceIds is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanCheckResourceAgentMappings
Description

Tests if this user can perform checks of resource/agent mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returnboolean false if checking up mappings is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodisAgentForResource
Description

Tests if the given Agent is associated with the given Resource.

In implicit resource mode, the given Resource and any Resource implied through grouping or demographic rules are checked. Otherwise, only the given Resource is checked.

Parametersosid.id.IdagentId Id of an Agent
osid.id.IdresourceId Id of a Resource
Returnboolean true of agentId is associated with the given resourceId, false otherwise
ErrorsNULL_ARGUMENT agentId or resourceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodisAgentForResources
Description

Tests if the given Agent is associated with any of the given Resources.

In implicit resource mode, the given Resource and any Resource implied through grouping or demographic rules are checked. Otherwise, only the given Resource is checked.

Parametersosid.id.IdagentId Id of an Agent
osid.id.IdListresourceIds Ids of the Resources
Returnboolean true of agentId is associated with any of the given resourceIds, false otherwise
ErrorsNULL_ARGUMENT agentId or resourceIds is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.