Class DistributionJcrUtils
- java.lang.Object
-
- org.apache.sling.distribution.util.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
-
Constructor Summary
Constructors Constructor Description DistributionJcrUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isSafe(@NotNull Event jcrEvent)
checks a generated JCR event was not created by a JCR session having set the 'userData' toDO_NOT_DISTRIBUTE
.static void
setDoNotDistribute(@NotNull Session session)
-
-
-
Field Detail
-
DO_NOT_DISTRIBUTE
public static final java.lang.String DO_NOT_DISTRIBUTE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isSafe
public static boolean isSafe(@NotNull @NotNull Event jcrEvent) throws RepositoryException
checks a generated JCR event was not created by a JCR session having set the 'userData' toDO_NOT_DISTRIBUTE
.- Parameters:
jcrEvent
- anEvent
- Returns:
false
if the event was generated by aSession
having itsObservationManager.setUserData(String)
set toDO_NOT_DISTRIBUTE
- Throws:
RepositoryException
- if retrieving 'userData' fails
-
setDoNotDistribute
public static void setDoNotDistribute(@NotNull @NotNull Session session) throws RepositoryException
- Parameters:
session
- aSession
- Throws:
RepositoryException
- if retrieving theObservationManager
fails
-
-