OSID Logo
OSID Specifications
rules check package
Version 3.0.0
Release Candidate Preview
Interfaceosid.rules.check.InstructionEngineAssignmentSession
Implementsosid.OsidSession
Description

This session provides methods to re-assign Instructions to Engine mappings. An Instruction may appear in multiple Engine objects and removing the last reference to an Instruction is the equivalent of deleting it. Each Engine may have its own authorizations governing who is allowed to operate on it.

Adding a reference of an Instruction to another Engine is not a copy operation (eg: does not change its Id ).

MethodcanAssignInstructions
Description

Tests if this user can alter instruction/engine 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 instruction is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignInstructionsToEngine
Description

Tests if this user can alter instruction/engine 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.IdengineIdthe Id of the Engine
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT engineId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableEngineIds
Description

Gets a list of engines including and under the given engine node in which any instruction can be assigned.

Parametersosid.id.IdengineIdthe Id of the Engine
Returnosid.id.IdListlist of assignable engine Ids
ErrorsNULL_ARGUMENT engineId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableEngineIdsForInstruction
Description

Gets a list of engines including and under the given engine node in which a specific instruction can be assigned.

Parametersosid.id.IdengineIdthe Id of the Engine
osid.id.IdinstructionIdthe Id of the Instruction
Returnosid.id.IdListlist of assignable engine Ids
ErrorsNULL_ARGUMENT engineId or instructionId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignInstructionToEngine
Description

Adds an existing Instruction to a Engine.

Parametersosid.id.IdinstructionIdthe Id of the Instruction
osid.id.IdengineIdthe Id of the Engine
ErrorsALREADY_EXISTS instructionId is already assigned to engineId
NOT_FOUND instructionId or engineId not found
NULL_ARGUMENT instructionId or engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignInstructionFromEngine
Description

Removes an Instruction from a Engine.

Parametersosid.id.IdinstructionIdthe Id of the Instruction
osid.id.IdengineIdthe Id of the Engine
ErrorsNOT_FOUND instructionId or engineId not found or instructionId not assigned to engineId
NULL_ARGUMENT instructionId or engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.