Class DistributionJcrUtils

java.lang.Object
org.apache.sling.distribution.util.DistributionJcrUtils

public class DistributionJcrUtils extends Object
Utility class for JCR related distribution operations.
  • Field Details

  • Constructor Details

    • DistributionJcrUtils

      public DistributionJcrUtils()
  • Method Details

    • 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