OSID Logo
OSID Specifications
control package
Version 3.0.0
Release Candidate Preview
Interfaceosid.control.ControllerAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Controllers. The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create a Controller, a ControllerForm is requested using getControllerFormForCreate() specifying the record Types or none if no record Types are needed. The returned ControllerForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the ControllerForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ControllerForm corresponds to an attempted transaction.

For updates, ControllerForms are requested to the Controller Id that is to be updated using getControllerFormForUpdate(). Similarly, the ControllerForm has metadata about the data that can be updated and it can perform validation before submitting the update. The ControllerForm can only be used once for a successful update and cannot be reused.

The delete operations delete Controllers. To unmap a Controller from the current System, the ControllerSystemAssignmentSession should be used. These delete operations attempt to remove the Controller itself thus removing it from all known System catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetSystemId
Description

Gets the System Id associated with this session.

Returnosid.id.Idthe System Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetSystem
Description

Gets the System associated with this session.

Returnosid.control.Systemthe system
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateController
Description

Tests if this user can create controllers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Controller will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Controller creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateControllerWithRecordTypes
Description

Tests if this user can create a single Controller using the desired record types. While ControlManager.getControllerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Controller. Providing an empty array tests if a Controller can be created with no records.

Parametersosid.type.Type[]controllerRecordTypesarray of controller record types
Returnboolean true if Controller creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT controllerRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetControllerFormForCreate
Description

Gets the controller form for creating new controllers. A new form should be requested for each create transaction.

Parametersosid.type.Type[]controllerRecordTypesarray of controller record types
Returnosid.control.ControllerFormthe controller form
ErrorsNULL_ARGUMENT controllerRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateController
Description

Creates a new Controller.

Parametersosid.control.ControllerFormcontrollerFormthe form for this Controller
Returnosid.control.Controllerthe new Controller
ErrorsILLEGAL_STATE controllerForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT controllerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED controllerForm did not originate from getControllerFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateControllers
Description

Tests if this user can update controllers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Controller will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if Controller modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetControllerFormForUpdate
Description

Gets the controller form for updating an existing controller. A new controller form should be requested for each update transaction.

Parametersosid.id.IdcontrollerIdthe Id of the Controller
Returnosid.control.ControllerFormthe controller form
ErrorsNOT_FOUND controllerId is not found
NULL_ARGUMENT controllerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateController
Description

Updates an existing controller.

Parametersosid.control.ControllerFormcontrollerFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE controllerForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT controllerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED controllerForm did not originate from getControllerFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteControllers
Description

Tests if this user can delete controllers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Controller will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Controller deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteController
Description

Deletes a Controller.

Parametersosid.id.IdcontrollerIdthe Id of the Controller to remove
ErrorsNOT_FOUND controllerId not found
NULL_ARGUMENT controllerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageControllerAliases
Description

Tests if this user can manage Id aliases for controllers. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Controller aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasController
Description

Adds an Id to a Controller for the purpose of creating compatibility. The primary Id of the Controller is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another controller, it is reassigned to the given controller Id.

Parametersosid.id.IdcontrollerIdthe Id of a Controller
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND controllerId not found
NULL_ARGUMENT controllerId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.