public class WGHierarchicalDatabaseEvent
extends java.lang.Object
event which is fired by modify methods of WGHierarchicalDatabase
"pre..." - events are fired directly after the method call before any processing is done "post..." - events are fired directly before the return statement of the correponding method after all processing is done
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TYPE_POST_CREATE_CONTENT |
static java.lang.String |
TYPE_POST_DELETE_CONTENT |
static java.lang.String |
TYPE_POST_MOVE_CONTENT_FROM |
static java.lang.String |
TYPE_POST_MOVE_CONTENT_TO |
static java.lang.String |
TYPE_POST_UPDATE_CONTENT |
static java.lang.String |
TYPE_PRE_CREATE_CONTENT |
static java.lang.String |
TYPE_PRE_DELETE_CONTENT |
static java.lang.String |
TYPE_PRE_MOVE_CONTENT_FROM |
static java.lang.String |
TYPE_PRE_MOVE_CONTENT_TO |
static java.lang.String |
TYPE_PRE_UPDATE_CONTENT |
Constructor and Description |
---|
WGHierarchicalDatabaseEvent(java.lang.String type,
WGHierarchicalDatabase db) |
Modifier and Type | Method and Description |
---|---|
void |
cancel(java.lang.String message)
cancels the current process with the given message
the corresponding hdb() method which fired the event will
throw an WGHierarchicalDatabaseEventException with the given message
|
void |
cancel(java.lang.String message,
java.lang.Throwable throwable)
cancels the current process with the given message
the corresponding hdb() method which fired the event will
throw an WGHierarchicalDatabaseEventException with the given message and throwable
|
WGContent |
getContent()
returns the created, updated or deleted content
will be 'null' on the following events
- preCreateContent
- postDeleteContent
|
WGHierarchicalDatabase |
getDb()
returns the hdb
|
WGContent |
getListenerContent()
returns the storage or content the listener was registered on
|
java.lang.Object |
getParameter()
returns the custom defined parameter object given in the hdb method call
|
WGContent |
getParentContent()
returns the parent content or storage of the created, updated or deleted content
|
WGContent |
getTargetParentContent()
Returns the target content in move operations
|
java.lang.String |
getType()
returns the event type
|
boolean |
isDirectChild()
returns true if the created, updated or deleted content is a direct child of the
storage or content the listener was registered on
|
public static final java.lang.String TYPE_PRE_CREATE_CONTENT
public static final java.lang.String TYPE_POST_CREATE_CONTENT
public static final java.lang.String TYPE_PRE_UPDATE_CONTENT
public static final java.lang.String TYPE_POST_UPDATE_CONTENT
public static final java.lang.String TYPE_PRE_DELETE_CONTENT
public static final java.lang.String TYPE_POST_DELETE_CONTENT
public static final java.lang.String TYPE_PRE_MOVE_CONTENT_TO
public static final java.lang.String TYPE_POST_MOVE_CONTENT_TO
public static final java.lang.String TYPE_PRE_MOVE_CONTENT_FROM
public static final java.lang.String TYPE_POST_MOVE_CONTENT_FROM
public WGHierarchicalDatabaseEvent(java.lang.String type, WGHierarchicalDatabase db)
public WGContent getListenerContent()
public boolean isDirectChild()
public WGContent getContent()
public java.lang.Object getParameter()
public WGContent getParentContent()
public WGHierarchicalDatabase getDb()
public java.lang.String getType()
public void cancel(java.lang.String message) throws WGHierarchicalDatabaseEventException
message
- WGHierarchicalDatabaseEventException
public void cancel(java.lang.String message, java.lang.Throwable throwable) throws WGHierarchicalDatabaseEventException
message
- throwable
- WGHierarchicalDatabaseEventException
public WGContent getTargetParentContent()