|
||||||||||
| 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)
Deprecated. |
|
| Method Summary | |
|---|---|
static EventTranslatorConfig |
getInstance()
Return the singleton instance of this factory. |
List<String> |
getUEIList()
getUEIList |
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)
setInstance |
List<Event> |
translateEvent(Event e)
Translate the @param e to a new event |
void |
update()
Simply marshals the config without messing with the singletons. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated
public EventTranslatorConfigFactory(Reader rdr,
DataSource dbConnFactory)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
Constructor for EventTranslatorConfigFactory.
rdr - a Reader object.dbConnFactory - a DataSource object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.| Method Detail |
|---|
public void update()
throws Exception
update in interface EventTranslatorConfigException - if any.
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 - if any.
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
SQLException - if any.
PropertyVetoException - if any.
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 - if any.
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
SQLException - if any.
PropertyVetoException - if any.public static EventTranslatorConfig getInstance()
IllegalStateException - Thrown if the factory has not yet been initialized.public static void setInstance(EventTranslatorConfig singleton)
setInstance
singleton - a EventTranslatorConfig object.public List<String> getUEIList()
getUEIList
getUEIList in interface EventTranslatorConfigList object.public boolean isTranslationEvent(Event e)
isTranslationEvent in interface EventTranslatorConfige - Event
public List<Event> translateEvent(Event e)
translateEvent in interface EventTranslatorConfige - Event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||