OSID Logo
OSID Specifications
subscription rules package
Version 3.0.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.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.
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.

Returnbooleanfalse if DispatchEnabler creation is not authorized, true otherwise
CompliancemandatoryThis 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[]dispatchEnablerRecordTypesarray of dispatch enabler record types
Returnbooleantrue if DispatchEnabler creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENTdispatchEnablerRecordTypes is null
CompliancemandatoryThis 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[]dispatchEnablerRecordTypesarray of dispatch enabler record types
Returnosid.subscription.rules.DispatchEnablerFormthe dispatch enabler form
ErrorsNULL_ARGUMENTdispatchEnablerRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateDispatchEnabler
Description

Creates a new DispatchEnabler .

Parametersosid.subscription.rules.DispatchEnablerFormdispatchEnablerFormthe form for this DispatchEnabler
Returnosid.subscription.rules.DispatchEnablerthe new DispatchEnabler
ErrorsILLEGAL_STATEdispatchEnablerForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENTdispatchEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDdispatchEnablerForm did not originate from getDispatchEnablerFormForCreate()
CompliancemandatoryThis 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.

Returnbooleanfalse if DispatchEnabler modification is not authorized, true otherwise
CompliancemandatoryThis 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.IddispatchEnablerIdthe Id of the DispatchEnabler
Returnosid.subscription.rules.DispatchEnablerFormthe dispatch enabler form
ErrorsNOT_FOUNDdispatchEnablerId is not found
NULL_ARGUMENTdispatchEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateDispatchEnabler
Description

Updates an existing dispatch enabler.

Parametersosid.subscription.rules.DispatchEnablerFormdispatchEnablerFormthe form containing the elements to be updated
ErrorsILLEGAL_STATEdispatchEnablerForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENTdispatchEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDdispatchEnablerForm did not originate from getDispatchEnablerFormForUpdate()
CompliancemandatoryThis 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.

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

Deletes a DispatchEnabler .

Parametersosid.id.IddispatchEnablerIdthe Id of the DispatchEnabler to remove
ErrorsNOT_FOUNDdispatchEnablerId not found
NULL_ARGUMENTdispatchEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.

Returnbooleanfalse if DispatchEnabler aliasing is not authorized, true otherwise
CompliancemandatoryThis 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.IddispatchEnablerIdthe Id of a DispatchEnabler
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTSaliasId is already assigned
NOT_FOUNDdispatchEnablerId not found
NULL_ARGUMENTdispatchEnablerId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.