OSID Logo
OSID Specifications
subscription package
Version 3.0.0
Release Candidate Preview
Interfaceosid.subscription.DispatchAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Dispatches. To unmap a Dispatch from the current Publisher, the DispatchPublisherAssignmentSession should be used. These delete operations attempt to remove the Dispatch itself thus removing it from all known Publisher catalogs.

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

MethodgetPublisherId
Description

Gets the Publisher Id associated with this session.

Returnosid.id.Idthe Publisher Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetPublisher
Description

Gets the Publisher associated with this session.

Returnosid.subscription.Publisherthe publisher
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateDispatches
Description

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

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

Parametersosid.type.Type[]dispatchRecordTypesarray of dispatch record types
Returnboolean true if Dispatch creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT dispatchRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetDispatchFormForCreate
Description

Gets the dispatch form for creating new dispatches. A new form should be requested for each create transaction.

Parametersosid.type.Type[]dispatchRecordTypesarray of dispatch record types
Returnosid.subscription.DispatchFormthe dispatch form
ErrorsNULL_ARGUMENT dispatchRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get from for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateDispatch
Description

Creates a new Dispatch.

Parametersosid.subscription.DispatchFormdispatchFormthe form for this Dispatch
Returnosid.subscription.Dispatchthe new Dispatch
ErrorsILLEGAL_STATE dispatchForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT dispatchForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED dispatchForm did not originate from getDispatchFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateDispatches
Description

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

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

Parametersosid.id.IddispatchIdthe Id of the Dispatch
Returnosid.subscription.DispatchFormthe dispatch form
ErrorsNOT_FOUND dispatchId is not found
NULL_ARGUMENT dispatchId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateDispatch
Description

Updates an existing dispatch.

Parametersosid.subscription.DispatchFormdispatchFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE dispatchForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT dispatchId or dispatchForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED dispatchForm did not originate from getDispatchFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteDispatches
Description

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

Deletes a Dispatch.

Parametersosid.id.IddispatchIdthe Id of the Dispatch to remove
ErrorsNOT_FOUND dispatchId not found
NULL_ARGUMENT dispatchId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageDispatchAliases
Description

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

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

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