Class DistributionJcrUtils
- java.lang.Object
-
- org.apache.sling.distribution.util.DistributionJcrUtils
-
public class DistributionJcrUtils extends Object
Utility class for JCR related distribution operations.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDO_NOT_DISTRIBUTE
-
Constructor Summary
Constructors Constructor Description DistributionJcrUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisSafe(@NotNull javax.jcr.observation.Event jcrEvent)checks a generated JCR event was not created by a JCR session having set the 'userData' toDO_NOT_DISTRIBUTE.static voidsetDoNotDistribute(@NotNull javax.jcr.Session session)
-
-
-
Field Detail
-
DO_NOT_DISTRIBUTE
public static final String DO_NOT_DISTRIBUTE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isSafe
public static boolean isSafe(@NotNull @NotNull javax.jcr.observation.Event jcrEvent) throws javax.jcr.RepositoryExceptionchecks a generated JCR event was not created by a JCR session having set the 'userData' toDO_NOT_DISTRIBUTE.- Parameters:
jcrEvent- anEvent- Returns:
falseif the event was generated by aSessionhaving itsObservationManager.setUserData(String)set toDO_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- Parameters:
session- aSession- Throws:
javax.jcr.RepositoryException- if retrieving theObservationManagerfails
-
-