public interface NodeConfigTransferObject
MutableNodeConfig basic configuration data.
MutableNodeConfig and its sub-interfaces return and take as argument this
interface to allow getting and setting atomically data. See
MutableConfig.
It so happens that the only configuration data that can be transfered from and to MutableNodeConfig's (and its sub-interfaces) are the same and are represented by this interface. If MutableNodeConfig and its sub-interfaces eventually contain other configuration data that are not common, the orientation will probably be to introduce new transfer objects instead implementing an interface hierarchy to factor out commonality.
Since this interface represents a transfer object, implementations are
generally straightforward, and in most cases,
SimpleNodeConfigTransferObject will be adequate. Specifically if an
implementation of MutableNodeConfig needs to manage concurrency with optimistic
locking, OptimisticLockHandle should be used instead of including some
hidden field within the NodeConfigTransferObject implementation.
String getName()
void setName(String name)
name - See description.PropertyDefConfig getPropertyDefConfig(String name)
PropertyDefConfig.
If the PropertyDefConfig exists but is defined with the value field set to null, a PropertyDefConfig is returned (instead of returning null).
name - Name of the PropertyDefConfig.boolean isPropertyExists(String name)
PropertyDefConfig exists.
If the PropertyDefConfig exists but is defined with the value field set to null, true is returned.
Returns true if an only if getPropertyDefConfig(java.lang.String) does not return null.
name - Name of the PropertyDefConfig.List<PropertyDefConfig> getListPropertyDefConfig()
PropertyDefConfig's.
If no PropertyDefConfig is defined for the NodeConfig, an empty List is returned (as opposed to null).
The order of the PropertyDefConfig is generally expected to be as defined in the underlying storage for the configuration, hence the List return type. But no particular order is actually guaranteed.
void removePropertyDefConfig(String name)
PropertyDefConfig.name - Name of the PropertyDefConfig.boolean setPropertyDefConfig(PropertyDefConfig propertyDefConfig)
PropertyDefConfig.
If one already exists with the same name, it is overwritten. Otherwise it is added.
Mostly any implementation of PropertyDefConfig can be used, although SimplePropertyDefConfig is generally the better choice.
propertyDefConfig - PropertyDefConfig.PluginDefConfig getPluginDefConfig(Class<? extends NodePlugin> classNodePlugin, String pluginId)
PluginDefConfig.
If the PluginDefConfig exists but is defined with the pluginClass field set to null, a PluginDefConfig is returned (instead of returning null).
classNodePlugin - Class of the NodePlugin interface.pluginId - Plugin ID to distinguish between multiple instances of the same
plugin. Can be null to get a PluginDefConfig whose field pluginId is null.boolean isPluginDefConfigExists(Class<? extends NodePlugin> classNodePlugin, String pluginId)
PluginDefConfig exists.
If the PluginDefConfig exists but is defined with the pluginClass field set to null, true is returned.
Returns true if an only if getPluginDefConfig(java.lang.Class<? extends org.azyva.dragom.model.plugin.NodePlugin>, java.lang.String) does not return null.
classNodePlugin - Class of the NodePlugin interface.pluginId - Plugin ID to distinguish between multiple instances of the same
plugin. Can be null to get a PluginDefConfig whose field pluginId is null.List<PluginDefConfig> getListPluginDefConfig()
PluginDefConfig's.
If no PluginDefConfig is defined for the NodeConfig, an empty Set is returned (as opposed to null).
The order of the PluginDefConfig is generally expected to be as defined in the underlying storage for the configuration, hence the List return type. But no particular order is actually guaranteed.
void removePlugingDefConfig(Class<? extends NodePlugin> classNodePlugin, String pluginId)
PropertyDefConfig.classNodePlugin - Class of the NodePlugin interface.pluginId - Plugin ID to distinguish between multiple instances of the same
plugin. Can be null to get a PluginDefConfig whose field pluginId is null.boolean setPluginDefConfig(PluginDefConfig pluginDefConfig)
PluginDefConfig.
If one already exists with the same PluginKey, it is overwritten.
Otherwise it is added.
Mostly any implementation of PluginDefConfig can be used, although SimplePluginDefConfig is generally the better choice.
pluginDefConfig - PluginDefConfig.Copyright © 2015–2017 AZYVA INC.. All rights reserved.