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

This session creates, updates, and deletes Requests. 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. Once a Request is created, it has not been submitted. submitRequest submits a Request for processing. Constraints on update and delete may vary between creation and submission.

Create and update operations differ in their usage. To create a Request, a RequestForm is requested using getRequestFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned RequestForm 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 RequestForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each RequestForm corresponds to an attempted transaction.

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

The delete operations delete Requests. To unmap a Request from the current Distributor, the RequestDistributorAssignmentSession should be used. These delete operations attempt to remove the Request 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.

MethodgetDistributorId
Description

Gets the Distributor Id associated with this session.

Returnosid.id.Idthe Distributor Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetDistributor
Description

Gets the Distributor associated with this session.

Returnosid.provisioning.Distributorthe distributor
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateRequests
Description

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

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

Parametersosid.type.Type[]requestRecordTypesarray of request record types
Returnboolean true if Request creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT requestRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetRequestFormForCreate
Description

Gets the request form for creating new requests. A new form should be requested for each create transaction.

Parametersosid.id.IdresourceIdthe Id for the resource
osid.id.IdqueueIdthe Id for the queue
osid.type.Type[]requestRecordTypesarray of request record types
Returnosid.provisioning.RequestFormthe request form
ErrorsNOT_FOUND resourceId or queueId is not found
NULL_ARGUMENT resourceId, queueId, or requestRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateRequest
Description

Creates a new Request.

Parametersosid.provisioning.RequestFormrequestFormthe form for this Request
Returnosid.provisioning.Requestthe new Request
ErrorsILLEGAL_STATE requestForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT requestForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED requestForm did not originate from getRequestFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateRequests
Description

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

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

Parametersosid.id.IdrequestIdthe Id of the Request
Returnosid.provisioning.RequestFormthe request form
ErrorsNOT_FOUND requestId is not found
NULL_ARGUMENT requestId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateRequest
Description

Updates an existing request.

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

Submits a Request.

Parametersosid.id.IdrequestIdthe Id of the Request to submit
ErrorsNOT_FOUND requestId not found
NULL_ARGUMENT requestId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCancelRequests
Description

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

Returnboolean false if Request cancelation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcancelRequest
Description

Cancels a Request.

Parametersosid.id.IdrequestIdthe Id of the Request to remove
ErrorsNOT_FOUND requestId not found
NULL_ARGUMENT requestId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanDeleteRequests
Description

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

Deletes a Request.

Parametersosid.id.IdrequestIdthe Id of the Request to remove
ErrorsNOT_FOUND requestId not found
NULL_ARGUMENT requestId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageRequestAliases
Description

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

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

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