[ https://issues.apache.org/jira/browse/SLING-4334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14283574#comment-14283574 ]
Tommaso Teofili commented on SLING-4334: ---------------------------------------- you can do that by adding the dependency to the org.apache.sling.distribution.core bundle which exports only the org.apache.distribution.util package, there you can find DistributionJcrUtils class and call DistributionJcrUtils.setDoNotDistribute(session) or DistributionJcrUtils.isSafe(event) from within your bundle. > Need to expose do.not.distribute in API > --------------------------------------- > > Key: SLING-4334 > URL: https://issues.apache.org/jira/browse/SLING-4334 > Project: Sling > Issue Type: Bug > Components: Distribution > Reporter: Laurie byrum > Priority: Critical > > I want to distribute in an event listener. However, to avoid loops, i want to > make use of the do.not.distribute userproperty that the distribution code > sets. However, this property is nowhere in the API. Bare minimum, it would be > good to expose that string. Better would be a util method that takes an event > and says whether the event was generated by distribution. -- This message was sent by Atlassian JIRA (v6.3.4#6332)