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

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

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

The delete operations delete DispatchConstrainers . To unmap a DispatchConstrainer from the current Publisher , the DispatchConstrainerPublisherAssignmentSession should be used. These delete operations attempt to remove the DispatchConstrainer 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.
MethodcanCreateDispatchConstrainers
Description

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

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

Parametersosid.type.Type[]dispatchConstrainerRecordTypesarray of dispatch constrainer record types
Returnbooleantrue if DispatchConstrainer creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENTdispatchConstrainerRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetDispatchConstrainerFormForCreate
Description

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

Parametersosid.type.Type[]dispatchConstrainerRecordTypesarray of dispatch constrainer record types
Returnosid.subscription.rules.DispatchConstrainerFormthe dispatch constrainer form
ErrorsNULL_ARGUMENTdispatchConstrainerRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateDispatchConstrainer
Description

Creates a new DispatchConstrainer .

Parametersosid.subscription.rules.DispatchConstrainerFormdispatchConstrainerFormthe form for this DispatchConstrainer
Returnosid.subscription.rules.DispatchConstrainerthe new DispatchConstrainer
ErrorsILLEGAL_STATEdispatchConstrainerForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENTdispatchConstrainerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDdispatchConstrainerForm did not originate from getDispatchConstrainerFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateDispatchConstrainers
Description

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

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

Parametersosid.id.IddispatchConstrainerIdthe Id of the DispatchConstrainer
Returnosid.subscription.rules.DispatchConstrainerFormthe dispatch form
ErrorsNOT_FOUNDdispatchConstrainerId is not found
NULL_ARGUMENTdispatchConstrainerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateDispatchConstrainer
Description

Updates an existing dispatch constrainer.

Parametersosid.subscription.rules.DispatchConstrainerFormdispatchConstrainerFormthe form containing the elements to be updated
ErrorsILLEGAL_STATEdispatchConstrainerForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENTdispatchConstrainerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDdispatchConstrainerForm did not originate from getDispatchConstrainerFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteDispatchConstrainers
Description

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

Deletes a DispatchConstrainer .

Parametersosid.id.IddispatchConstrainerIdthe Id of the DispatchConstrainer to remove
ErrorsNOT_FOUNDdispatchConstrainerId not found
NULL_ARGUMENTdispatchConstrainerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageDispatchConstrainerAliases
Description

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

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

Parametersosid.id.IddispatchConstrainerIdthe Id of a DispatchConstrainer
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTSaliasId is already assigned
NOT_FOUNDdispatchConstrainerId not found
NULL_ARGUMENTdispatchConstrainerId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.