OSID Logo
OSID Specifications
provisioning package
Version 3.1.0
Interfaceosid.provisioning.ProvisionReturnSession
Implementsosid.OsidSession
Used Byosid.provisioning.ProvisioningManager
osid.provisioning.ProvisioningProxyManager
Description

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

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

The delete operations delete ProvisionReturns . To unmap a ProvisionReturn from the current Distributor, the RProvisionReturnDistributorAssignmentSession should be used. These delete operations attempt to remove the ProvisionReturn itself thus removing it from all known Distributor catalogs.

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

MethodgetBrokerId
Description

Gets the Broker Id associated with this session.

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

Gets the Broker associated with this session.

Returnosid.provisioning.Broker the broker
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanCreateProvisionReturns
Description

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

Returnboolean false if Provision return is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanCreateProvisionReturnWithRecordTypes
Description

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

Parametersosid.type.Type[]provisionReturnRecordTypes array of provision return record types
Returnboolean true if ProvisionReturn creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT provisionReturnRecordTypes is null
Compliancemandatory This method must be implemented.
MethodgetProvisionReturnFormForCreate
Description

Gets the provision return form for creating new provisions. A new form should be requested for each return transaction.

Parametersosid.id.IdprovisionId the Id for the provision
osid.type.Type[]provisionReturnRecordTypes array of provision return record types
Returnosid.provisioning.ProvisionReturnForm the provision return form
ErrorsNOT_FOUND provisionId is not found
NULL_ARGUMENT provisionId or provisionReturnRecordTypes 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.
MethodcreateProvisionReturn
Description

Creates a new ProvisionReturn.

Parametersosid.provisioning.ProvisionReturnFormprovisionReturnForm the form for this ProvisionReturn
Returnosid.provisioning.ProvisionReturn the new ProvisionReturn
ErrorsILLEGAL_STATE provisionForm is already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT provisionReturnForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED provisionReturnForm did not oroginate from getProvisionFormForCreate()
Compliancemandatory This method must be implemented.
MethodcanUpdateProvisionReturns
Description

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

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

Parametersosid.id.IdprovisionReturnId the Id of the ProvisionReturn
Returnosid.provisioning.ProvisionReturnForm the provision return form
ErrorsNOT_FOUND provisionReturnId is not found
NULL_ARGUMENT provisionReturnId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodupdateProvisionReturn
Description

Updates an existing provision return.

Parametersosid.provisioning.ProvisionReturnFormprovisionReturnForm the form containing the elements to be updated
ErrorsINVALID_ARGUMENT the form contains an invalid value
NOT_FOUND provisionReturnId is not found
NULL_ARGUMENT provisionReturnForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED provisionReturnForm did not originate from getProvisionReturnFormForUpdate()
Compliancemandatory This method must be implemented.
MethodcanDeleteProvisionReturns
Description

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

Deletes a ProvisionReturn. The delete operation deletes the provision return data but does not undo the returned status of the provision.

Parametersosid.id.IdprovisionReturnId the Id of the ProvisionReturn to remove
ErrorsNOT_FOUND provisionReturnId not found
NULL_ARGUMENT provisionReturnId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.