OSID Logo
OSID Specifications
provisioning package
Version 3.0.0
Release Candidate Preview
Interfaceosid.provisioning.DistributorAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Distributors.

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

MethodcanCreateDistributors
Description

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

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

Parametersosid.type.Type[]distributorRecordTypesarray of distributor record types
Returnboolean true if Distributor creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT distributorRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetDistributorFormForCreate
Description

Gets the distributor form for creating new distributors. A new form should be requested for each create transaction.

Parametersosid.type.Type[]distributorRecordTypesarray of distributor record types
Returnosid.provisioning.DistributorFormthe distributor form
ErrorsNULL_ARGUMENT distributorRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateDistributor
Description

Creates a new Distributor.

Parametersosid.provisioning.DistributorFormdistributorFormthe form for this Distributor
Returnosid.provisioning.Distributorthe new Distributor
ErrorsILLEGAL_STATE distributorForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT distributorForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED distributorForm did not originate from getDistributorFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateDistributors
Description

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

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

Parametersosid.id.IddistributorIdthe Id of the Distributor
Returnosid.provisioning.DistributorFormthe distributor form
ErrorsNOT_FOUND distributorId is not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateDistributor
Description

Updates an existing distributor

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

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

Deletes a Distributor.

Parametersosid.id.IddistributorIdthe Id of the Distributor to remove
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageDistributorAliases
Description

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

Adds an Id to a Distributor for the purpose of creating compatibility. The primary Id of the Distributor is determined by the provider. The new Id performs as an alias to the primary Id.

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