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

This session creates and removes subscriptions foe the authenticated Agent. The data for create and update is provided by the consumer via the form object.

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

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

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

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

Parametersosid.type.Type[]subscriptionRecordTypesarray of subscription record types
Returnboolean true if Subscription creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT subscriptionRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetSubscriptionFormForCreate
Description

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

Parametersosid.id.IddispatchIdthe Id for the dispatch
osid.type.Type[]subscriptionRecordTypesarray of subscription record types
Returnosid.subscription.SubscriptionFormthe subscription form
ErrorsNOT_FOUND dispatchId is not found
NULL_ARGUMENT dispatchId or subscriptionRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested recod types
CompliancemandatoryThis method must be implemented.
Methodsubscribe
Description

Creates a new Subscription.

Parametersosid.subscription.SubscriptionFormsubscriptionFormthe form for this Subscription
Returnosid.subscription.Subscriptionthe new Subscription
ErrorsILLEGAL_STATE subscriptionForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT subscriptionForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED subscriptionForm did not originate from getSubscriptionFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateMySubscriptions
Description

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

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

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

Parametersosid.id.IdsubscriptionIdthe Id of the Subscription
Returnosid.subscription.SubscriptionFormthe subscription form
ErrorsNOT_FOUND subscriptionId is not found for this user
NULL_ARGUMENT subscriptionId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateMySubscription
Description

Updates an existing subscription.

Parametersosid.subscription.SubscriptionFormsubscriptionFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE subscriptionForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT subscriptionId or subscriptionForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED subscriptionForm did not originate from getSubscriptionFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanUnsubscribe
Description

Tests if this user can delete their own subscriptions. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Subscription will result in a PERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.

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

Deletes an Subscription.

Parametersosid.id.IdsubscriptionIdthe Id of the Subscription to remove
ErrorsNOT_FOUND subscriber not subscribed to subscriptionId
NULL_ARGUMENT subscriptionId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.