OSID Logo
OSID Specifications
repository package
Version 3.1.0
Interfaceosid.repository.AssetContentAdminSession
Implementsosid.OsidSession
Implemented Byosid.repository.batch.AssetContentBatchAdminSession
Used Byosid.repository.RepositoryManager
osid.repository.RepositoryProxyManager
Description

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

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

The delete operations delete AssetContents. To unmap an AssetContent from the current Repository, the AssetContentRepositoryAssignmentSession should be used. These delete operations attempt to remove the AssetContent itself thus removing it from all known Repository catalogs.

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

MethodgetRepositoryId
Description

Gets the Repository Id associated with this session.

Returnosid.id.Id the Repository Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetRepository
Description

Gets the Repository associated with this session.

Returnosid.repository.Repository the repository
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanCreateAssetContents
Description

Tests if this user can create AssetContents. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an AssetContent will result in a PERMISSION_DENIED. Th is is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if AssetContent creation is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanCreateAssetContentWithRecordTypes
Description

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

Parametersosid.type.Type[]assetContentRecordTypes array of asset content record types
Returnboolean true if AssetContent creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT assetContentRecordTypes is null
Compliancemandatory This method must be implemented.
MethodgetAssetContentFormForCreate
Description

Gets the asset content form for creating new asset contents. A new form should be requested for each create transaction.

Parametersosid.id.IdassetId an asset Id
osid.type.Type[]assetContentRecordTypes array of asset content record types
Returnosid.repository.AssetContentForm the asset content form
ErrorsNOT_FOUND asetId is not found
NULL_ARGUMENT assetId or assetContentRecordTypes 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.
MethodcreateAssetContent
Description

Creates a new AssetContent.

Parametersosid.repository.AssetContentFormassetContentForm the form for this AssetContent
Returnosid.repository.AssetContent the new AssetContent
ErrorsILLEGAL_STATE assetContentForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT assetContentForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED assetContentForm did not originate from getAssetContentFormForCreate()
Compliancemandatory This method must be implemented.
MethodcanUpdateAssetContents
Description

Tests if this user can update AssetContents. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an AssetContent will result in a PERMISSION_DENIED. Th is is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if AssetContent modification is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodgetAssetContentFormForUpdate
Description

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

Parametersosid.id.IdassetContentId the Id of the AssetContent
Returnosid.repository.AssetContentForm the asset content form
ErrorsNOT_FOUND assetContentId is not found
NULL_ARGUMENT assetContentId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateAssetContent
Description

Updates an existing asset content.

Parametersosid.repository.AssetContentFormassetContentForm the form containing the elements to be updated
ErrorsILLEGAL_STATE assetContentForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT assetContentForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED assetContentForm did not originate from getAssetContentFormForUpdate()
Compliancemandatory This method must be implemented.
MethodcanDeleteAssetContents
Description

Tests if this user can delete AssetContents. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an AssetContent will result in a PERMISSION_DENIED. Th is is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if AssetContent deletion is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoddeleteAssetContent
Description

Deletes an AssetContent.

Parametersosid.id.IdassetContentId the Id of the AssetContent to remove
ErrorsNOT_FOUND assetContentId not found
NULL_ARGUMENT assetContentId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanManageAssetContentAliases
Description

Tests if this user can manage Id aliases for AssetContents 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 AssetContent aliasing is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodaliasAssetContent
Description

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

Parametersosid.id.IdassetContentId the Id of an AssetContent
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND assetContentId not found
NULL_ARGUMENT assetContentId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.