Class HippoEvent<E extends HippoEvent<E>>

java.lang.Object
org.onehippo.cms7.event.HippoEvent<E>
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
HippoSecurityEvent

public class HippoEvent<E extends HippoEvent<E>> extends Object implements Cloneable
Event for Hippo. A bag of properties with a number of pre-defined keys. Can be used in a fluent style to build; sub-classes are encouraged to follow the same pattern. The event can be sealed when no further changes need to be made. It is immutable after sealing, so it is safe to access concurrently.

When creating a subclass, it is possible to keep the fluent style by extending as public class MyEvent<E extends MyEvent> extends HippoEvent<E> { } Note that subclasses should not introduce any fields of their own.

  • Constructor Details

    • HippoEvent

      public HippoEvent(String application)
    • HippoEvent

      public HippoEvent(HippoEvent<?> event)
      Copy constructor
      Parameters:
      event - the to-be-copied event
  • Method Details

    • sealEvent

      public void sealEvent()
    • isSealed

      public boolean isSealed()
    • application

      public E application(String application)
    • application

      public String application()
    • user

      public E user(String user)
    • user

      public String user()
    • action

      public E action(String action)
    • action

      public String action()
    • category

      public E category(String category)
    • category

      public String category()
    • timestamp

      public E timestamp(long timestamp)
    • timestamp

      public long timestamp()
    • result

      public E result(String result)
    • result

      public String result()
    • message

      public E message(String message)
    • message

      public String message()
    • system

      public Boolean system()
    • system

      public E system(Boolean system)
    • set

      public E set(String key, Object value)
    • put

      protected E put(String key, Object value)
    • get

      public <T> T get(String key)
    • getValues

      public Map<String,Object> getValues()
    • clone

      public E clone()
      Overrides:
      clone in class Object