OSID Logo
OSID Specifications
configuration package
Version 3.0.0
Release Candidate Preview
Interfaceosid.configuration.ParameterAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Parameters. 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 Parameter, a ParameterForm is requested using getParameterFormForCreate() specifying the desired relationship peers and record Types or none if no record Types are needed. The returned ParameterForm 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 ParameterForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ParameterForm corresponds to an attempted transaction.

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

The delete operations delete Parameters. To unmap a Parameter from the current Configuration, the ParameterConfigurationAssignmentSession should be used. These delete operations attempt to remove the Parameter itself thus removing it from all known Configuration catalogs.

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

MethodgetConfigurationId
Description

Gets the Configuration Id associated with this session.

Returnosid.id.Idthe Configuration Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetConfiguration
Description

Gets the Configuration associated with this session.

Returnosid.configuration.Configurationthe Configuration associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateParameters
Description

Tests if this user can create Parameters. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Parameter 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 Parameter creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateParameterWithRecordTypes
Description

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

Parametersosid.type.Type[]parameterRecordTypesarray of parameter record types
Returnboolean true if Parameter creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT parameterRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetParameterFormForCreate
Description

Gets the paramater form for creating new parameters.

Parametersosid.type.Type[]parameterRecordTypesarray of parameter record types
Returnosid.configuration.ParameterFormthe parameter form
ErrorsNULL_ARGUMENT configurationRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateParameter
Description

Creates a new Parameter.

Parametersosid.configuration.ParameterFormparameterFormthe form for this Parameter
Returnosid.configuration.Parameterthe new Parameter
ErrorsILLEGAL_STATE parameterForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT parameterForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED parameterForm did not originate from getParameterFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateParameters
Description

Tests if this user can update Parameters. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Parameter 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 Parameter modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetParameterFormForUpdate
Description

Gets the parameter form for updating an existing parameters.

Parametersosid.id.IdparameterIdthe Id of the Parameter
Returnosid.configuration.ParameterFormthe parameter form
ErrorsNOT_FOUND parameterId is not found
NULL_ARGUMENT parameterId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateParameter
Description

Updates an existing parameter.

Parametersosid.configuration.ParameterFormparameterFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE parameterForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT parameterId or parameterForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED parameterForm did not originate from getParameterFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteParameters
Description

Tests if this user can delete Parameters. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Parameter 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 Parameter deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteParameter
Description

Deletes a Parameter.

Parametersosid.id.IdparameterIdthe Id of the Parameter to remove
ErrorsNOT_FOUND parameterId not found
NULL_ARGUMENT parameterId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageParameterAliases
Description

Tests if this user can manage Id aliases for Parameters. 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 Parameter aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasParameter
Description

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

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