Class ReportableObjectHelper

java.lang.Object
org.ametys.cms.repository.ReportableObjectHelper

public final class ReportableObjectHelper extends Object
Helper class which provides methods to manage reports on a object
  • Field Details

  • Method Details

    • addReport

      public static void addReport(ModifiableModelLessDataHolder unversionedDataHolder)
      Add a report to the object
      Parameters:
      unversionedDataHolder - the unversioned data holder
    • setReportsCount

      public static void setReportsCount(ModifiableModelLessDataHolder unversionedDataHolder, long reportsCount)
      Sets the number of reports on the object
      Parameters:
      unversionedDataHolder - the unversioned data holder
      reportsCount - the number of reports to set
    • clearReports

      public static void clearReports(ModifiableModelLessDataHolder unversionedMetadataHolder)
      Remove all reports on the object
      Parameters:
      unversionedMetadataHolder - the unversioned data holder
    • getReportsCount

      public static long getReportsCount(ModelLessDataHolder unversionedDataHolder)
      Retrieves the number of reports on the object
      Parameters:
      unversionedDataHolder - the unversioned data holder
      Returns:
      the number of reports
    • saxReports

      public static void saxReports(ReportableObject reportable, ContentHandler contentHandler) throws SAXException
      Generates SAX events for the given object's reports.
      Parameters:
      reportable - the Content.
      contentHandler - the ContentHandler receiving SAX events.
      Throws:
      SAXException - if an error occurs during the SAX events generation.