OSID Logo
OSID Specifications
ordering rules package
Version 3.0.0
Release Candidate Preview
Interfaceosid.ordering.rules.PriceEnablerAdminSession
Implementsosid.OsidSession
Description

This session creates and removes price enablers. The data for create and update is provided via the PriceEnablerForm.

MethodgetStoreId
Description

Gets the Store Id associated with this session.

Returnosid.id.Idthe Store Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetStore
Description

Gets the Store associated with this session.

Returnosid.ordering.Storethe store
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreatePriceEnabler
Description

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

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

Parametersosid.type.Type[]priceEnablerRecordTypesarray of price enabler record types
Returnboolean true if PriceEnabler creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT priceEnablerRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetPriceEnablerFormForCreate
Description

Gets the price enabler form for creating new price enablers. A new form should be requested for each create transaction.

Parametersosid.type.Type[]priceEnablerRecordTypesarray of price enabler record types
Returnosid.ordering.rules.PriceEnablerFormthe price enabler form
ErrorsNULL_ARGUMENT priceEnablerRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreatePriceEnabler
Description

Creates a new PriceEnabler.

Parametersosid.ordering.rules.PriceEnablerFormpriceEnablerFormthe form for this PriceEnabler
Returnosid.ordering.rules.PriceEnablerthe new PriceEnabler
ErrorsILLEGAL_STATE priceEnablerForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT priceEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED priceEnablerForm did not originate from getPriceEnablerFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdatePriceEnablers
Description

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

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

Parametersosid.id.IdpriceEnablerIdthe Id of the PriceEnabler
Returnosid.ordering.rules.PriceEnablerFormthe price enabler form
ErrorsNOT_FOUND priceEnablerId is not found
NULL_ARGUMENT priceEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdatePriceEnabler
Description

Updates an existing price enabler.

Parametersosid.ordering.rules.PriceEnablerFormpriceEnablerFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE priceEnablerForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT priceEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED priceEnablerForm did not originate from getPriceEnablerFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeletePriceEnablers
Description

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

Deletes a PriceEnabler.

Parametersosid.id.IdpriceEnablerIdthe Id of the PriceEnabler to remove
ErrorsNOT_FOUND priceEnablerId not found
NULL_ARGUMENT priceEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManagePriceEnablerAliases
Description

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

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

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