|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opennms.bb.dp.events.XMLEventsParser | +--org.opennms.bb.dp.eventd.XMLEventsOverrideParser
This class is an extension of the default events parser from the events package and is used to ensure that non-modifiable fields are stripped from incomming events. This is done by overriding the validate method of the events parser and resetting any secured fields.
*
The security information is loaded at startup by the Eventd class and the events configuration parser.
Field Summary | |
private List |
m_overrides
The list of non-modifiable events. |
Constructor Summary | |
XMLEventsOverrideParser()
Constructs a new override parser that can be used to decompose an event stream. |
|
XMLEventsOverrideParser(List overrides)
Constructs a new override parser that can be used to decompose an event stream. |
Method Summary | |
protected boolean |
validate(Event e)
This overridden method is not use for validating the event so much as it is used to modify the event. |
Methods inherited from class org.opennms.bb.dp.events.XMLEventsParser |
characters, dataElement, depthOf, endDocument, endElement, endElement, endPrefixMapping, error, fatalError, getEvents, getHeader, ignorableWhitespace, main, processingInstruction, serializeToXML, serializeToXML, serializeToXML, serializeToXML, setDocumentLocator, skippedEntity, startDocument, startElement, startElement, startPrefixMapping, warning |
Methods inherited from class java.lang.Object |
|
Field Detail |
private List m_overrides
Constructor Detail |
public XMLEventsOverrideParser()
Constructs a new override parser that can be used to decompose an event stream. Each incomming event is checked to ensure that it does not have a non-modifiable field set. If a non-modifiable field is set then it is reset to null by this parser.
The list is accessed from the Eventd class.
overrides
- The list of element that will be reset to null during
parsing.IllegalArgumentException
- Thrown if the list from the Eventd
class is not been initialized.Eventd.getOverrides()
public XMLEventsOverrideParser(List overrides)
Constructs a new override parser that can be used to decompose an event stream. Each incomming event is checked to ensure that it does not have a non-modifiable field set. If a non-modifiable field is set then it is reset to null by this parser.
The list passed to this parser must be a list of String objects for use by the parser. If any element is not a String, or derived class thereof, then a ClassCastException may be thrown during parsing.
overrides
- The list of element that will be reset to null during
parsing.IllegalArgumentException
- Thrown if the override
list is null.Method Detail |
protected boolean validate(Event e)
validate
in class XMLEventsParser
event
- The event to validate/modifyClassCastException
- Thrown if the initialized
override list contained non-String objects.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |