OSID Logo
OSID Specifications
provisioning package
Version 3.0.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.Idthe Broker Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetBroker
Description

Gets the Broker associated with this session.

Returnosid.provisioning.Brokerthe broker
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.

Returnbooleanfalse if Provision return is not authorized, true otherwise
CompliancemandatoryThis 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[]provisionReturnRecordTypesarray of provision return record types
Returnbooleantrue if ProvisionReturn creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENTprovisionReturnRecordTypes is null
CompliancemandatoryThis 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.IdprovisionIdthe Id for the provision
osid.type.Type[]provisionReturnRecordTypesarray of provision return record types
Returnosid.provisioning.ProvisionReturnFormthe provision return form
ErrorsNOT_FOUNDprovisionId is not found
NULL_ARGUMENTprovisionId or provisionReturnRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateProvisionReturn
Description

Creates a new ProvisionReturn .

Parametersosid.provisioning.ProvisionReturnFormprovisionReturnFormthe form for this ProvisionReturn
Returnosid.provisioning.ProvisionReturnthe new ProvisionReturn
ErrorsILLEGAL_STATEprovisionForm is already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENTprovisionReturnForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDprovisionReturnForm did not oroginate from getProvisionFormForCreate()
CompliancemandatoryThis 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.

Returnbooleanfalse if ProvisionReturn modification is not authorized, true otherwise
CompliancemandatoryThis 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.IdprovisionReturnIdthe Id of the ProvisionReturn
Returnosid.provisioning.ProvisionReturnFormthe provision return form
ErrorsNOT_FOUNDprovisionReturnId is not found
NULL_ARGUMENTprovisionReturnId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodupdateProvisionReturn
Description

Updates an existing provision return.

Parametersosid.provisioning.ProvisionReturnFormprovisionReturnFormthe form containing the elements to be updated
ErrorsINVALID_ARGUMENTthe form contains an invalid value
NOT_FOUNDprovisionReturnId is not found
NULL_ARGUMENTprovisionReturnForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDprovisionReturnForm did not originate from getProvisionReturnFormForUpdate()
CompliancemandatoryThis 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.

Returnbooleanfalse if Provision deletion is not authorized, true otherwise
CompliancemandatoryThis 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.IdprovisionReturnIdthe Id of the ProvisionReturn to remove
ErrorsNOT_FOUNDprovisionReturnId not found
NULL_ARGUMENTprovisionReturnId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.