public interface PostNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Post
objects in this Business.
This also
includes existing posts 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
PostLookupSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForPostNotifications()
Tests if this user can register for
Post notifications. |
Business |
getBusiness()
Gets the
Business associated with this session. |
Id |
getBusinessId()
Gets the
Business Id associated with
this session. |
void |
registerForChangedPost(Id postId)
Registers for notification of an updated post.
|
void |
registerForChangedPosts()
Registers for notification of updated payers.
|
void |
registerForDeletedPost(Id postId)
Registers for notification of a deleted post.
|
void |
registerForDeletedPosts()
Registers for notification of deleted payers.
|
void |
registerForNewPosts()
Register for notifications of new posts.
|
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 canRegisterForPostNotifications()
Post
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 registerForNewPosts() throws OperationFailedException, PermissionDeniedException
PostReceiver.newPosts()
is invoked when a new Post
appears in this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPosts() throws OperationFailedException, PermissionDeniedException
PostReceiver.changedPosts()
is invoked when a payer in this
business is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPost(Id postId) throws OperationFailedException, PermissionDeniedException
PostReceiver.changedPosts()
is invoked when the specified post
in this business is changed.postId
- the Id
of the Post
to
monitorNullArgumentException
- postId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPosts() throws OperationFailedException, PermissionDeniedException
PostReceiver.deletedPosts()
is invoked when a post is deleted
or removed from this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPost(Id postId) throws OperationFailedException, PermissionDeniedException
PostReceiver.deletedPosts()
is invoked when the specified post
is deleted or removed from this business.postId
- the Id
of the Post
to
monitorNullArgumentException
- postId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.