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

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

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

The delete operations delete DispatchConstrainerEnablers . To unmap a DispatchConstrainerEnabler from the current Publisher , the DispatchConstrainerEnablerPublisherAssignmentSession should be used. These delete operations attempt to remove the DispatchConstrainerEnabler 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.
MethodcanCreateDispatchConstrainerEnablers
Description

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

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

Parametersosid.type.Type[]dispatchConstrainerEnablerRecordTypesarray of dispatch constrainer enabler record types
Returnbooleantrue if DispatchConstrainerEnabler creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENTdispatchConstrainerEnablerRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetDispatchConstrainerEnablerFormForCreate
Description

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

Parametersosid.type.Type[]dispatchConstrainerEnablerRecordTypesarray of dispatch constrainer enabler record types
Returnosid.subscription.rules.DispatchConstrainerEnablerFormthe dispatch constrainer enabler form
ErrorsNULL_ARGUMENTdispatchConstrainerEnablerRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateDispatchConstrainerEnabler
Description

Creates a new DispatchConstrainerEnabler .

Parametersosid.subscription.rules.DispatchConstrainerEnablerFormdispatchConstrainerEnablerFormthe form for this DispatchConstrainerEnabler
Returnosid.subscription.rules.DispatchConstrainerEnablerthe new DispatchConstrainerEnabler
ErrorsILLEGAL_STATEdispatchConstrainerEnablerForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENTdispatchConstrainerEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDdispatchConstrainerEnablerForm did not originate from getDispatchConstrainerEnablerFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateDispatchConstrainerEnablers
Description

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

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

Parametersosid.id.IddispatchConstrainerEnablerIdthe Id of the DispatchConstrainerEnabler
Returnosid.subscription.rules.DispatchConstrainerEnablerFormthe dispatch constrainer enabler form
ErrorsNOT_FOUNDdispatchConstrainerEnablerId is not found
NULL_ARGUMENTdispatchConstrainerEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateDispatchConstrainerEnabler
Description

Updates an existing dispatch constrainer enabler.

Parametersosid.subscription.rules.DispatchConstrainerEnablerFormdispatchConstrainerEnablerFormthe form containing the elements to be updated
ErrorsILLEGAL_STATEdispatchConstrainerEnablerForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENTdispatchConstrainerEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDdispatchConstrainerEnablerForm did not originate from getDispatchConstrainerEnablerFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteDispatchConstrainerEnablers
Description

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

Deletes a DispatchConstrainerEnabler .

Parametersosid.id.IddispatchConstrainerEnablerIdthe Id of the DispatchConstrainerEnabler to remove
ErrorsNOT_FOUNDdispatchConstrainerEnablerId not found
NULL_ARGUMENTdispatchConstrainerEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageDispatchConstrainerEnablerAliases
Description

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

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

Parametersosid.id.IddispatchConstrainerEnablerIdthe Id of a DispatchConstrainerEnabler
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTSaliasId is already assigned
NOT_FOUNDdispatchConstrainerEnablerId not found
NULL_ARGUMENTdispatchConstrainerEnablerId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.