public abstract class AbstractSource extends Object implements Source
Source.| Constructor and Description |
|---|
AbstractSource(String id)
Creates an instance with a given identifier.
|
| 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. |
boolean |
equals(Object obj) |
int |
hashCode() |
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. |
SourceReader |
reader()
Returns the
SourceReader. |
void |
setCardinality(Long cardinality)
Sets the cardinality of the source, changing automatically the time of
last modification of the source.
|
Calendar |
setCreationTime(Calendar time)
Sets the creation time of the source.
|
void |
setDescription(String description)
Sets a free-form description for the source.
|
void |
setEnvironment(Environment env)
Sets the local
Environment of the plugin. |
void |
setLastUpdate(Calendar time)
Sets the time in which the source was last modified.
|
void |
setLifecycle(SourceLifecycle lifecycle)
Sets the
SourceLifecycle. |
void |
setName(String name)
Sets the name of the source.
|
void |
setNotifier(SourceNotifier notifier)
Returns the
SourceNotifier. |
void |
setReader(SourceReader reader)
Sets the
SourceReader |
void |
setUser(boolean isUser)
Marks the source as a user or as a system source.
|
void |
setWriter(SourceWriter writer)
Sets the
SourceWriter |
String |
toString() |
SourceWriter |
writer()
Returns the
SourceWriter. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitproperties, typespublic AbstractSource(String id) throws InvalidRequestException
id - the identifierInvalidRequestException - if the identifier is nullpublic String id()
public String name()
public void setName(String name)
name - the namepublic String description()
description in interface Sourcepublic void setDescription(String description)
description - the descriptionpublic Calendar creationTime()
creationTime in interface Sourcepublic Calendar setCreationTime(Calendar time)
time - the creation timepublic void setUser(boolean isUser)
isUser - true if the source is a user source, false
otherwisepublic boolean isUser()
true if the source is a user-level source,
false if it is instead system-level source.public Long cardinality()
cardinality in interface Sourcepublic void setCardinality(Long cardinality)
cardinality - the cardinalitysetLastUpdate(Calendar)public Calendar lastUpdate()
lastUpdate in interface Sourcepublic void setLastUpdate(Calendar time)
An actual change in the value of this property notifies the service of a
SourceEvent.CHANGE event.
time - the last modification timepublic SourceLifecycle lifecycle()
SourceLifecycle.public void setLifecycle(SourceLifecycle lifecycle)
SourceLifecycle.lifecycle - the lifecyclepublic SourceReader reader()
SourceReader.public void setReader(SourceReader reader)
SourceReaderreader - the readerpublic void setWriter(SourceWriter writer)
SourceWriterwriter - the writerpublic SourceWriter writer()
SourceWriter.public void 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.
setNotifier in interface Sourcenotifier - the notifierpublic SourceNotifier notifier()
SourceNotifier.public Environment environment()
Environment of the plugin.environment in interface Sourcepublic void setEnvironment(Environment env)
Environment of the plugin.
It is invoked by the service prior to source initialisation.
setEnvironment in interface Sourceenv - the
environmentCopyright © 2018. All Rights Reserved.