Class PluginConfigDao

java.lang.Object
org.eso.ias.cdb.pojos.PluginConfigDao
Direct Known Subclasses:
PluginFileConfig

@Entity public class PluginConfigDao extends Object
The java pojo with the plugin configuration.

This object is used by jakson2 parser to read the JSON file.

Author:
acaproni
  • Constructor Details

    • PluginConfigDao

      public PluginConfigDao()
  • Method Details

    • getId

      public String getId()
      Returns:
      the id
    • setId

      public void setId(String id)
      Setter
      Parameters:
      id - the id of the plugin
    • getValues

      public Set<ValueDao> getValues()
      Returns:
      the values
    • setValues

      public void setValues(Set<ValueDao> values)
      Parameters:
      values - the values to set
    • valuesAsCollection

      public Collection<ValueDao> valuesAsCollection()
      Returns:
      The values as a Collection
    • valuesAsMap

      public Map<String,ValueDao> valuesAsMap()
      Returns:
      A map of values whose key is the ID of the value
    • getValue

      public Optional<ValueDao> getValue(String id)
      Parameters:
      id - The non empty identifier of the value to get
      Returns:
      The value with a give id that is empty if the array does not contain a value with the passed identifier
    • isValid

      public boolean isValid()
      Check the correctness of the values contained in this objects:
      • Non empty ID
      • Non empty sink server name
      • Valid port
      • Non empty list of values
      • No duplicated ID between the values
      • Each value is valid
      Returns:
      true if the data contained in this object are correct
    • getProperty

      public Optional<PropertyDao> getProperty(String key)
      Parameters:
      key - The non empty key of the property to get
      Returns:
      The value of the property with the given key or empty if a property with the given key does not exist
    • getProps

      public Set<PropertyDao> getProps()
      Returns:
      the array of properties
    • getProperties

      public Properties getProperties()
      Flushes and return the array of PropertyDao in a Properties object.

      If the a property with the same key appears more the once, it is discarded and a message logged.

      Returns:
      The properties as Properties
    • getMonitoredSystemId

      public String getMonitoredSystemId()
      Getter
      Returns:
      The ID of the system monitored by the plugin
    • setMonitoredSystemId

      public void setMonitoredSystemId(String monitoredSystemId)
      Setter
      Parameters:
      monitoredSystemId - : The ID of the system monitored by the plugin
    • getDefaultFilter

      public String getDefaultFilter()
      Returns:
      the DefaultFilter
    • setDefaultFilter

      public void setDefaultFilter(String defaultFilter)
      Parameters:
      defaultFilter - the default filter to set
    • getDefaultFilterOptions

      public String getDefaultFilterOptions()
      Returns:
      the getDefaultFilterOption
    • setDefaultFilterOptions

      public void setDefaultFilterOptions(String defaultFilterOptions)
      Parameters:
      defaultFilterOptions - the default filter options to set
    • hashCode

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object