org.apache.jackrabbit.commons.webdav
Class EventUtil

java.lang.Object
  extended by org.apache.jackrabbit.commons.webdav.EventUtil

public abstract class EventUtil
extends Object

EventConstants...


Field Summary
static String[] EVENT_ALL
          String array listing the xml local names of all type of jcr events.
static String EVENT_NODEADDED
          Element representing the 'nodeadded' event type.
static String EVENT_NODEMOVED
          Element representing the 'nodemoved' event type.
static String EVENT_NODEREMOVED
          Element representing the 'noderemoved' event type.
static String EVENT_PERSIST
          Element representing the 'persist' event type.
static String EVENT_PROPERTYADDED
          Element representing the 'propertyadded' event type.
static String EVENT_PROPERTYCHANGED
          Element representing the 'propertychanged' event type.
static String EVENT_PROPERTYREMOVED
          Element representing the 'propertyremoved' event type.
 
Constructor Summary
EventUtil()
           
 
Method Summary
static String getEventName(int jcrEventType)
          Static utility method to retrieve a String representation of the type defined by a JCR event.
static int getJcrEventType(String eventName)
          Static utility method to convert the localName of a EventType as present in the Xml body into the corresponding JCR event constant defined by Event.
static boolean isValidEventName(String eventName)
          Tests if the specified eventName can be mapped to a JCR event type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENT_NODEADDED

public static final String EVENT_NODEADDED
Element representing the 'nodeadded' event type.

See Also:
Event.NODE_ADDED, Constant Field Values

EVENT_NODEREMOVED

public static final String EVENT_NODEREMOVED
Element representing the 'noderemoved' event type.

See Also:
Event.NODE_REMOVED, Constant Field Values

EVENT_PROPERTYADDED

public static final String EVENT_PROPERTYADDED
Element representing the 'propertyadded' event type.

See Also:
Event.PROPERTY_ADDED, Constant Field Values

EVENT_PROPERTYREMOVED

public static final String EVENT_PROPERTYREMOVED
Element representing the 'propertyremoved' event type.

See Also:
Event.PROPERTY_REMOVED, Constant Field Values

EVENT_PROPERTYCHANGED

public static final String EVENT_PROPERTYCHANGED
Element representing the 'propertychanged' event type.

See Also:
Event.PROPERTY_CHANGED, Constant Field Values

EVENT_NODEMOVED

public static final String EVENT_NODEMOVED
Element representing the 'nodemoved' event type.

See Also:
Event.NODE_MOVED, Constant Field Values

EVENT_PERSIST

public static final String EVENT_PERSIST
Element representing the 'persist' event type.

See Also:
Event.PERSIST, Constant Field Values

EVENT_ALL

public static final String[] EVENT_ALL
String array listing the xml local names of all type of jcr events.

Constructor Detail

EventUtil

public EventUtil()
Method Detail

isValidEventName

public static boolean isValidEventName(String eventName)
Tests if the specified eventName can be mapped to a JCR event type.

Parameters:
eventName -
Returns:
true if the specified eventName can be mapped to a JCR event type.

getJcrEventType

public static int getJcrEventType(String eventName)
Static utility method to convert the localName of a EventType as present in the Xml body into the corresponding JCR event constant defined by Event.

Parameters:
eventName -
Returns:
Any of the event types defined by Event or null.
Throws:
IllegalArgumentException - if the specified evenName is invalid.

getEventName

public static String getEventName(int jcrEventType)
Static utility method to retrieve a String representation of the type defined by a JCR event.

Parameters:
jcrEventType -
Returns:
Event name of the given JCR event type.
Throws:
IllegalArgumentException - if the given int does not represent a valid type constants as defined by Event.
Valid values are


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.