Package com.day.cq.reporting
Interface CellValue
- All Superinterfaces:
Comparable<CellValue>
Interface that defines a cell value.
-
Method Summary
Modifier and TypeMethodDescriptiongetJCRValue(Session session) Gets a JCR compatibleValueobject for the represented cell value.Returns a "guaranteed" string representation of the value.voidtoJSON(JSONWriter writer, Locale locale) Adds the value to the specifiedJSONWriter.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getJCRValue
Gets a JCR compatibleValueobject for the represented cell value.- Parameters:
session- The repository session to create the value for- Returns:
- The JCR
Valueobject - Throws:
RepositoryException- if no suitableValueobject could be created
-
toJSON
Adds the value to the specified
JSONWriter.The caller must ensure that the cell value can be directly written using the corresponding
JSONWriter.value(boolean)method. If the value is actually represented as a JS object,JSONWriter.object()resp.JSONWriter.array()must be able to be called.The specified
Localemight be used for use formatting the value in a locale-specific way, for example for formatting dates and times.- Parameters:
writer- The JSON writerlocale- The request'sLocale- Throws:
JSONException- if writing the JSON representation failed
-
getString
String getString()Returns a "guaranteed" string representation of the value. This is used for creating lists, etc.- Returns:
- The "guaranteed" string representation of the value
-