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
-
Constructor Summary
Constructors Modifier Constructor Description private
ReportableObjectHelper()
-
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
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
-
-
Constructor Detail
-
ReportableObjectHelper
private ReportableObjectHelper()
-
-
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
-
-