OSID Logo
OSID Specifications
installation package
Version 3.0.0
Release Candidate Preview
Interfaceosid.installation.DepotAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Depots. This session also includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodcanCreateDepots
Description

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

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

Parametersosid.type.Type[]depotRecordTypesarray of depot record types
Returnboolean true if Depot creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT depotRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetDepotFormForCreate
Description

Gets the depot form for creating new depots. A new form should be requested for each create transaction.

Parametersosid.type.Type[]depotRecordTypesarray of depot record types
Returnosid.installation.DepotFormthe depot form
ErrorsNULL_ARGUMENT depotRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateDepot
Description

Creates a new Depot.

Parametersosid.installation.DepotFormdepotFormthe form for this Depot
Returnosid.installation.Depotthe new Depot
ErrorsILLEGAL_STATE depotForm already used for a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT depotForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED depotForm did not originate from getDepotFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateDepots
Description

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

Tests if this user can update a specified Depot. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating the Depot 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.IddepotIdthe Id of the Depot
Returnboolean false if depot modification is not authorized, true otherwise
ErrorsNULL_ARGUMENT depotId is null
CompliancemandatoryThis method must be implemented.
Provider Notes

If the depotId is not found, then it is acceptable to return false to indicate the lack of an update available.

MethodgetDepotFormForUpdate
Description

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

Parametersosid.id.IddepotIdthe Id of the Depot
Returnosid.installation.DepotFormthe depot form
ErrorsNOT_FOUND depotId is not found
NULL_ARGUMENT depotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateDepot
Description

Updates an existing depot.

Parametersosid.installation.DepotFormdepotFormthe form containing the elements to be updated
ErrorsINVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT depotForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED depotForm did not originate from getDepotFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteDepots
Description

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

Tests if this user can delete a specified Depot. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting the Depot 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.IddepotIdthe Id of the Depot
Returnboolean false if deletion of this Depot is not authorized, true otherwise
ErrorsNULL_ARGUMENT depotId is null
CompliancemandatoryThis method must be implemented.
Provider Notes

If the depotId is not found, then it is acceptable to return false to indicate the lack of a delete available.

MethoddeleteDepot
Description

Deletes a Depot.

Parametersosid.id.IddepotIdthe Id of the Depot to remove
ErrorsNOT_FOUND depotId not found
NULL_ARGUMENT depotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageDepotAliases
Description

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

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

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