Package org.ametys.cms.repository
Class ReportableObjectHelper
java.lang.Object
org.ametys.cms.repository.ReportableObjectHelper
Helper class which provides methods to manage reports on a object
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addReport
(ModifiableModelLessDataHolder unversionedDataHolder) Add a report to the objectstatic void
clearReports
(ModifiableModelLessDataHolder unversionedMetadataHolder) Remove all reports on the objectstatic long
getReportsCount
(ModelLessDataHolder unversionedDataHolder) Retrieves the number of reports on the objectstatic void
saxReports
(ReportableObject reportable, ContentHandler contentHandler) Generates SAX events for the given object's reports.static void
setReportsCount
(ModifiableModelLessDataHolder unversionedDataHolder, long reportsCount) Sets the number of reports on the object
-
Field Details
-
REPORTS_COUNT_ATTRIBUTE_NAME
Constants for the reports count attribute- See Also:
-
-
Method Details
-
addReport
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 holderreportsCount
- the number of reports to set
-
clearReports
Remove all reports on the object- Parameters:
unversionedMetadataHolder
- the unversioned data holder
-
getReportsCount
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
- theContent
.contentHandler
- the ContentHandler receiving SAX events.- Throws:
SAXException
- if an error occurs during the SAX events generation.
-