OSID Logo
OSID Specifications
subscription rules package
Version 3.0.0
Interfaceosid.subscription.rules.DispatchProcessorAdminSession
Implementsosid.OsidSession
Used Byosid.subscription.rules.SubscriptionRulesManager
osid.subscription.rules.SubscriptionRulesProxyManager
Description

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

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

The delete operations delete DispatchProcessors . To unmap a DispatchProcessor from the current Publisher , the DispatchProcessorPublisherAssignmentSession should be used. These delete operations attempt to remove the DispatchProcessor 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.
MethodcanCreateDispatchProcessors
Description

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

Returnbooleanfalse if DispatchProcessor creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateDispatchProcessorWithRecordTypes
Description

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

Parametersosid.type.Type[]dispatchProcessorRecordTypesarray of dispatch processor record types
Returnbooleantrue if DispatchProcessor creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENTdispatchProcessorRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetDispatchProcessorFormForCreate
Description

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

Parametersosid.type.Type[]dispatchProcessorRecordTypesarray of dispatch processor record types
Returnosid.subscription.rules.DispatchProcessorFormthe dispatch processor form
ErrorsNULL_ARGUMENTdispatchProcessorRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateDispatchProcessor
Description

Creates a new DispatchProcessor .

Parametersosid.subscription.rules.DispatchProcessorFormdispatchProcessorFormthe form for this DispatchProcessor
Returnosid.subscription.rules.DispatchProcessorthe new DispatchProcessor
ErrorsILLEGAL_STATEdispatchProcessorForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENTdispatchProcessorForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDdispatchProcessorForm did not originate from getDispatchProcessorFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateDispatchProcessors
Description

Tests if this user can update DispatchProcessors . A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a DispatchProcessor will result in a PERMISSION_DENIED. T his is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnbooleanfalse if DispatchProcessor modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetDispatchProcessorFormForUpdate
Description

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

Parametersosid.id.IddispatchProcessorIdthe Id of the DispatchProcessor
Returnosid.subscription.rules.DispatchProcessorFormthe dispatch processor form
ErrorsNOT_FOUNDdispatchProcessorId is not found
NULL_ARGUMENTdispatchProcessorId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateDispatchProcessor
Description

Updates an existing dispatch processor.

Parametersosid.subscription.rules.DispatchProcessorFormdispatchProcessorFormthe form containing the elements to be updated
ErrorsILLEGAL_STATEdispatchProcessorForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENTdispatchProcessorForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDdispatchProcessorForm did not originate from getDispatchProcessorFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteDispatchProcessors
Description

Tests if this user can delete DispatchProcessors . A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a DispatchProcessor will result in a PERMISSION_DENIED. T his is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnbooleanfalse if DispatchProcessor deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteDispatchProcessor
Description

Deletes a DispatchProcessor .

Parametersosid.id.IddispatchProcessorIdthe Id of the DispatchProcessor to remove
ErrorsNOT_FOUNDdispatchProcessorId not found
NULL_ARGUMENTdispatchProcessorId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageDispatchProcessorAliases
Description

Tests if this user can manage Id aliases for DispatchProcessors 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.

Returnbooleanfalse if DispatchProcessor aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasDispatchProcessor
Description

Adds an Id to a DispatchProcessor for the purpose of creating compatibility. The primary Id of the DispatchProcessor 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 processor, it is reassigned to the given dispatch processor Id .

Parametersosid.id.IddispatchProcessorIdthe Id of a DispatchProcessor
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTSaliasId is already assigned
NOT_FOUNDdispatchProcessorId not found
NULL_ARGUMENTdispatchProcessorId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.