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 void
addParameter(String key, String value)
addParameterint
compareTo(PluginConfig other)
void
deleteParameters(PluginParameter p)
removeParametersboolean
equals(Object obj)
Set<String>
getAvailableParameterKeys()
getAvailableParameterKeysString
getName()
Get the name of the plugin.String
getParameter(String key)
getParameterMap<String,String>
getParameterMap()
getParameterMapSet<PluginParameter>
getParameters()
Get aList
of the plugin parameters.String
getPluginClass()
Get the name of the plugin's java class.int
hashCode()
void
setName(String name)
Sets the name of the plugin.void
setParameterMap(Map<String,String> parameters)
setParameterMapvoid
setParameters(Set<PluginParameter> list)
setParametersvoid
setPluginClass(String clazz)
Set the name of the plugin's java class.String
toString()
-
-
-
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
- aPluginConfig
object.
-
-
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
- aString
object.
-
getParameters
public Set<PluginParameter> getParameters()
Get aList
of the plugin parameters.- Returns:
- the parameters
-
setParameters
public void setParameters(Set<PluginParameter> list)
setParameters
- Parameters:
list
- aSet
object.
-
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
- aPluginParameter
object.
-
getAvailableParameterKeys
public Set<String> getAvailableParameterKeys()
getAvailableParameterKeys
- Returns:
- a
Set
object.
-
compareTo
public int compareTo(PluginConfig other)
- Specified by:
compareTo
in interfaceComparable<PluginConfig>
-
-