public interface CategoryNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Category
objects in this Business.
This
also includes existing categories that may appear or disappear due to
changes in the Business
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
CategoryLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeCategoryNotification(Id notificationId)
Acknowledge a category notification.
|
boolean |
canRegisterForCategoryNotifications()
Tests if this user can register for
Category
notifications. |
Business |
getBusiness()
Gets the
Business associated with this session. |
Id |
getBusinessId()
Gets the
Business Id associated with
this session. |
void |
registerForChangedCategories()
Registers for notification of updated categories.
|
void |
registerForChangedCategory(Id categoryId)
Registers for notification of an updated category.
|
void |
registerForDeletedCategories()
Registers for notification of deleted categories.
|
void |
registerForDeletedCategory(Id categoryId)
Registers for notification of a deleted category.
|
void |
registerForNewCategories()
Register for notifications of new categories.
|
void |
reliableCategoryNotifications()
Reliable notifications are desired.
|
void |
unreliableCategoryNotifications()
Unreliable notifications are desired.
|
void |
useFederatedBusinessView()
Federates the view for methods in this session.
|
void |
useIsolatedBusinessView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBusinessId()
Business
Id
associated with
this session. Business Id
associated with this sessionmandatory
- This method must be implemented. Business getBusiness() throws OperationFailedException, PermissionDeniedException
Business
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForCategoryNotifications()
Category
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 useFederatedBusinessView()
mandatory
- This method is must be implemented. void useIsolatedBusinessView()
mandatory
- This method is must be implemented. void reliableCategoryNotifications()
acknowledgeCategoryNotification()
.mandatory
- This method is must be implemented. void unreliableCategoryNotifications()
mandatory
- This method is must be implemented. void acknowledgeCategoryNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewCategories() throws OperationFailedException, PermissionDeniedException
CategoryReceiver.newCategories()
is invoked when a new
Category
appears in this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCategories() throws OperationFailedException, PermissionDeniedException
CategoryReceiver.changedCategories()
is invoked when a
category in this business is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCategory(Id categoryId) throws OperationFailedException, PermissionDeniedException
CategoryReceiver.changedCategories()
is invoked when the
specified category in this business is changed.categoryId
- the Id
of the Category
to monitorNullArgumentException
- categoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCategories() throws OperationFailedException, PermissionDeniedException
CategoryReceiver.deletedCategories()
is invoked when a
category is deleted or removed from this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCategory(Id categoryId) throws OperationFailedException, PermissionDeniedException
CategoryReceiver.deletedCategories()
is invoked when the
specified category is deleted or removed from this business.categoryId
- the Id
of the Category
to monitorNullArgumentException
- categoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.