OSID Logo
OSID Specifications
subscription rules package
Version 3.1.0
Interfaceosid.subscription.rules.SubscriptionEnablerAdminSession
Implementsosid.OsidSession
Used Byosid.subscription.rules.SubscriptionRulesManager
osid.subscription.rules.SubscriptionRulesProxyManager
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.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.
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
Compliancemandatory This 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[]subscriptionEnablerRecordTypes array of subscription enabler record types
Returnboolean true if SubscriptionEnabler creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT subscriptionEnablerRecordTypes is null
Compliancemandatory This 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[]subscriptionEnablerRecordTypes array of subscription enabler record types
Returnosid.subscription.rules.SubscriptionEnablerForm the subscription enabler form
ErrorsNULL_ARGUMENT subscriptionEnablerRecordTypes 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.
MethodcreateSubscriptionEnabler
Description

Creates a new SubscriptionEnabler.

Parametersosid.subscription.rules.SubscriptionEnablerFormsubscriptionEnablerForm the form for this SubscriptionEnabler
Returnosid.subscription.rules.SubscriptionEnabler the new SubscriptionEnabler
ErrorsILLEGAL_STATE subscriptionEnablerForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT subscriptionEnablerForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED subscriptionEnablerForm did not originate from getSubscriptionEnablerFormForCreate()
Compliancemandatory This 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
Compliancemandatory This 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.IdsubscriptionEnablerId the Id of the SubscriptionEnabler
Returnosid.subscription.rules.SubscriptionEnablerForm the subscription enabler form
ErrorsNOT_FOUND subscriptionEnablerId is not found
NULL_ARGUMENT subscriptionEnablerId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateSubscriptionEnabler
Description

Updates an existing subscription enabler.

Parametersosid.subscription.rules.SubscriptionEnablerFormsubscriptionEnablerForm the form containing the elements to be updated
ErrorsILLEGAL_STATE subscriptionEnablerForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT subscriptionEnablerForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED subscriptionEnablerForm did not originate from getSubscriptionEnablerFormForUpdate()
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethoddeleteSubscriptionEnabler
Description

Deletes a SubscriptionEnabler.

Parametersosid.id.IdsubscriptionEnablerId the Id of the SubscriptionEnabler to remove
ErrorsNOT_FOUND subscriptionEnablerId not found
NULL_ARGUMENT subscriptionEnablerId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.IdsubscriptionEnablerId the Id of a SubscriptionEnabler
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND subscriptionEnablerId not found
NULL_ARGUMENT subscriptionEnablerId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.