org.apache.fop.events

## Class Event

- java.lang.Object
- - java.util.EventObject
  - - org.apache.fop.events.Event

- All Implemented Interfaces:
    java.io.Serializable

      public class Event
      extends java.util.EventObject

  This is the default event class used by this package. Each event has a unique event identifier (a String), a severity indicator, a locale (for formatting event messages), and a map of name/value pairs.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Event.ParamsBuilder` This class is a fluent builder class for building up the parameter map.

  - ### Field Summary

    - ### Fields inherited from class java.util.EventObject

      `source`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Event(java.lang.Object source, java.lang.String eventID, EventSeverity severity, java.util.Locale locale, java.util.Map<java.lang.String,java.lang.Object> params)` Creates a new Event.
    `Event(java.lang.Object source, java.lang.String eventID, EventSeverity severity, java.util.Map<java.lang.String,java.lang.Object> params)` Creates a new Event using default locale.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getEventGroupID()` Returns the event group identifier.
    `java.lang.String` | `getEventID()` Returns the event identifier.
    `java.lang.String` | `getEventKey()` Returns the event key.
    `java.util.Locale` | `getLocale()` Returns the locale.
    `java.lang.Object` | `getParam(java.lang.String key)` Returns a parameter.
    `java.util.Map<java.lang.String,java.lang.Object>` | `getParams()` Returns an unmodifiable `Map` with all event parameters.
    `EventSeverity` | `getSeverity()` Returns the severity level.
    `static Event.ParamsBuilder` | `paramsBuilder()` Creates and returns a fluent builder object for building up the parameter map.
    `void` | `setSeverity(EventSeverity severity)` Sets the event's severity level.

    - ### Methods inherited from class java.util.EventObject

      `getSource, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Event

          public Event(java.lang.Object source,
                       java.lang.String eventID,
                       EventSeverity severity,
                       java.util.Map<java.lang.String,java.lang.Object> params)

      Creates a new Event using default locale.
      Parameters:
        `source` - the object that creates the event
        `eventID` - the unique identifier of the event
        `severity` - the severity level
        `params` - the event parameters (a map of name/value pairs)

    - #### Event

          public Event(java.lang.Object source,
                       java.lang.String eventID,
                       EventSeverity severity,
                       java.util.Locale locale,
                       java.util.Map<java.lang.String,java.lang.Object> params)

      Creates a new Event.
      Parameters:
        `source` - the object that creates the event
        `eventID` - the unique identifier of the event
        `severity` - the severity level
        `locale` - to use when formatting event (or null, which means use default locale)
        `params` - the event parameters (a map of name/value pairs)

  - ### Method Detail

    - #### getEventID

          public java.lang.String getEventID()

      Returns the event identifier.
      Returns:
        the event identifier

    - #### getEventGroupID

          public java.lang.String getEventGroupID()

      Returns the event group identifier.
      Returns:
        the event group identifier (or null if there is no group identifier)

    - #### getEventKey

          public java.lang.String getEventKey()

      Returns the event key.
      Returns:
        the event key

    - #### getSeverity

          public EventSeverity getSeverity()

      Returns the severity level.
      Returns:
        the severity level

    - #### setSeverity

          public void setSeverity(EventSeverity severity)

      Sets the event's severity level. This method can be used to increase or decrease the severity level in a listener.
      Parameters:
        `severity` - the new event severity

    - #### getLocale

          public java.util.Locale getLocale()

      Returns the locale.
      Returns:
        the locale

    - #### getParam

          public java.lang.Object getParam(java.lang.String key)

      Returns a parameter.
      Parameters:
        `key` - the key to the parameter
      Returns:
        the parameter value or null if no value with this key is found

    - #### getParams

          public java.util.Map<java.lang.String,java.lang.Object> getParams()

      Returns an unmodifiable `Map` with all event parameters.
      Returns:
        the parameter map

    - #### paramsBuilder

          public static Event.ParamsBuilder paramsBuilder()

      Creates and returns a fluent builder object for building up the parameter map.
      Returns:
        the parameter builder

Copyright 1999-2015 The Apache Software Foundation. All Rights Reserved.