|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.config.EventTranslatorConfigFactory
public final class EventTranslatorConfigFactory
This is the singleton class used to load the configuration from the passive-status-configuration.xml. This provides convenience methods to get the configured categories and their information, add/delete categories from category groups. Note: Users of this class should make sure the init() is called before calling any other method to ensure the config is loaded before accessing other convenience methods.
| Field Summary |
|---|
| Fields inherited from interface org.opennms.netmgt.config.EventTranslatorConfig |
|---|
TRANSLATOR_NAME |
| Constructor Summary | |
|---|---|
EventTranslatorConfigFactory(Reader rdr,
DataSource dbConnFactory)
|
|
| Method Summary | |
|---|---|
static EventTranslatorConfig |
getInstance()
Return the singleton instance of this factory. |
List<String> |
getUEIList()
Get the list of UEIs that are registered in the passive status configuration. |
static void |
init()
Load the config from the default config file and create the singleton instance of this factory. |
boolean |
isTranslationEvent(Event e)
Determine if the @param e is a translation event |
static void |
reload()
Reload the config from the default config file |
static void |
setInstance(EventTranslatorConfig singleton)
|
List<Event> |
translateEvent(Event e)
Translate the @param e to a new event |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventTranslatorConfigFactory(Reader rdr,
DataSource dbConnFactory)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException| Method Detail |
|---|
public static void init()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
ClassNotFoundException,
SQLException,
PropertyVetoException
IOException - Thrown if the specified config file cannot be read
org.exolab.castor.xml.MarshalException - Thrown if the file does not conform to the schema.
org.exolab.castor.xml.ValidationException - Thrown if the contents do not match the required schema.
ClassNotFoundException
SQLException
PropertyVetoException
public static void reload()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
ClassNotFoundException,
SQLException,
PropertyVetoException
IOException - Thrown if the specified config file cannot be read/loaded
org.exolab.castor.xml.MarshalException - Thrown if the file does not conform to the schema.
org.exolab.castor.xml.ValidationException - Thrown if the contents do not match the required schema.
ClassNotFoundException
SQLException
PropertyVetoExceptionpublic static EventTranslatorConfig getInstance()
IllegalStateException - Thrown if the factory has not yet been initialized.public static void setInstance(EventTranslatorConfig singleton)
public List<String> getUEIList()
EventTranslatorConfig
getUEIList in interface EventTranslatorConfigpublic boolean isTranslationEvent(Event e)
EventTranslatorConfig
isTranslationEvent in interface EventTranslatorConfige - Event
public List<Event> translateEvent(Event e)
EventTranslatorConfig
translateEvent in interface EventTranslatorConfige - Event
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||