Package org.ametys.cms.repository
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 Summary
Fields Modifier and Type Field Description static String
REPORTS_COUNT_ATTRIBUTE_NAME
Constants for the reports count attribute
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
REPORTS_COUNT_ATTRIBUTE_NAME
public static final String REPORTS_COUNT_ATTRIBUTE_NAME
Constants for the reports count attribute- See Also:
- Constant Field Values
-
-
Method Detail
-
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 holderreportsCount
- 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
- theContent
.contentHandler
- the ContentHandler receiving SAX events.- Throws:
SAXException
- if an error occurs during the SAX events generation.
-
-