OSID Logo
OSID Specifications
subscription rules package
Version 3.0.0
Release Candidate Preview
Interfaceosid.subscription.rules.SubscriptionEnablerAdminSession
Implementsosid.OsidSession
Description

This session creates and removes subscription enablers. The data for create and update is provided via the SubscriptionEnablerForm.

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.
MethodcanCreateSubscriptionEnabler
Description

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

Returnboolean false if SubscriptionEnabler creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateSubscriptionEnablerWithRecordTypes
Description

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

Parametersosid.type.Type[]subscriptionEnablerRecordTypesarray of subscription enabler record types
Returnboolean true if SubscriptionEnabler creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT subscriptionEnablerRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetSubscriptionEnablerFormForCreate
Description

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

Parametersosid.type.Type[]subscriptionEnablerRecordTypesarray of subscription enabler record types
Returnosid.subscription.rules.SubscriptionEnablerFormthe subscription enabler form
ErrorsNULL_ARGUMENT subscriptionEnablerRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateSubscriptionEnabler
Description

Creates a new SubscriptionEnabler.

Parametersosid.subscription.rules.SubscriptionEnablerFormsubscriptionEnablerFormthe form for this SubscriptionEnabler
Returnosid.subscription.rules.SubscriptionEnablerthe new SubscriptionEnabler
ErrorsILLEGAL_STATE subscriptionEnablerForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT subscriptionEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED subscriptionEnablerForm did not originate from getSubscriptionEnablerFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateSubscriptionEnablers
Description

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

Returnboolean false if SubscriptionEnabler modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetSubscriptionEnablerFormForUpdate
Description

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

Parametersosid.id.IdsubscriptionEnablerIdthe Id of the SubscriptionEnabler
Returnosid.subscription.rules.SubscriptionEnablerFormthe subscription enabler form
ErrorsNOT_FOUND subscriptionEnablerId is not found
NULL_ARGUMENT subscriptionEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateSubscriptionEnabler
Description

Updates an existing subscription enabler.

Parametersosid.subscription.rules.SubscriptionEnablerFormsubscriptionEnablerFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE subscriptionEnablerForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT subscriptionEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED subscriptionEnablerForm did not originate from getSubscriptionEnablerFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteSubscriptionEnablers
Description

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

Returnboolean false if SubscriptionEnabler deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteSubscriptionEnabler
Description

Deletes a SubscriptionEnabler.

Parametersosid.id.IdsubscriptionEnablerIdthe Id of the SubscriptionEnabler to remove
ErrorsNOT_FOUND subscriptionEnablerId not found
NULL_ARGUMENT subscriptionEnablerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageSubscriptionEnablerAliases
Description

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

Adds an Id to a SubscriptionEnabler for the purpose of creating compatibility. The primary Id of the SubscriptionEnabler is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another subscription enabler. it is reassigned to the given subscription enabler Id.

Parametersosid.id.IdsubscriptionEnablerIdthe Id of a SubscriptionEnabler
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND subscriptionEnablerId not found
NULL_ARGUMENT subscriptionEnablerId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.