Package overit.geocall.ui
Class EventFirewall
java.lang.Object
overit.geocall.ui.EventFirewall
- All Implemented Interfaces:
Serializable
This class implements
This class allows to record which events can be managed and processed by the application.
It works like a firewall: all the names of the events that have been previously registered, are validated and passed through and therefore allow processing, all the others are filtered and discarded.
Serializable.This class allows to record which events can be managed and processed by the application.
It works like a firewall: all the names of the events that have been previously registered, are validated and passed through and therefore allow processing, all the others are filtered and discarded.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddValidation(String event) Adds an event to the validators set.voidaddValidation(String event, boolean validateValues) Adds an event to the validators set.voidaddValidation(String event, String paramName, Object paramValue) Adds an event to the validators set.voidaddValidation(String event, String paramName, Object paramValue, boolean validateValues) Adds an event to the validators set.voidaddValidation(String event, EventValidator ev) Adds an event to the validators set.voidclear()Clear all the event validators.toString()booleanValidates the event defined by id given byUIMessagein input.
-
Field Details
-
_validators
-
-
Constructor Details
-
EventFirewall
public EventFirewall()
-
-
Method Details
-
addValidation
Adds an event to the validators set.- Parameters:
event- The event to add
-
addValidation
Adds an event to the validators set.- Parameters:
event- The event to add.validateValues-trueif the event need a values validators,falseotherwise.
-
addValidation
Adds an event to the validators set.- Parameters:
event- The event to add.ev- Validator for event without cosntraints for specific params
-
addValidation
Adds an event to the validators set.- Parameters:
event- The event to add.paramName- The parm name of the event to validate.paramValue- The value associated to the param name of the event to validate.
-
addValidation
public void addValidation(String event, String paramName, Object paramValue, boolean validateValues) Adds an event to the validators set.- Parameters:
event- The event to add.paramName- The parm name of the event to validate.paramValue- The value associated to the param name of the event to validate.validateValues-trueif the event need a values validators,falseotherwise.
-
validate
Validates the event defined by id given byUIMessagein input.- Parameters:
uim- TheUIMessagethat contains the id for the event to validate.- Returns:
trueif the event is validated,falseotherwise.
-
clear
public void clear()Clear all the event validators. -
toString
-