|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Source
A model of a data source managed by the plugin.
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.
| Field Summary | |
|---|---|
static QName |
TREE_TYPE
|
| Method Summary | |
|---|---|
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. |
| Field Detail |
|---|
static final QName TREE_TYPE
| Method Detail |
|---|
String id()
List<QName> types()
String name()
String description()
List<Property> properties()
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
environment
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||