OSID Logo
OSID Specifications
subscription package
Version 3.0.0
Interfaceosid.subscription.MySubscriptionAdminSession
Implementsosid.OsidSession
Used Byosid.subscription.SubscriptionManager
osid.subscription.SubscriptionProxyManager
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.

Returnbooleanfalse 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
Returnbooleantrue if Subscription creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENTsubscriptionRecordTypes 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_FOUNDdispatchId is not found
NULL_ARGUMENTdispatchId 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_STATEsubscriptionForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENTsubscriptionForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDsubscriptionForm 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.

Returnbooleanfalse 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_FOUNDsubscriptionId is not found for this user
NULL_ARGUMENTsubscriptionId 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_STATEsubscriptionForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENTsubscriptionId or subscriptionForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDsubscriptionForm 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.

Returnbooleanfalse 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_FOUNDsubscriber not subscribed to subscriptionId
NULL_ARGUMENTsubscriptionId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.