OSID Logo
OSID Specifications
offering package
Version 3.0.0
Release Candidate Preview
Interfaceosid.offering.OfferingAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Offerings. To unmap an Offering from the current Catalogue, the OfferingCatalogueAssignmentSession should be used. These delete operations attempt to remove the Offering itself thus removing it from all known Catalogue catalogs.

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

MethodgetCatalogueId
Description

Gets the Catalogue Id associated with this session.

Returnosid.id.Idthe Catalogue Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetCatalogue
Description

Gets the Catalogue associated with this session.

Returnosid.offering.Cataloguethe catalogue
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateOfferings
Description

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

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

Parametersosid.type.Type[]offeringRecordTypesarray of offering record types
Returnboolean true if Offering creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT offeringRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetOfferingFormForCreate
Description

Gets the offering form for creating new offerings. A new form should be requested for each create transaction.

Parametersosid.id.IdcanonicalUnitIdthe canonical unit Id
osid.id.IdtimePeriodIdthe time period Id
osid.type.Type[]offeringRecordTypesarray of offering record types to be included in the create operation or an empty list if none
Returnosid.offering.OfferingFormthe offering form
ErrorsNOT_FOUND canonicalUnitId or timePeriodId is not found
NULL_ARGUMENT canonicalUnitId, timePeriodId , or offeringRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDcannot get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateOffering
Description

Creates a new Offering.

Parametersosid.offering.OfferingFormofferingFormthe form for this Offering
Returnosid.offering.Offeringthe new Offering
ErrorsILLEGAL_STATE offeringForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT offeringForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED offeringForm did not originate from getOfferingFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateOfferings
Description

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

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

Parametersosid.id.IdofferingIdthe Id of the Offering
Returnosid.offering.OfferingFormthe offering form
ErrorsNOT_FOUND offeringId is not found
NULL_ARGUMENT offeringId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateOffering
Description

Updates an existing offering.

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

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

Deletes an Offering.

Parametersosid.id.IdofferingIdthe Id of the Offering to remove
ErrorsNOT_FOUND offeringId not found
NULL_ARGUMENT offeringId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageOfferingAliases
Description

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

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

Parametersosid.id.IdofferingIdthe Id of an Offering
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is in use as a primary Id
NOT_FOUND offeringId not found
NULL_ARGUMENT offeringId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.