OSID Logo
OSID Specifications
authentication package
Version 3.1.0
Interfaceosid.authentication.AgentAgencyAssignmentSession
Implementsosid.OsidSession
Used Byosid.authentication.AuthenticationManager
osid.authentication.AuthenticationProxyManager
Description

This session provides methods to re-assign Agents to Agencies. An Agent may map to multiple Agencies and removing the last reference to an Agent is the equivalent of deleting it. Each Agency may have its own authorizations governing who is allowed to operate on it.

Moving or adding a reference of an Ageny to another Agency is not a copy operation (eg: does not change its Id).

MethodcanAssignAgents
Description

Tests if this user can alter agent/agency 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 lookup operations to unauthorized users.

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

Tests if this user can alter agent/agency 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 lookup operations to unauthorized users.

Parametersosid.id.IdagencyId the Id of the Agency
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT agencyId is null
Compliancemandatory This method must be implemented.
MethodgetAssignableAgencyIds
Description

Gets a list of agencies including and under the given agency node in which any agent can be assigned.

Parametersosid.id.IdagencyId the Id of the Agency
Returnosid.id.IdList list of assignable agency Ids
ErrorsNULL_ARGUMENT agencyId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetAssignableAgencyIdsForAgent
Description

Gets a list of agencies including and under the given agency node in which a specific agent can be assigned.

Parametersosid.id.IdagencyId the Id of the Agency
osid.id.IdagentId the Id of the Agent
Returnosid.id.IdList list of assignable bin Ids
ErrorsNULL_ARGUMENT agencyId or agentId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodassignAgentToAgency
Description

Adds an existing Agent to an Agency.

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

Removes an Agent from an Agency.

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

Moves an Agent from one Agency to another. Mappings to other Agencies are unaffected.

Parametersosid.id.IdagentId the Id of the Agent
osid.id.IdfromAgencyId the Id of the current Agency
osid.id.IdtoAgencyId the Id of the destination Agency
ErrorsALREADY_EXISTS agentId already assigned to toAgencyId
NOT_FOUND agentId, fromAgencyId, or toAgencyId not found or agentId not mapped to fromAgencyId
NULL_ARGUMENT agentId, fromAgencyId, or toAgencyId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.