Class PluginConfig

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<PluginConfig>
    Direct Known Subclasses:
    DetectorWrapper, PolicyWrapper

    public class PluginConfig
    extends java.lang.Object
    implements java.io.Serializable, java.lang.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 Detail

      • PluginConfig

        public PluginConfig()
        Creates an empty plugin configuration.
      • PluginConfig

        public PluginConfig​(java.lang.String name,
                            java.lang.String clazz)
        Creates a plugin configuration with the given name and class.
        Parameters:
        name - the human-readable name of the plugin
        clazz - the name of the plugin's java class
      • PluginConfig

        public PluginConfig​(PluginConfig pluginConfig)

        Constructor for PluginConfig.

        Parameters:
        pluginConfig - a PluginConfig object.
    • Method Detail

      • getName

        public java.lang.String getName()
        Get the name of the plugin.
        Returns:
        the human-readable name of the plugin
      • setName

        public void setName​(java.lang.String name)
        Sets the name of the plugin.
        Parameters:
        name - the human-readable name to set
      • getPluginClass

        public java.lang.String getPluginClass()
        Get the name of the plugin's java class.
        Returns:
        the plugin's class name
      • setPluginClass

        public void setPluginClass​(java.lang.String clazz)
        Set the name of the plugin's java class.
        Parameters:
        clazz - a String object.
      • getParameters

        public java.util.Set<PluginParameter> getParameters()
        Get a List of the plugin parameters.
        Returns:
        the parameters
      • setParameters

        public void setParameters​(java.util.Set<PluginParameter> list)

        setParameters

        Parameters:
        list - a Set object.
      • getParameterMap

        public java.util.Map<java.lang.String,​java.lang.String> getParameterMap()

        getParameterMap

        Returns:
        the parameters
      • setParameterMap

        public void setParameterMap​(java.util.Map<java.lang.String,​java.lang.String> parameters)

        setParameterMap

        Parameters:
        parameters - the parameters to set
      • getParameter

        public java.lang.String getParameter​(java.lang.String key)

        getParameter

        Parameters:
        key - the parameter name
        Returns:
        the parameter value
      • addParameter

        public void addParameter​(java.lang.String key,
                                 java.lang.String value)

        addParameter

        Parameters:
        key - the parameter name
        value - the parameter value
      • getAvailableParameterKeys

        public java.util.Set<java.lang.String> getAvailableParameterKeys()

        getAvailableParameterKeys

        Returns:
        a Set object.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • compareTo

        public int compareTo​(PluginConfig other)
        Specified by:
        compareTo in interface java.lang.Comparable<PluginConfig>