public interface PersonNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Person
objects. 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.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForPersonNotifications()
Tests if this user can register for
Person
notifications. |
Realm |
getRealm()
Gets the
Realm associated with this session. |
Id |
getRealmId()
Gets the
Realm Id associated with this
session. |
void |
registerForChangedPerson(Id personId)
Registers for notification of an updated person.
|
void |
registerForChangedPersons()
Registers for notification of updated persons.
|
void |
registerForDeletedPerson(Id personId)
Registers for notification of a deleted person.
|
void |
registerForDeletedPersons()
Registers for notification of deleted persons.
|
void |
registerForNewPersons()
Register for notifications of new persons.
|
void |
useFederatedRealmView()
Federates the view for methods in this session.
|
void |
useIsolatedRealmView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getRealmId()
Realm
Id
associated with this
session. Realm Id
associated with this sessionmandatory
- This method must be implemented. Realm getRealm() throws OperationFailedException, PermissionDeniedException
Realm
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForPersonNotifications()
Person
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 useFederatedRealmView()
mandatory
- This method is must be implemented. void useIsolatedRealmView()
mandatory
- This method is must be implemented. void registerForNewPersons() throws OperationFailedException, PermissionDeniedException
PersonReceiver.newPersons()
is invoked when a new
Person
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPersons() throws OperationFailedException, PermissionDeniedException
PersonReceiver.changedPersons()
is invoked when a person in
this realm is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPerson(Id personId) throws NotFoundException, OperationFailedException, PermissionDeniedException
PersonReceiver.changedPersons()
is invoked when the specified
person in this realm is changed.personId
- the Id
of the Person
to
monitorNotFoundException
- a person was not found identified
by the given Id
NullArgumentException
- personId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPersons() throws OperationFailedException, PermissionDeniedException
PersonReceiver.deletedPersons()
is invoked when a person is
removed from this realm.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPerson(Id personId) throws NotFoundException, OperationFailedException, PermissionDeniedException
PersonReceiver.deletedPersons()
is invoked when the specified
person is removed from this realm.personId
- the Id
of the Person
to
monitorNotFoundException
- a person was not found identified
by the given Id
NullArgumentException
- personId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.