OSID Logo
OSID Specifications
cataloging package
Version 3.0.0
Release Candidate Preview
Interfaceosid.cataloging.CatalogAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Catalogs.

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

MethodcanCreateCatalogs
Description

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

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

Parametersosid.type.Type[]catalogRecordTypesarray of catalog record types
Returnboolean true if Catalog creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT catalogRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetCatalogFormForCreate
Description

Gets the catalog form for creating new catalogs. A new form should be requested for each create transaction.

Parametersosid.type.Type[]catalogRecordTypesarray of catalog record types
Returnosid.cataloging.CatalogFormthe catalog form
ErrorsNULL_ARGUMENT catalogRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateCatalog
Description

Creates a new Catalog.

Parametersosid.cataloging.CatalogFormcatalogFormthe form for this Catalog
Returnosid.cataloging.Catalogthe new Catalog
ErrorsILLEGAL_STATE catalogForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT catalogForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED catalogForm did not originate from getCatalogFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateCatalogs
Description

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

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

Parametersosid.id.IdcatalogIdthe Id of the Catalog
Returnosid.cataloging.CatalogFormthe catalog form
ErrorsNOT_FOUND catalogId is not found
NULL_ARGUMENT catalogId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateCatalog
Description

Updates an existing catalog.

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

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

Deletes a Catalog.

Parametersosid.id.IdcatalogIdthe Id of the Catalog to remove
ErrorsNOT_FOUND catalogId not found
NULL_ARGUMENT catalogId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageCatalogAliases
Description

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

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

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