Package org.eso.ias.cdb.pojos
Class PluginConfigDao
java.lang.Object
org.eso.ias.cdb.pojos.PluginConfigDao
- Direct Known Subclasses:
PluginFileConfig
The java pojo with the plugin configuration.
This object is used by jakson2 parser to read the JSON file.
- Author:
- acaproni
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getId()
GetterFlushes and return the array ofPropertyDao
in aProperties
object.getProperty
(String key) getProps()
int
hashCode()
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 validvoid
setDefaultFilter
(String defaultFilter) void
setDefaultFilterOptions
(String defaultFilterOptions) void
Settervoid
setMonitoredSystemId
(String monitoredSystemId) Settervoid
-
Constructor Details
-
PluginConfigDao
public PluginConfigDao()
-
-
Method Details
-
getId
- Returns:
- the id
-
setId
Setter- Parameters:
id
- the id of the plugin
-
getValues
- Returns:
- the values
-
setValues
- Parameters:
values
- the values to set
-
valuesAsCollection
- Returns:
- The values as a
Collection
-
valuesAsMap
- Returns:
- A map of values whose key is the ID of the value
-
getValue
- 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
- 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
- Returns:
- the array of properties
-
getProperties
Flushes and return the array ofPropertyDao
in aProperties
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
Getter- Returns:
- The ID of the system monitored by the plugin
-
setMonitoredSystemId
Setter- Parameters:
monitoredSystemId
- : The ID of the system monitored by the plugin
-
getDefaultFilter
- Returns:
- the DefaultFilter
-
setDefaultFilter
- Parameters:
defaultFilter
- the default filter to set
-
getDefaultFilterOptions
- Returns:
- the getDefaultFilterOption
-
setDefaultFilterOptions
- Parameters:
defaultFilterOptions
- the default filter options to set
-
hashCode
public int hashCode() -
equals
-