Class PluginConfig
- java.lang.Object
-
- org.opennms.netmgt.provision.persist.foreignsource.PluginConfig
-
- All Implemented Interfaces:
Serializable,Comparable<PluginConfig>
- Direct Known Subclasses:
DetectorWrapper,PolicyWrapper
public class PluginConfig extends Object implements Serializable, Comparable<PluginConfig>
A PluginConfig represents a portion of a configuration that defines a reference to a Java class "plugin" along with a set of parameters used to configure the behavior of that plugin.- Author:
- Benjamin Reed, Matt Brozowski
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PluginConfig()Creates an empty plugin configuration.PluginConfig(String name, String clazz)Creates a plugin configuration with the given name and class.PluginConfig(PluginConfig pluginConfig)Constructor for PluginConfig.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(String key, String value)addParameterintcompareTo(PluginConfig other)voiddeleteParameters(PluginParameter p)removeParametersbooleanequals(Object obj)Set<String>getAvailableParameterKeys()getAvailableParameterKeysStringgetName()Get the name of the plugin.StringgetParameter(String key)getParameterMap<String,String>getParameterMap()getParameterMapSet<PluginParameter>getParameters()Get aListof the plugin parameters.StringgetPluginClass()Get the name of the plugin's java class.inthashCode()voidsetName(String name)Sets the name of the plugin.voidsetParameterMap(Map<String,String> parameters)setParameterMapvoidsetParameters(Set<PluginParameter> list)setParametersvoidsetPluginClass(String clazz)Set the name of the plugin's java class.StringtoString()
-
-
-
Constructor Detail
-
PluginConfig
public PluginConfig()
Creates an empty plugin configuration.
-
PluginConfig
public PluginConfig(String name, String clazz)
Creates a plugin configuration with the given name and class.- Parameters:
name- the human-readable name of the pluginclazz- the name of the plugin's java class
-
PluginConfig
public PluginConfig(PluginConfig pluginConfig)
Constructor for PluginConfig.
- Parameters:
pluginConfig- aPluginConfigobject.
-
-
Method Detail
-
getName
public String getName()
Get the name of the plugin.- Returns:
- the human-readable name of the plugin
-
setName
public void setName(String name)
Sets the name of the plugin.- Parameters:
name- the human-readable name to set
-
getPluginClass
public String getPluginClass()
Get the name of the plugin's java class.- Returns:
- the plugin's class name
-
setPluginClass
public void setPluginClass(String clazz)
Set the name of the plugin's java class.- Parameters:
clazz- aStringobject.
-
getParameters
public Set<PluginParameter> getParameters()
Get aListof the plugin parameters.- Returns:
- the parameters
-
setParameters
public void setParameters(Set<PluginParameter> list)
setParameters
- Parameters:
list- aSetobject.
-
getParameterMap
public Map<String,String> getParameterMap()
getParameterMap
- Returns:
- the parameters
-
setParameterMap
public void setParameterMap(Map<String,String> parameters)
setParameterMap
- Parameters:
parameters- the parameters to set
-
getParameter
public String getParameter(String key)
getParameter
- Parameters:
key- the parameter name- Returns:
- the parameter value
-
addParameter
public void addParameter(String key, String value)
addParameter
- Parameters:
key- the parameter namevalue- the parameter value
-
deleteParameters
public void deleteParameters(PluginParameter p)
removeParameters
- Parameters:
p- aPluginParameterobject.
-
getAvailableParameterKeys
public Set<String> getAvailableParameterKeys()
getAvailableParameterKeys
- Returns:
- a
Setobject.
-
compareTo
public int compareTo(PluginConfig other)
- Specified by:
compareToin interfaceComparable<PluginConfig>
-
-