Package org.opennms.netmgt.mock
Class MockCategoryFactory
- java.lang.Object
-
- org.opennms.netmgt.mock.MockCategoryFactory
-
- All Implemented Interfaces:
CatFactory
public class MockCategoryFactory extends Object implements CatFactory
-
-
Constructor Summary
Constructors Constructor Description MockCategoryFactory()
MockCategoryFactory(String config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Category
getCategory(String name)
getCategoryCatinfo
getConfig()
Return the categories configuration.String
getEffectiveRule(String catlabel)
getEffectiveRuledouble
getNormal(String catlabel)
getNormalLock
getReadLock()
double
getWarning(String catlabel)
getWarningLock
getWriteLock()
-
-
-
Constructor Detail
-
MockCategoryFactory
public MockCategoryFactory() throws IOException
- Throws:
IOException
-
MockCategoryFactory
public MockCategoryFactory(String config) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getReadLock
public Lock getReadLock()
- Specified by:
getReadLock
in interfaceCatFactory
-
getWriteLock
public Lock getWriteLock()
- Specified by:
getWriteLock
in interfaceCatFactory
-
getConfig
public Catinfo getConfig()
Return the categories configuration.- Specified by:
getConfig
in interfaceCatFactory
- Returns:
- the categories configuration
-
getCategory
public Category getCategory(String name)
Description copied from interface:CatFactory
getCategory
- Specified by:
getCategory
in interfaceCatFactory
- Parameters:
name
- aString
object.- Returns:
- a
Category
object.
-
getEffectiveRule
public String getEffectiveRule(String catlabel)
Description copied from interface:CatFactory
getEffectiveRule
- Specified by:
getEffectiveRule
in interfaceCatFactory
- Parameters:
catlabel
- aString
object.- Returns:
- a
String
object.
-
getNormal
public double getNormal(String catlabel)
Description copied from interface:CatFactory
getNormal
- Specified by:
getNormal
in interfaceCatFactory
- Parameters:
catlabel
- aString
object.- Returns:
- a double.
-
getWarning
public double getWarning(String catlabel)
Description copied from interface:CatFactory
getWarning
- Specified by:
getWarning
in interfaceCatFactory
- Parameters:
catlabel
- aString
object.- Returns:
- a double.
-
-