Class EventUtil


  • public abstract class EventUtil
    extends java.lang.Object
    EventConstants...
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String[] EVENT_ALL
      String array listing the xml local names of all type of jcr events.
      static java.lang.String EVENT_NODEADDED
      Element representing the 'nodeadded' event type.
      static java.lang.String EVENT_NODEMOVED
      Element representing the 'nodemoved' event type.
      static java.lang.String EVENT_NODEREMOVED
      Element representing the 'noderemoved' event type.
      static java.lang.String EVENT_PERSIST
      Element representing the 'persist' event type.
      static java.lang.String EVENT_PROPERTYADDED
      Element representing the 'propertyadded' event type.
      static java.lang.String EVENT_PROPERTYCHANGED
      Element representing the 'propertychanged' event type.
      static java.lang.String EVENT_PROPERTYREMOVED
      Element representing the 'propertyremoved' event type.
    • Constructor Summary

      Constructors 
      Constructor Description
      EventUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getEventName​(int jcrEventType)
      Static utility method to retrieve a String representation of the type defined by a JCR event.
      static int getJcrEventType​(java.lang.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​(java.lang.String eventName)
      Tests if the specified eventName can be mapped to a JCR event type.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EventUtil

        public EventUtil()
    • Method Detail

      • isValidEventName

        public static boolean isValidEventName​(java.lang.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​(java.lang.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:
        java.lang.IllegalArgumentException - if the specified evenName is invalid.