OSID Logo
OSID Specifications
offering package
Version 3.1.0
Interfaceosid.offering.CatalogueAdminSession
Implementsosid.OsidSession
Implemented Byosid.offering.batch.CatalogueBatchAdminSession
Used Byosid.offering.OfferingManager
osid.offering.OfferingProxyManager
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
Compliancemandatory This 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[]catalogueRecordTypes array of types
Returnboolean true if Catalogue creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT catalogueRecordTypes is null
Compliancemandatory This 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[]catalogueRecordTypes array of types
Returnosid.offering.CatalogueForm the catalogue form
ErrorsNULL_ARGUMENT catalogueRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED cannot get form for requested record types
Compliancemandatory This method must be implemented.
MethodcreateCatalogue
Description

Creates a new Catalogue.

Parametersosid.offering.CatalogueFormcatalogueForm the form for this Catalogue
Returnosid.offering.Catalogue the new Catalogue
ErrorsILLEGAL_STATE catalogueForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT catalogueForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED catalogueForm did not originate from getCatalogueFormForCreate()
Compliancemandatory This 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
Compliancemandatory This 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.IdcatalogueId the Id of the Catalogue
Returnosid.offering.CatalogueForm the catalogue form
ErrorsNOT_FOUND catalogueId is not found
NULL_ARGUMENT catalogueId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateCatalogue
Description

Updates an existing catalogue.

Parametersosid.offering.CatalogueFormcatalogueForm the form containing the elements to be updated
ErrorsILLEGAL_STATE catalogueForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT catalogueForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED catalogueForm did not originate from getCataloguetFormForUpdate()
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethoddeleteCatalogue
Description

Deletes a Catalogue.

Parametersosid.id.IdcatalogueId the Id of the Catalogue to remove
ErrorsNOT_FOUND catalogueId not found
NULL_ARGUMENT catalogueId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.IdcatalogueId the Id of a Catalogue
osid.id.IdaliasId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.