OSID Logo
OSID Specifications
provisioning package
Version 3.1.0
Interfaceosid.provisioning.DistributorAdminSession
Implementsosid.OsidSession
Implemented Byosid.provisioning.batch.DistributorBatchAdminSession
Used Byosid.provisioning.ProvisioningManager
osid.provisioning.ProvisioningProxyManager
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
Compliancemandatory This 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[]distributorRecordTypes array of distributor record types
Returnboolean true if Distributor creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT distributorRecordTypes is null
Compliancemandatory This 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[]distributorRecordTypes array of distributor record types
Returnosid.provisioning.DistributorForm the distributor form
ErrorsNULL_ARGUMENT distributorRecordTypes 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.
MethodcreateDistributor
Description

Creates a new Distributor.

Parametersosid.provisioning.DistributorFormdistributorForm the form for this Distributor
Returnosid.provisioning.Distributor the new Distributor
ErrorsILLEGAL_STATE distributorForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT distributorForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED distributorForm did not originate from getDistributorFormForCreate()
Compliancemandatory This 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
Compliancemandatory This 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.IddistributorId the Id of the Distributor
Returnosid.provisioning.DistributorForm the distributor form
ErrorsNOT_FOUND distributorId is not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateDistributor
Description

Updates an existing distributor

Parametersosid.provisioning.DistributorFormdistributorForm the form containing the elements to be updated
ErrorsILLEGAL_STATE distributorForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT distributorForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED distributorForm did not originate from getDistributorFormForUpdate()
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethoddeleteDistributor
Description

Deletes a Distributor.

Parametersosid.id.IddistributorId the Id of the Distributor to remove
ErrorsNOT_FOUND distributorId not found
NULL_ARGUMENT distributorId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.IddistributorId the Id of a Distributor
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND distributorId not found
NULL_ARGUMENT distributorId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.