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

Returnbooleanfalse 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
Returnbooleantrue if SubscriptionEnabler creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENTsubscriptionEnablerRecordTypes 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_ARGUMENTsubscriptionEnablerRecordTypes 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_STATEsubscriptionEnablerForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENTsubscriptionEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDsubscriptionEnablerForm 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.

Returnbooleanfalse 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_FOUNDsubscriptionEnablerId is not found
NULL_ARGUMENTsubscriptionEnablerId 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_STATEsubscriptionEnablerForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENTsubscriptionEnablerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDsubscriptionEnablerForm 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.

Returnbooleanfalse 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_FOUNDsubscriptionEnablerId not found
NULL_ARGUMENTsubscriptionEnablerId 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.

Returnbooleanfalse 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_EXISTSaliasId is already assigned
NOT_FOUNDsubscriptionEnablerId not found
NULL_ARGUMENTsubscriptionEnablerId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.