OSID Logo
OSID Specifications
recipe package
Version 3.0.0
Release Candidate Preview
Interfaceosid.recipe.RecipeNotificationSession
Implementsosid.OsidSession
Description

This session defines methods to receive notifications on adds/changes to Recipe objects in this Cookbook. This also includes existing recipes that may appear or disappear due to changes in the Cookbook hierarchy, This session is intended for consumers needing to synchronize their state with this service without the use of polling. Notifications are cancelled when this session is closed.

The two views defined in this session correspond to the views in the RecipeLookupSession.

MethodgetCookbookId
Description

Gets the Cookbook Id associated with this session.

Returnosid.id.Idthe Cookbook Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetCookbook
Description

Gets the Cookbook associated with this session.

Returnosid.recipe.Cookbookthe cookbook
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanRegisterForRecipeNotifications
Description

Tests if this user can register for Recipe notifications. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer notification operations.

Returnboolean false if notification methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseFederatedCookbookView
Description

Federates the view for methods in this session. A federated view will include recipes in cook books which are children of this cook book in the cook book hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedCookbookView
Description

Isolates the view for methods in this session. An isolated view restricts notifications to this cook book only.

CompliancemandatoryThis method is must be implemented.
MethodregisterForNewRecipes
Description

Register for notifications of new recipes. RecipeReceiver.newRecipes() is invoked when a new Recipe appears in this cookbook.

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedRecipes
Description

Registers for notification of updated recipes. RecipeReceiver.changedRecipes() is invoked when a recipe in this cook book is changed.

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedRecipe
Description

Registers for notification of an updated recipe. RecipeReceiver.changedRecipes() is invoked when the specified recipe in this cook book is changed.

Parametersosid.id.IdrecipeIdthe Id of the Recipe to monitor
ErrorsNOT_FOUNDa recipe was not found in this cook book identified by the given Id
NULL_ARGUMENT recipeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedRecipes
Description

Registers for notification of deleted recipes. RecipeReceiver.deletedRecipes() is invoked when a recipe is deleted or removed from this cookbook.

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedRecipe
Description

Registers for notification of a deleted recipe. RecipeReceiver.deletedRecipes() is invoked when the specified recipe is deleted or removed from this cookbook.

Parametersosid.id.IdrecipeIdthe Id of the Recipe to monitor
ErrorsNOT_FOUNDa recipe was not found identified by the given Id
NULL_ARGUMENT recipeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.