org.opennms.netmgt.threshd
Class BaseThresholdDefConfigWrapper

java.lang.Object
  extended by org.opennms.netmgt.threshd.BaseThresholdDefConfigWrapper
Direct Known Subclasses:
ExpressionConfigWrapper, ThresholdConfigWrapper

public abstract class BaseThresholdDefConfigWrapper
extends Object

Abstract BaseThresholdDefConfigWrapper class.

Author:
Jeff Gehlbach, Craig Miskell

Constructor Summary
protected BaseThresholdDefConfigWrapper(Basethresholddef baseDef)
          Constructor for BaseThresholdDefConfigWrapper.
 
Method Summary
 boolean equals(Object obj)
          
abstract  double evaluate(Map<String,Double> values)
          Evaluate the threshold expression/datasource in terms of the named values supplied, and return that value
 Basethresholddef getBasethresholddef()
          getBasethresholddef
static BaseThresholdDefConfigWrapper getConfigWrapper(Basethresholddef baseDef)
          getConfigWrapper
abstract  String getDatasourceExpression()
          getDatasourceExpression
 String getDsLabel()
          getDsLabel
 String getDsType()
          getDsType
 double getRearm()
          getRearm
 String getRearmedUEI()
          getRearmedUEI
abstract  Collection<String> getRequiredDatasources()
          Returns the names of the datasources required to evaluate this threshold
 int getTrigger()
          getTrigger
 String getTriggeredUEI()
          getTriggeredUEI
 String getType()
          getType
 double getValue()
          getValue
 int hashCode()
          
 boolean hasRearm()
          hasRearm
 boolean hasTrigger()
          hasTrigger
 boolean hasValue()
          hasValue
 boolean identical(BaseThresholdDefConfigWrapper o)
          identical
 void merge(BaseThresholdDefConfigWrapper threshold)
          merge
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseThresholdDefConfigWrapper

protected BaseThresholdDefConfigWrapper(Basethresholddef baseDef)

Constructor for BaseThresholdDefConfigWrapper.

Parameters:
baseDef - a Basethresholddef object.
Method Detail

getConfigWrapper

public static BaseThresholdDefConfigWrapper getConfigWrapper(Basethresholddef baseDef)
                                                      throws ThresholdExpressionException

getConfigWrapper

Parameters:
baseDef - a Basethresholddef object.
Returns:
a BaseThresholdDefConfigWrapper object.
Throws:
ThresholdExpressionException - if any.

getDatasourceExpression

public abstract String getDatasourceExpression()

getDatasourceExpression

Returns:
a descriptive string for the data source - typically either a data source name, or an expression of data source names

getRequiredDatasources

public abstract Collection<String> getRequiredDatasources()
Returns the names of the datasources required to evaluate this threshold

Returns:
Collection of the names of datasources

evaluate

public abstract double evaluate(Map<String,Double> values)
                         throws ThresholdExpressionException
Evaluate the threshold expression/datasource in terms of the named values supplied, and return that value

Parameters:
values - named values to use in evaluating the expression/data source
Returns:
the value of the evaluated expression
Throws:
ThresholdExpressionException - if any.

getDsType

public String getDsType()

getDsType

Returns:
a String object.

getDsLabel

public String getDsLabel()

getDsLabel

Returns:
a String object.

getRearm

public double getRearm()

getRearm

Returns:
a double.

getTrigger

public int getTrigger()

getTrigger

Returns:
a int.

getType

public String getType()

getType

Returns:
a String object.

getValue

public double getValue()

getValue

Returns:
a double.

hasRearm

public boolean hasRearm()

hasRearm

Returns:
a boolean.

hasTrigger

public boolean hasTrigger()

hasTrigger

Returns:
a boolean.

hasValue

public boolean hasValue()

hasValue

Returns:
a boolean.

getTriggeredUEI

public String getTriggeredUEI()

getTriggeredUEI

Returns:
a String object.

getRearmedUEI

public String getRearmedUEI()

getRearmedUEI

Returns:
a String object.

getBasethresholddef

public Basethresholddef getBasethresholddef()

getBasethresholddef

Returns:
a Basethresholddef object.

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

identical

public boolean identical(BaseThresholdDefConfigWrapper o)

identical

Parameters:
o - a BaseThresholdDefConfigWrapper object.
Returns:
a boolean.

merge

public void merge(BaseThresholdDefConfigWrapper threshold)

merge

Parameters:
threshold - a BaseThresholdDefConfigWrapper object.


Copyright © 2011. All Rights Reserved.