public interface RepositoryNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Repository
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 |
canRegisterForRepositoryNotifications()
Tests if this user can register for
Repository
notifications. |
void |
registerForChangedRepositories()
Registers for notification of updated repositories.
|
void |
registerForChangedRepository(Id repositoryId)
Registers for notification of an updated repository.
|
void |
registerForDeletedRepositories()
Registers for notification of deleted repositories.
|
void |
registerForDeletedRepository(Id repositoryId)
Registers for notification of a deleted repository.
|
void |
registerForDeletedRepositoryAncestors(Id repositoryId)
Registers for notification if an ancestor is removed from the
specified repository in the repository hierarchy.
|
void |
registerForDeletedRepositoryDescendants(Id repositoryId)
Registers for notification if a descendant is removed from fthe
specified repository in the repository hierarchy.
|
void |
registerForNewRepositories()
Register for notifications of new repositories.
|
void |
registerForNewRepositoryAncestors(Id repositoryId)
Registers for notification if an ancestor is added to the specified
repository in the repository hierarchy.
|
void |
registerForNewRepositoryDescendants(Id repositoryId)
Registers for notification if a descendant is added to the specified
repository in the repository hierarchy.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canRegisterForRepositoryNotifications()
Repository
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 registerForNewRepositories() throws OperationFailedException, PermissionDeniedException
RepositoryReceiver.newRepositories()
is invoked when a new
Repository
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewRepositoryAncestors(Id repositoryId) throws OperationFailedException, PermissionDeniedException
RepositoryReceiver.newRepositoryAncestor()
is invoked when the
specified repository experiences an addition in ancestry.repositoryId
- the Id
of the repository to
monitorNullArgumentException
- repositoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewRepositoryDescendants(Id repositoryId) throws OperationFailedException, PermissionDeniedException
RepositoryReceiver.newRepositoryDescendant()
is invoked when
the specified repository experiences an addition in descendants.repositoryId
- the Id
of the repository to
monitorNullArgumentException
- repositoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRepositories() throws OperationFailedException, PermissionDeniedException
RepositoryReceiver.changedRepositories()
is invoked when a
repository is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRepository(Id repositoryId) throws OperationFailedException, PermissionDeniedException
RepositoryReceiver.changedRepositories()
is invoked when the
specified repository is changed.repositoryId
- the Id
of the Repository
to monitorNullArgumentException
- repositoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRepositories() throws OperationFailedException, PermissionDeniedException
RepositoryReceiver.deletedRepositories()
is invoked when a
repository is deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRepository(Id repositoryId) throws OperationFailedException, PermissionDeniedException
RepositoryReceiver.deletedRepositories()
is invoked when the
specified repository is deleted.repositoryId
- the Id
of the Repository
to monitorNullArgumentException
- repositoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRepositoryAncestors(Id repositoryId) throws OperationFailedException, PermissionDeniedException
RepositoryReceiver.deletedRepositoryAncestor()
is invoked when
the specified repository experiences a removal of an ancestor.repositoryId
- the Id
of the repository to
monitorNullArgumentException
- repositoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRepositoryDescendants(Id repositoryId) throws OperationFailedException, PermissionDeniedException
RepositoryReceiver.deletedRepositoryDescednant()
is invoked
when the specified repository experiences a removal of one of its
descdendents.repositoryId
- the Id
of the repository to
monitorNullArgumentException
- repositoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.