OSID Logo
OSID Specifications
resource package
Version 3.0.0
Release Candidate Preview
Interfaceosid.resource.ResourceAgentAssignmentSession
Implementsosid.OsidSession
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.Idthe Bin Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetBin
Description

Gets the Bin associated with this session.

Returnosid.resource.Binthe Bin associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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
CompliancemandatoryThis 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.IdresourceIdthe Id of the Resource
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT resourceId is null
CompliancemandatoryThis method must be implemented.
MethodassignAgentToResource
Description

Adds an existing Agent to a Resource.

Parametersosid.id.IdagentIdthe Id of the Agent
osid.id.IdresourceIdthe 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_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignAgentFromResource
Description

Removes an Agent from a Resource.

Parametersosid.id.IdagentIdthe Id of the Agent
osid.id.IdresourceIdthe 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_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.