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

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

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

The delete operations delete Catalogues. It is safer to remove all mappings to the Catalogue catalogs before deletion.

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

MethodcanCreateCatalogues
Description

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

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

Parametersosid.type.Type[]catalogueRecordTypesarray of types
Returnboolean true if Catalogue creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT catalogueRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetCatalogueFormForCreate
Description

Gets the catalogue form for creating new catalogues. A new form should be requested for each create transaction.

Parametersosid.type.Type[]catalogueRecordTypesarray of types
Returnosid.offering.CatalogueFormthe catalogue form
ErrorsNULL_ARGUMENT catalogueRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDcannot get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateCatalogue
Description

Creates a new Catalogue.

Parametersosid.offering.CatalogueFormcatalogueFormthe form for this Catalogue
Returnosid.offering.Cataloguethe new Catalogue
ErrorsILLEGAL_STATE catalogueForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT catalogueForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED catalogueForm did not originate from getCatalogueFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateCatalogues
Description

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

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

Parametersosid.id.IdcatalogueIdthe Id of the Catalogue
Returnosid.offering.CatalogueFormthe catalogue form
ErrorsNOT_FOUND catalogueId is not found
NULL_ARGUMENT catalogueId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateCatalogue
Description

Updates an existing catalogue.

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

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

Deletes a Catalogue.

Parametersosid.id.IdcatalogueIdthe Id of the Catalogue to remove
ErrorsNOT_FOUND catalogueId not found
NULL_ARGUMENT catalogueId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageCatalogueAliases
Description

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

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

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