public interface AssetNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Asset
objects in this Repository.
This
also includes existing assets that may appear or disappear due to changes
in the Repository
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
AssetLookupSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForAssetNotifications()
Tests if this user can register for
Asset
notifications. |
Repository |
getRepository()
Gets the
Repository associated with this session. |
Id |
getRepositoryId()
Gets the
Repository Id associated with
this session. |
void |
registerForChangedAsset(Id assetId)
Registers for notification of an updated asset.
|
void |
registerForChangedAssets()
Registers for notification of updated assets.
|
void |
registerForChangedAssetsByGenusType(Type assetGenusType)
Registers for notification of updated assets of the given asset genus
type.
|
void |
registerForDeletedAsset(Id assetId)
Registers for notification of a deleted asset.
|
void |
registerForDeletedAssets()
Registers for notification of deleted assets.
|
void |
registerForDeletedAssetsByGenusType(Type assetGenusType)
Registers for notification of deleted assets of the given asset genus
type.
|
void |
registerForNewAssets()
Register for notifications of new assets.
|
void |
registerForNewAssetsByGenusType(Type assetGenusType)
Registers for notification of new assets of the given asset genus
type.
|
void |
useFederatedRepositoryView()
Federates the view for methods in this session.
|
void |
useIsolatedRepositoryView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getRepositoryId()
Repository
Id
associated with
this session. Repository Id
associated with this sessionmandatory
- This method must be implemented. Repository getRepository() throws OperationFailedException, PermissionDeniedException
Repository
associated with this session. Repository
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForAssetNotifications()
Asset
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 useFederatedRepositoryView()
mandatory
- This method is must be implemented. void useIsolatedRepositoryView()
mandatory
- This method is must be implemented. void registerForNewAssets() throws OperationFailedException, PermissionDeniedException
AssetReceiver.newAsset()
is invoked when a new Asset
appears in this repository.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewAssetsByGenusType(Type assetGenusType) throws OperationFailedException, PermissionDeniedException
AssetReceiver.newAsset()
is invoked when an asset
is appears in this repository.assetGenusType
- the genus type of the Asset
to
monitorNullArgumentException
- assetGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedAssets() throws OperationFailedException, PermissionDeniedException
AssetReceiver.changedAsset()
is invoked when an asset in this
repository is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedAssetsByGenusType(Type assetGenusType) throws OperationFailedException, PermissionDeniedException
AssetReceiver.changedAsset()
is invoked when an
asset in this repository is changed.assetGenusType
- the genus type of the Asset
to
monitorNullArgumentException
- assetGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedAsset(Id assetId) throws OperationFailedException, PermissionDeniedException
AssetReceiver.changedAsset()
is invoked when the specified
asset in this repository is changed.assetId
- the Id
of the Asset
to
monitorNullArgumentException
- assetId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedAssets() throws OperationFailedException, PermissionDeniedException
AssetReceiver.deletedAsset()
is invoked when an asset is
deleted or removed from this repository.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedAssetsByGenusType(Type assetGenusType) throws OperationFailedException, PermissionDeniedException
AssetReceiver.deletedAsset()
is invoked when an
asset is deleted or removed from this repository.assetGenusType
- the genus type of the Asset
to
monitorNullArgumentException
- assetGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedAsset(Id assetId) throws OperationFailedException, PermissionDeniedException
AssetReceiver.deletedAsset()
is invoked when the specified
asset is deleted or removed from this repository.assetId
- the Id
of the Asset
to
monitorNullArgumentException
- assetId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.