public class SimpleNodeConfigTransferObject extends Object implements NodeConfigTransferObject
NodeConfigTransferObject.| Constructor and Description |
|---|
SimpleNodeConfigTransferObject()
Constructor.
|
public SimpleNodeConfigTransferObject()
This constructor is public since instances can be created by classes in
different Dragom packages. Instances are meant to be created only by
implementations of MutableConfig and child interfaces. We could
enforce this by making the constructor protected and requiring specific
subclasses with a package-scope constructor to be implemented for each
implementation package, but for now, we keep it simple.
public String getName()
getName in interface NodeConfigTransferObjectpublic void setName(String name)
NodeConfigTransferObjectsetName in interface NodeConfigTransferObjectname - See description.public PropertyDefConfig getPropertyDefConfig(String name)
NodeConfigTransferObjectPropertyDefConfig.
If the PropertyDefConfig exists but is defined with the value field set to null, a PropertyDefConfig is returned (instead of returning null).
getPropertyDefConfig in interface NodeConfigTransferObjectname - Name of the PropertyDefConfig.public boolean isPropertyExists(String name)
NodeConfigTransferObjectPropertyDefConfig exists.
If the PropertyDefConfig exists but is defined with the value field set to null, true is returned.
Returns true if an only if NodeConfigTransferObject.getPropertyDefConfig(java.lang.String) does not return null.
isPropertyExists in interface NodeConfigTransferObjectname - Name of the PropertyDefConfig.public List<PropertyDefConfig> getListPropertyDefConfig()
NodeConfigTransferObjectPropertyDefConfig'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.
getListPropertyDefConfig in interface NodeConfigTransferObjectpublic void removePropertyDefConfig(String name)
NodeConfigTransferObjectPropertyDefConfig.removePropertyDefConfig in interface NodeConfigTransferObjectname - Name of the PropertyDefConfig.public boolean setPropertyDefConfig(PropertyDefConfig propertyDefConfig)
NodeConfigTransferObjectPropertyDefConfig.
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.
setPropertyDefConfig in interface NodeConfigTransferObjectpropertyDefConfig - PropertyDefConfig.public PluginDefConfig getPluginDefConfig(Class<? extends NodePlugin> classNodePlugin, String pluginId)
NodeConfigTransferObjectPluginDefConfig.
If the PluginDefConfig exists but is defined with the pluginClass field set to null, a PluginDefConfig is returned (instead of returning null).
getPluginDefConfig in interface NodeConfigTransferObjectclassNodePlugin - 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.public boolean isPluginDefConfigExists(Class<? extends NodePlugin> classNodePlugin, String pluginId)
NodeConfigTransferObjectPluginDefConfig exists.
If the PluginDefConfig exists but is defined with the pluginClass field set to null, true is returned.
Returns true if an only if NodeConfigTransferObject.getPluginDefConfig(java.lang.Class<? extends org.azyva.dragom.model.plugin.NodePlugin>, java.lang.String) does not return null.
isPluginDefConfigExists in interface NodeConfigTransferObjectclassNodePlugin - 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.public List<PluginDefConfig> getListPluginDefConfig()
NodeConfigTransferObjectPluginDefConfig'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.
getListPluginDefConfig in interface NodeConfigTransferObjectpublic void removePlugingDefConfig(Class<? extends NodePlugin> classNodePlugin, String pluginId)
NodeConfigTransferObjectPropertyDefConfig.removePlugingDefConfig in interface NodeConfigTransferObjectclassNodePlugin - 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.public boolean setPluginDefConfig(PluginDefConfig pluginDefConfig)
NodeConfigTransferObjectPluginDefConfig.
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.
setPluginDefConfig in interface NodeConfigTransferObjectpluginDefConfig - PluginDefConfig.Copyright © 2015–2016 AZYVA INC.. All rights reserved.