Class ElementStatsEventPublisher

java.lang.Object
com.atlassian.confluence.impl.content.render.xhtml.analytics.ElementStatsEventPublisher

public class ElementStatsEventPublisher extends Object
Responsible for publishing element stats events during content rendering.

Element Stats: This class publishes a single ElementStatsEvent containing counts of all element types found during rendering. The counts are gathered by CountingXmlEventReader and stored in a simple map on the ConversionContext via ElementCountingUtils.

  • Constructor Details

    • ElementStatsEventPublisher

      public ElementStatsEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
  • Method Details

    • publishIfApplicable

      public boolean publishIfApplicable(Object src, ConversionContext context)
      Publishes element stats event if all filtering criteria are met.

      Returns false if the event was not published (filtered out).

      Parameters:
      src - the source object (typically the renderer)
      context - the conversion context containing element counts
      Returns:
      true if event was published, false if filtered out