OSID Logo
OSID Specifications
lexicon package
Version 3.0.0
Interfaceosid.lexicon.ParameterAdminSession
Implementsosid.OsidSession
Implemented Byosid.lexicon.batch.ParameterBatchAdminSession
Used Byosid.lexicon.LexiconManager
osid.lexicon.LexiconProxyManager
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 text 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 transidiom.

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 Press , the ParameterPressAssignmentSession should be used. These delete operations attempt to remove the Parameter itself thus removing it from all known Press catalogs.

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

MethodgetPressId
Description

Gets the Press Id associated with this session.

Returnosid.id.Idthe Press Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetPress
Description

Gets the Press associated with this session.

Returnosid.lexicon.Pressthe press
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateParameter
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.

Returnbooleanfalse 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 LexiconManager.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
Returnbooleantrue if Parameter creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENTparameterRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetParameterFormForCreate
Description

Gets the parameter form for creating new parameters. A new form should be requested for each create transidiom.

Parametersosid.id.IdtextIda text Id
osid.type.Type[]parameterRecordTypesarray of parameter record types
Returnosid.lexicon.ParameterFormthe parameter form
ErrorsNOT_FOUNDtextId is not found
NULL_ARGUMENTtextId or parameterRecordTypes 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.lexicon.ParameterFormparameterFormthe form for this Parameter
Returnosid.lexicon.Parameterthe new Parameter
ErrorsILLEGAL_STATEparameterForm already used in a create transidiom
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENTparameterForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDparameterForm 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.

Returnbooleanfalse if Parameter modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetParameterFormForUpdate
Description

Gets the parameter form for updating an existing parameter. A new parameter form should be requested for each update transidiom.

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

Updates an existing parameter.

Parametersosid.lexicon.ParameterFormparameterFormthe form containing the elements to be updated
ErrorsILLEGAL_STATEparameterForm already used in an update transidiom
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENTparameterForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDparameterForm 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.

Returnbooleanfalse 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_FOUNDparameterId not found
NULL_ARGUMENTparameterId 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.

Returnbooleanfalse 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_EXISTSaliasId is already assigned
NOT_FOUNDparameterId not found
NULL_ARGUMENTparameterId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.