Package org.apache.sis.storage.event

## Class StoreEvent

- Object
- - EventObject
  - - StoreEvent

- All Implemented Interfaces:
    `Serializable`, `Localized`
  Direct Known Subclasses:
    `WarningEvent`

      public abstract class StoreEvent
      extends EventObject
      implements Localized

  Parent class of events happening in a data store resource. The event may be a warning or a change in the metadata, content or structure of a resource. Those events are created by `Resource` implementations and sent to all registered listeners.
  Since:
    1.0
  See Also:
    `StoreListener`, Serialized Form

  Defined in the `sis-storage` module

- - ### Field Summary

    - ### Fields inherited from class EventObject

      `source`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `StoreEvent​(Resource source)` | Constructs an event that occurred in the given resource.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Locale` | `getLocale()` | Returns the locale associated to this event, or `null` if unspecified.
    `Resource` | `getSource()` | Returns the resource where the event occurred.

    - ### Methods inherited from class EventObject

      `toString`

    - ### Methods inherited from class Object

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

- - ### Constructor Detail

    - #### StoreEvent

          protected StoreEvent​(Resource source)

      Constructs an event that occurred in the given resource.
      Parameters:
        `source` - the resource where the event occurred.
      Throws:
        `IllegalArgumentException` - if the given source is null.

  - ### Method Detail

    - #### getSource

          public Resource getSource()

      Returns the resource where the event occurred. It is not necessarily the resource in which listeners have been registered; it may be one of the resource children.
      Overrides:
        `getSource` in class `EventObject`
      Returns:
        the resource where the event occurred.

    - #### getLocale

          public Locale getLocale()

      Returns the locale associated to this event, or `null` if unspecified. That locale may be used for formatting messages related to this event. The event locale is typically inherited from the `DataStore` locale.
      Specified by:
        `getLocale` in interface `Localized`
      Returns:
        the locale associated to this event (typically specified by the data store), or `null` if unknown.
      See Also:
        `DataStore​.getLocale()`