/** * Return the value considered to be the minimum "normal" value. * * @return a double. */ @XmlAttribute(name="normal-threshold") public double getNormalThreshold() { return m_categoryDef == null? null : m_categoryDef.getNormalThreshold(); }
/** * Return the value considered to be the minimum "normal" value. * * @return a double. */ @XmlAttribute(name="normal-threshold") public double getNormalThreshold() { return m_categoryDef == null? null : m_categoryDef.getNormalThreshold(); }
/** * {@inheritDoc} * * Return the normal value for the specified category. */ @Override public double getNormal(final String catlabel) { final Category cat = getCategory(catlabel); return (cat == null? -1.0 : cat.getNormalThreshold()); }
topOffenders, cat.getWarningThreshold(), cat.getNormalThreshold(), cat.getComment().orElse(null), cat.getLabel(),
topOffenders, cat.getWarningThreshold(), cat.getNormalThreshold(), cat.getComment().orElse(null), cat.getLabel(),
/** * The default constructor - initializes the values * * @param cat a {@link org.opennms.netmgt.config.categories.Category} object. * @param commonRule a {@link java.lang.String} object. */ public RTCCategory(Category cat, String commonRule) { setLabel(cat.getLabel()); setComment(cat.getComment().orElse(null)); setRule(cat.getRule()); setNormalThreshold(cat.getNormalThreshold()); setWarningThreshold(cat.getWarningThreshold()); setServices(cat.getServices()); m_effectiveRule = "(" + commonRule + ") & (" + cat.getRule() + ")"; }
public void testGetCategory() { Category category = m_catFactory.getCategory(CATLABEL); assertEquals(99,category.getNormalThreshold(),0); assertEquals(97,category.getWarningThreshold(),0); assertTrue(category.getComment().isPresent()); assertEquals(CATCOMMENT,category.getComment().get()); assertEquals(CATRULE,category.getRule()); assertEquals("ICMP",category.getServices().get(0)); assertEquals("SNMP",category.getServices().get(1)); }