OSID Logo
OSID Specifications
sequencing package
Version 3.0.0
Release Candidate Preview
Interfaceosid.sequencing.ChainAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Chains. To unmap a Chain from the current Antimatroid, the ChainAntimatroidAssignmentSession should be used. These delete operations attempt to remove the Chain itself thus removing it from all known Antimatroid catalogs.

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

MethodgetAntimatroidId
Description

Gets the Antimatroid Id associated with this session.

Returnosid.id.Idthe Antimatroid Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetAntimatroid
Description

Gets the Antimatroid associated with this session.

Returnosid.sequencing.Antimatroidthe antimatroid
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateChains
Description

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

Returnboolean false if Chain creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateChainWithRecordTypes
Description

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

Parametersosid.type.Type[]chainRecordTypesarray of chain record types
Returnboolean true if Chain creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT chainRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetChainFormForCreate
Description

Gets the chain form for creating new chains. A new form should be requested for each create transaction.

Parametersosid.type.Type[]chainRecordTypesarray of chain record types
Returnosid.sequencing.ChainFormthe chain form
ErrorsNULL_ARGUMENT chainRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateChain
Description

Creates a new Chain.

Parametersosid.sequencing.ChainFormchainFormthe form for this Chain
Returnosid.sequencing.Chainthe new Chain
ErrorsILLEGAL_STATE chainForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NOT_FOUND resourceId or inputId is not found
NULL_ARGUMENT chainForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED chainForm did not originate from getChainFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateChains
Description

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

Returnboolean false if Chain modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetChainFormForUpdate
Description

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

Parametersosid.id.IdchainIdthe Id of the Chain
Returnosid.sequencing.ChainFormthe chain form
ErrorsNOT_FOUND chainId is not found
NULL_ARGUMENT chainId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateChain
Description

Updates an existing chain.

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

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

Returnboolean false if Chain deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteChain
Description

Deletes a Chain.

Parametersosid.id.IdchainIdthe Id of the Chain to remove
ErrorsNOT_FOUND chainId not found
NULL_ARGUMENT chainId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageChainAliases
Description

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

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

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