Class EventFirewall

java.lang.Object
overit.geocall.ui.EventFirewall
All Implemented Interfaces:
Serializable

public class EventFirewall extends Object implements Serializable
This class implements 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 Details

  • Constructor Details

    • EventFirewall

      public EventFirewall()
  • Method Details

    • addValidation

      public void addValidation(String event)
      Adds an event to the validators set.
      Parameters:
      event - The event to add
    • addValidation

      public void addValidation(String event, boolean validateValues)
      Adds an event to the validators set.
      Parameters:
      event - The event to add.
      validateValues - true if the event need a values validators, false otherwise.
    • addValidation

      public void addValidation(String event, EventValidator ev)
      Adds an event to the validators set.
      Parameters:
      event - The event to add.
      ev - Validator for event without cosntraints for specific params
    • addValidation

      public void addValidation(String event, String paramName, Object paramValue)
      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 - true if the event need a values validators, false otherwise.
    • validate

      public boolean validate(UIMessage uim)
      Validates the event defined by id given by UIMessage in input.
      Parameters:
      uim - The UIMessage that contains the id for the event to validate.
      Returns:
      true if the event is validated, false otherwise.
    • clear

      public void clear()
      Clear all the event validators.
    • toString

      public String toString()
      Overrides:
      toString in class Object