Package org.onehippo.cms7.event
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 Summary
Constructors Constructor Description HippoEvent(String application)
HippoEvent(HippoEvent<?> event)
Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
action()
E
action(String action)
String
application()
E
application(String application)
String
category()
E
category(String category)
E
clone()
<T> T
get(String key)
Map<String,Object>
getValues()
boolean
isSealed()
String
message()
E
message(String message)
protected E
put(String key, Object value)
String
result()
E
result(String result)
void
sealEvent()
E
set(String key, Object value)
Boolean
system()
E
system(Boolean system)
long
timestamp()
E
timestamp(long timestamp)
String
user()
E
user(String user)
-
-
-
Constructor Detail
-
HippoEvent
public HippoEvent(String application)
-
HippoEvent
public HippoEvent(HippoEvent<?> event)
Copy constructor- Parameters:
event
- the to-be-copied event
-
-
Method Detail
-
sealEvent
public void sealEvent()
-
isSealed
public boolean isSealed()
-
application
public String application()
-
user
public String user()
-
action
public String action()
-
category
public String category()
-
timestamp
public E timestamp(long timestamp)
-
timestamp
public long timestamp()
-
result
public String result()
-
message
public String message()
-
system
public Boolean system()
-
get
public <T> T get(String key)
-
-