public interface RecipeNotificationSession extends OsidSession
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.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRegisterForRecipeNotifications()
Tests if this user can register for
Recipe
notifications. |
Cookbook |
getCookbook()
Gets the
Cookbook associated with this session. |
Id |
getCookbookId()
Gets the
Cookbook Id associated with
this session. |
void |
registerForChangedRecipe(Id recipeId)
Registers for notification of an updated recipe.
|
void |
registerForChangedRecipes()
Registers for notification of updated recipes.
|
void |
registerForDeletedRecipe(Id recipeId)
Registers for notification of a deleted recipe.
|
void |
registerForDeletedRecipes()
Registers for notification of deleted recipes.
|
void |
registerForNewRecipes()
Register for notifications of new recipes.
|
void |
useFederatedCookbookView()
Federates the view for methods in this session.
|
void |
useIsolatedCookbookView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getCookbookId()
Cookbook Id associated with
this session. Cookbook Id associated with this sessionmandatory - This method must be implemented. Cookbook getCookbook() throws OperationFailedException, PermissionDeniedException
Cookbook associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canRegisterForRecipeNotifications()
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. false if notification methods are not
authorized, true otherwisemandatory - This method must be implemented. void useFederatedCookbookView()
mandatory - This method is must be implemented. void useIsolatedCookbookView()
mandatory - This method is must be implemented. void registerForNewRecipes()
throws OperationFailedException,
PermissionDeniedException
RecipeReceiver.newRecipes() is invoked when a new
Recipe appears in this cookbook.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedRecipes()
throws OperationFailedException,
PermissionDeniedException
RecipeReceiver.changedRecipes() is invoked when a recipe in
this cook book is changed.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedRecipe(Id recipeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
RecipeReceiver.changedRecipes() is invoked when the specified
recipe in this cook book is changed.recipeId - the Id of the Recipe to
monitorNotFoundException - a recipe was not found in this cook
book identified by the given Id NullArgumentException - recipeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedRecipes()
throws OperationFailedException,
PermissionDeniedException
RecipeReceiver.deletedRecipes() is invoked when a recipe is
deleted or removed from this cookbook.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedRecipe(Id recipeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
RecipeReceiver.deletedRecipes() is invoked when the specified
recipe is deleted or removed from this cookbook.recipeId - the Id of the Recipe to
monitorNotFoundException - a recipe was not found identified
by the given Id NullArgumentException - recipeId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.