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

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

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

The delete operations delete PriceSchedules. To unmap a PriceSchedule from the current Store, the PriceScheduleStoreAssignmentSession should be used. These delete operations attempt to remove the PriceSchedule itself thus removing it from all known Store catalogs.

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

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.
MethodcanCreatePriceSchedules
Description

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

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

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

Parametersosid.type.Type[]priceScheduleRecordTypesarray of price schedule record types
Returnboolean true if PriceSchedule creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT priceScheduleRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetPriceScheduleFormForCreate
Description

Gets the price schedule form for creating new prices. A new form should be requested for each create transaction.

Parametersosid.type.Type[]priceScheduleRecordTypesarray of price schedule record types
Returnosid.ordering.PriceScheduleFormthe price schedule form
ErrorsNULL_ARGUMENT priceScheduleRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreatePriceSchedule
Description

Creates a new PriceSchedule.

Parametersosid.ordering.PriceFormpriceScheduleFormthe form for this PriceSchedule
Returnosid.ordering.PriceSchedulethe new PriceSchedule
ErrorsILLEGAL_STATE priceScheduleForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT priceScheduleForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED priceScheduleForm did not originate from getPriceScheduleFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdatePriceSchedules
Description

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

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

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

Parametersosid.id.IdpriceScheduleIdthe Id of the Price
Returnosid.ordering.PriceScheduleFormthe price schedule form
ErrorsNULL_ARGUMENT priceScheduleId is null
CompliancemandatoryThis method must be implemented.
MethodupdatePriceSchedule
Description

Updates an existing price schedule.

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

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

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

Deletes a PriceSchedule.

Parametersosid.id.IdpriceScheduleIdthe Id of the PriceSchedule to remove
ErrorsNOT_FOUND priceScheduleId not found
NULL_ARGUMENT priceScheduleId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManagePriceScheduleAliases
Description

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

Adds an Id to a PriceSchedule for the purpose of creating compatibility. The primary Id of the PriceSchedule 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 schedule, it is reassigned to the given price schedule Id.

Parametersosid.id.IdpriceScheduleIdthe Id of a PriceSchedule
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND priceScheduleId not found
NULL_ARGUMENT priceScheduleId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreatePrices
Description

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

Parametersosid.id.IdpriceScheduleIdthe Id of a PriceSchedule
Returnboolean false if Price creation is not authorized, true otherwise
ErrorsNULL_ARGUMENT priceScheduleId is null
CompliancemandatoryThis method must be implemented.
MethodcanCreatePriceWithRecordTypes
Description

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

Parametersosid.id.IdpriceScheduleIdthe Id of a PriceSchedule
osid.type.Type[]priceRecordTypesarray of price record types
Returnboolean true if Price creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT priceScheduleId or priceRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetPriceFormForCreate
Description

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

Parametersosid.id.IdpriceScheduleIdthe Id of a PriceSchedule
osid.type.Type[]priceRecordTypesarray of price record types
Returnosid.grading.GradeFormthe price form
ErrorsNOT_FOUND priceScheduleId is not found
NULL_ARGUMENT priceScheduleId or priceRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreatePrice
Description

Creates a new Price.

Parametersosid.ordering.PriceFormpriceFormthe form for this Price
Returnosid.ordering.Pricethe new Price
ErrorsILLEGAL_STATE priceForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT priceForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED priceForm did not originate from getPriceFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdatePrices
Description

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

Parametersosid.id.IdpriceScheduleIdthe Id of a PriceSchedule
Returnboolean false if Price modification is not authorized, true otherwise
ErrorsNULL_ARGUMENT priceSchedule is null
CompliancemandatoryThis method must be implemented.
MethodgetPriceFormForUpdate
Description

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

Parametersosid.id.IdpriceIdthe Id of the Price
Returnosid.ordering.PriceFormthe price form
ErrorsNOT_FOUND priceId is not found
NULL_ARGUMENT priceId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodupdatePrice
Description

Updates an existing price.

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

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

Parametersosid.id.IdpriceScheduleIdthe Id of a PriceSchedule
Returnboolean false if Grade deletion is not authorized, true otherwise
ErrorsNULL_ARGUMENT priceScheduleId is null
CompliancemandatoryThis method must be implemented.
MethoddeletePrice
Description

Deletes a Price.

Parametersosid.id.IdpriceIdthe Id of the Price to remove
ErrorsNOT_FOUND priceId not found
NULL_ARGUMENT priceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManagePriceAliases
Description

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

Adds an Id to a Price for the purpose of creating compatibility. The primary Id of the Price 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, it is reassigned to the given price Id.

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