Class DocumentsJSONHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.util.WorkspaceObjectJSONHelper
org.ametys.plugins.workspaces.documents.DocumentsJSONHelper
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
Helper to convert documents to JSON
-
Field Summary
FieldsFields inherited from class org.ametys.plugins.workspaces.util.WorkspaceObjectJSONHelper
_currentUserProvider, _populationContextHelper, _projectMemberManager, _richTextTransformer, _sourceResolver, _tagProviderExtensionPoint, _userHelper, _userManager, ATTRIBUTE_FOR_RICHTEXT_ERROR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends AbstractComment>
List<Map<String, Object>> commentsToJson
(List<T> comments, String lang, String siteName) return a list of comments in JSON formatMethods inherited from class org.ametys.plugins.workspaces.util.WorkspaceObjectJSONHelper
_authorToJSON, _binaryToJson, _commentsToJson, _commentsToJson, _commentToJson, _getTags, richTextToRendering, richTextToSimpleText, service
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role
-
-
Constructor Details
-
DocumentsJSONHelper
public DocumentsJSONHelper()
-
-
Method Details
-
commentsToJson
public <T extends AbstractComment> List<Map<String,Object>> commentsToJson(List<T> comments, String lang, String siteName) return a list of comments in JSON format- Type Parameters:
T
- type of the value to retrieve- Parameters:
comments
- the comments to translate as JSONlang
- the current languagesiteName
- The current site name- Returns:
- list of comments
-