Class EventUtil
java.lang.Object
org.apache.jackrabbit.commons.webdav.EventUtil
EventConstants...-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]String array listing the xml local names of all type of jcr events.static final StringElement representing the 'nodeadded' event type.static final StringElement representing the 'nodemoved' event type.static final StringElement representing the 'noderemoved' event type.static final StringElement representing the 'persist' event type.static final StringElement representing the 'propertyadded' event type.static final StringElement representing the 'propertychanged' event type.static final StringElement representing the 'propertyremoved' event type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetEventName(int jcrEventType) Static utility method to retrieve a String representation of the type defined by aJCR event.static intgetJcrEventType(String eventName) Static utility method to convert the localName of aEventTypeas present in the Xml body into the corresponding JCR event constant defined byEvent.static booleanisValidEventName(String eventName) Tests if the specified eventName can be mapped to a JCR event type.
-
Field Details
-
EVENT_NODEADDED
Element representing the 'nodeadded' event type.- See Also:
-
EVENT_NODEREMOVED
Element representing the 'noderemoved' event type.- See Also:
-
EVENT_PROPERTYADDED
Element representing the 'propertyadded' event type.- See Also:
-
EVENT_PROPERTYREMOVED
Element representing the 'propertyremoved' event type.- See Also:
-
EVENT_PROPERTYCHANGED
Element representing the 'propertychanged' event type.- See Also:
-
EVENT_NODEMOVED
Element representing the 'nodemoved' event type.- See Also:
-
EVENT_PERSIST
Element representing the 'persist' event type.- See Also:
-
EVENT_ALL
String array listing the xml local names of all type of jcr events.
-
-
Constructor Details
-
EventUtil
public EventUtil()
-
-
Method Details
-
isValidEventName
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
Static utility method to convert the localName of aEventTypeas present in the Xml body into the corresponding JCR event constant defined byEvent.- Parameters:
eventName-- Returns:
- Any of the event types defined by
Eventornull. - Throws:
IllegalArgumentException- if the specified evenName is invalid.
-
getEventName
Static utility method to retrieve a String representation of the type defined by aJCR 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 byEvent.
Valid values are
-