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

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

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

The delete operations delete DispatchEnablers . To unmap a DispatchEnabler from the current Publisher, the DispatchEnablerPublisherAssignmentSession should be used. These delete operations attempt to remove the DispatchEnabler 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.Id the Publisher Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetPublisher
Description

Gets the Publisher associated with this session.

Returnosid.subscription.Publisher the publisher
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanCreateDispatchEnablers
Description

Tests if this user can create DispatchEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a DispatchEnabler 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.

Returnboolean false if DispatchEnabler creation is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanCreateDispatchEnablerWithRecordTypes
Description

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

Parametersosid.type.Type[]dispatchEnablerRecordTypes array of dispatch enabler record types
Returnboolean true if DispatchEnabler creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT dispatchEnablerRecordTypes is null
Compliancemandatory This method must be implemented.
MethodgetDispatchEnablerFormForCreate
Description

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

Parametersosid.type.Type[]dispatchEnablerRecordTypes array of dispatch enabler record types
Returnosid.subscription.rules.DispatchEnablerForm the dispatch enabler form
ErrorsNULL_ARGUMENT dispatchEnablerRecordTypes 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.
MethodcreateDispatchEnabler
Description

Creates a new DispatchEnabler.

Parametersosid.subscription.rules.DispatchEnablerFormdispatchEnablerForm the form for this DispatchEnabler
Returnosid.subscription.rules.DispatchEnabler the new DispatchEnabler
ErrorsILLEGAL_STATE dispatchEnablerForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT dispatchEnablerForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED dispatchEnablerForm did not originate from getDispatchEnablerFormForCreate()
Compliancemandatory This method must be implemented.
MethodcanUpdateDispatchEnablers
Description

Tests if this user can update DispatchEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a DispatchEnabler 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.

Returnboolean false if DispatchEnabler modification is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodgetDispatchEnablerFormForUpdate
Description

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

Parametersosid.id.IddispatchEnablerId the Id of the DispatchEnabler
Returnosid.subscription.rules.DispatchEnablerForm the dispatch enabler form
ErrorsNOT_FOUND dispatchEnablerId is not found
NULL_ARGUMENT dispatchEnablerId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateDispatchEnabler
Description

Updates an existing dispatch enabler.

Parametersosid.subscription.rules.DispatchEnablerFormdispatchEnablerForm the form containing the elements to be updated
ErrorsILLEGAL_STATE dispatchEnablerForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT dispatchEnablerForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED dispatchEnablerForm did not originate from getDispatchEnablerFormForUpdate()
Compliancemandatory This method must be implemented.
MethodcanDeleteDispatchEnablers
Description

Tests if this user can delete DispatchEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a DispatchEnabler 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.

Returnboolean false if DispatchEnabler deletion is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoddeleteDispatchEnabler
Description

Deletes a DispatchEnabler.

Parametersosid.id.IddispatchEnablerId the Id of the DispatchEnabler to remove
ErrorsNOT_FOUND dispatchEnablerId not found
NULL_ARGUMENT dispatchEnablerId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanManageDispatchEnablerAliases
Description

Tests if this user can manage Id aliases for DispatchEnablers 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 DispatchEnabler aliasing is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodaliasDispatchEnabler
Description

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

Parametersosid.id.IddispatchEnablerId the Id of a DispatchEnabler
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND dispatchEnablerId not found
NULL_ARGUMENT dispatchEnablerId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.