public interface Source extends Serializable
This model provides information that the service uses to dispatch client requests to
the plugin (SourceReader, SourceWriter), as well as to manage
its lifetime (SourceLifecycle).
It also provides information about the source that the service publishes in
the infrastructure on behalf of the plugin (identifier, data type,
description, date of creation and last modification, cardinality, etc).
This information must be configured by the plugin prior to source
initialisation and, when appropriate, managed over the source;s lifetime
(e.g. updates to cardinality and last modification dates).
This model also accepts information from the service that the plugin uses to access
the local environment (Environment) and to communicate back to the
service events of the relevance about the source (SourceNotifier).
This information is set by the service prior to source initialisation (cf.
SourceLifecycle.init() and the plugin should not use it until then.
| Modifier and Type | Method and Description |
|---|---|
Long |
cardinality()
Returns the cardinality of the source.
|
Calendar |
creationTime()
Returns the creation time of the source.
|
String |
description()
Returns the free-form description of the source.
|
Environment |
environment()
Returns the local
Environment of the plugin. |
String |
id()
Returns the identifier of the source.
|
boolean |
isUser()
Returns
true if the source is a user-level source,
false if it is instead system-level source. |
Calendar |
lastUpdate()
Returns the time in which the source was last modified.
|
SourceLifecycle |
lifecycle()
Returns the
SourceLifecycle. |
String |
name()
Returns the name of the source.
|
SourceNotifier |
notifier()
Returns the
SourceNotifier. |
List<Property> |
properties()
Returns the properties of the source.
|
SourceReader |
reader()
Returns the
SourceReader. |
void |
setEnvironment(Environment env)
Sets the local
Environment of the plugin. |
void |
setNotifier(SourceNotifier notifier)
Returns the
SourceNotifier. |
List<QName> |
types()
Returns the tree types of the source.
|
SourceWriter |
writer()
Returns the
SourceWriter. |
static final QName TREE_TYPE
String id()
String name()
String description()
Calendar creationTime()
boolean isUser()
true if the source is a user-level source,
false if it is instead system-level source.true if the source is a user-level source,
false otherwiseLong cardinality()
Calendar lastUpdate()
SourceLifecycle lifecycle()
SourceLifecycle.SourceReader reader()
SourceReader.null if the source is write-onlySourceWriter writer()
SourceWriter.null if the source is read-onlyvoid setNotifier(SourceNotifier notifier)
SourceNotifier.
This is invoked by the service prior to source initialisation. The service subscribes to the provider so as to receive notification of events fired from the plugin.
notifier - the notifierSourceNotifier notifier()
SourceNotifier.Environment environment()
Environment of the plugin.void setEnvironment(Environment env)
Environment of the plugin.
It is invoked by the service prior to source initialisation.
env - the
environmentCopyright © 2018. All Rights Reserved.