|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.core.event.impl.AbstractEventContext
public abstract class AbstractEventContext
Base class to be used to create new context events.
This class handles context properties and event creation.
Method Summary | |
---|---|
Object[] |
getArguments()
Gets event data. |
Map<String,Serializable> |
getProperties()
Gets the events properties. |
Serializable |
getProperty(String key)
Gets the named property from this context or null if not exists. |
String |
getRepositoryName()
Returns the repository name associated to the event context, if any. |
boolean |
hasProperty(String key)
Tests whether or not the given property exists. |
Event |
newEvent(String name)
Creates a new event in that context given the event name. |
Event |
newEvent(String name,
int flags)
Creates a new event in that context given the event name. |
void |
setProperties(Map<String,Serializable> properties)
Replaces all properties with the given ones. |
void |
setProperty(String key,
Serializable value)
Sets a event context property |
void |
setRepositoryName(String repositoryName)
Sets the repository name. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.nuxeo.ecm.core.event.EventContext |
---|
getCoreSession, getPrincipal, setCoreSession, setPrincipal |
Method Detail |
---|
public Object[] getArguments()
EventContext
For this reason an array of objects is returned. This array is usually representing the arguments of the operation that raised the event.
getArguments
in interface EventContext
public Map<String,Serializable> getProperties()
EventContext
Event properties are used to attach random information to an event context and can be set by the event source or by any listener that is processing the event. These properties usually serves to share data between the source and the listeners.
getProperties
in interface EventContext
public void setProperties(Map<String,Serializable> properties)
EventContext
setProperties
in interface EventContext
properties
- the properties to usepublic Serializable getProperty(String key)
EventContext
getProperty
in interface EventContext
key
- the property key
public boolean hasProperty(String key)
EventContext
hasProperty
in interface EventContext
key
- the property to test
public void setProperty(String key, Serializable value)
EventContext
setProperty
in interface EventContext
key
- the property keyvalue
- the property valuepublic Event newEvent(String name)
EventContext
newEvent
in interface EventContext
name
- the event name
EventContext.newEvent(String, int)
public Event newEvent(String name, int flags)
EventContext
newEvent
in interface EventContext
name
- the event nameflags
- the event flags to use
public String getRepositoryName()
EventContext
getRepositoryName
in interface EventContext
public void setRepositoryName(String repositoryName)
EventContext
setRepositoryName
in interface EventContext
repositoryName
- the repository name, or null
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |