OSID Logo
OSID Specifications
authentication package
Version 3.0.0
Release Candidate Preview
Interfaceosid.authentication.AgentAgencyAssignmentSession
Implementsosid.OsidSession
Description

This session provides methods to re-assign Agents to Agencies An Agent may map to multiple Agency objects 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
CompliancemandatoryThis 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.IdagencyIdthe Id of the Agency
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT agencyId is null
CompliancemandatoryThis 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.IdagencyIdthe Id of the Agency
Returnosid.id.IdListlist of assignable agency Ids
ErrorsNULL_ARGUMENT agencyId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis 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.IdagencyIdthe Id of the Agency
osid.id.IdagentIdthe Id of the Agent
Returnosid.id.IdListlist of assignable bin Ids
ErrorsNULL_ARGUMENT agencyId or agentId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignAgentToAgency
Description

Adds an existing Agent to an Agency.

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

Removes an Agent from an Agency.

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

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

Parametersosid.id.IdagentIdthe Id of the Agent
osid.id.IdfromAgencyIdthe Id of the current Agency
osid.id.IdtoAgencyIdthe Id of the destination Agency
ErrorsNOT_FOUND agentId, fromAgencyId, or toAgencyId not found or agentId not mapped to fromAgencyId
NULL_ARGUMENT agentId, fromAgencyId, or toAgencyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.