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

This session provides methods to re-assign Resource to Agents. A Resource may be associated with multiple Agents. An Agent may map to only one Resource.

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.
MethodcanAssignAgents
Description

Tests if this user can alter resource/agent mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanAssignAgentsToResource
Description

Tests if this user can alter resource/agent mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known location 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 assignment operations to unauthorized users.

Parametersosid.id.IdresourceId the Id of the Resource
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT resourceId is null
Compliancemandatory This method must be implemented.
MethodassignAgentToResource
Description

Adds an existing Agent to a Resource.

Parametersosid.id.IdagentId the Id of the Agent
osid.id.IdresourceId the Id of the Resource
ErrorsALREADY_EXISTS agentId is already assigned to resourceId
NOT_FOUND agentId or resourceId not found
NULL_ARGUMENT agentId or resourceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignAgentFromResource
Description

Removes an Agent from a Resource.

Parametersosid.id.IdagentId the Id of the Agent
osid.id.IdresourceId the Id of the Resource
ErrorsNOT_FOUND agentId or resourceId not found or agentId not assigned to resourceId
NULL_ARGUMENT agentId or resourceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodreassignAgentToResource
Description

Moves an Agent from one Resource to another.

Parametersosid.id.IdagentId the Id of the Agent
osid.id.IdfromResourceId the Id of the current Resource
osid.id.IdtoResourceId the Id of the destination Resource
ErrorsALREADY_EXISTS agentId already assigned to toBinId
NOT_FOUND agentId, fromResourceId, or toResourceId not found or agentId not mapped to fromResourceId
NULL_ARGUMENT agentId, fromResourceId, or toResourceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.