Class DistributionJcrUtils


  • public class DistributionJcrUtils
    extends java.lang.Object
    Utility class for JCR related distribution operations.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DO_NOT_DISTRIBUTE  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isSafe​(@NotNull javax.jcr.observation.Event jcrEvent)
      checks a generated JCR event was not created by a JCR session having set the 'userData' to DO_NOT_DISTRIBUTE.
      static void setDoNotDistribute​(@NotNull javax.jcr.Session session)
      set DO_NOT_DISTRIBUTE on the given Session's ObservationManager.setUserData(String)
      • Methods inherited from class java.lang.Object

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

      • DO_NOT_DISTRIBUTE

        public static final java.lang.String DO_NOT_DISTRIBUTE
        See Also:
        Constant Field Values
    • Constructor Detail

      • DistributionJcrUtils

        public DistributionJcrUtils()
    • Method Detail

      • isSafe

        public static boolean isSafe​(@NotNull
                                     @NotNull javax.jcr.observation.Event jcrEvent)
                              throws javax.jcr.RepositoryException
        checks a generated JCR event was not created by a JCR session having set the 'userData' to DO_NOT_DISTRIBUTE.
        Parameters:
        jcrEvent - an Event
        Returns:
        false if the event was generated by a Session having its ObservationManager.setUserData(String) set to DO_NOT_DISTRIBUTE
        Throws:
        javax.jcr.RepositoryException - if retrieving 'userData' fails
      • setDoNotDistribute

        public static void setDoNotDistribute​(@NotNull
                                              @NotNull javax.jcr.Session session)
                                       throws javax.jcr.RepositoryException
        set DO_NOT_DISTRIBUTE on the given Session's ObservationManager.setUserData(String)
        Parameters:
        session - a Session
        Throws:
        javax.jcr.RepositoryException - if retrieving the ObservationManager fails