OSID Logo
OSID Specifications
installation package
Version 3.1.0
Interfaceosid.installation.DepotAdminSession
Implementsosid.OsidSession
Implemented Byosid.installation.batch.DepotBatchAdminSession
Used Byosid.installation.InstallationManager
osid.installation.InstallationProxyManager
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
Compliancemandatory This 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[]depotRecordTypes array of depot record types
Returnboolean true if Depot creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT depotRecordTypes is null
Compliancemandatory This 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[]depotRecordTypes array of depot record types
Returnosid.installation.DepotForm the depot form
ErrorsNULL_ARGUMENT depotRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to get form for requested record types
Compliancemandatory This method must be implemented.
MethodcreateDepot
Description

Creates a new Depot.

Parametersosid.installation.DepotFormdepotForm the form for this Depot
Returnosid.installation.Depot the new Depot
ErrorsILLEGAL_STATE depotForm already used for a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT depotForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED depotForm did not originate from getDepotFormForCreate()
Compliancemandatory This 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
Compliancemandatory This 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.IddepotId the Id of the Depot
Returnboolean false if depot modification is not authorized, true otherwise
ErrorsNULL_ARGUMENT depotId is null
Compliancemandatory This 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.IddepotId the Id of the Depot
Returnosid.installation.DepotForm the depot form
ErrorsNOT_FOUND depotId is not found
NULL_ARGUMENT depotId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateDepot
Description

Updates an existing depot.

Parametersosid.installation.DepotFormdepotForm the form containing the elements to be updated
ErrorsINVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT depotForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED depotForm did not originate from getDepotFormForUpdate()
Compliancemandatory This 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
Compliancemandatory This 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.IddepotId the Id of the Depot
Returnboolean false if deletion of this Depot is not authorized, true otherwise
ErrorsNULL_ARGUMENT depotId is null
Compliancemandatory This 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.IddepotId the Id of the Depot to remove
ErrorsNOT_FOUND depotId not found
NULL_ARGUMENT depotId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.IddepotId the Id of a Depot
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND depotId not found
NULL_ARGUMENT depotId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.