Class CommentJsonWriter
java.lang.Object
org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter<Comment>
org.nuxeo.ecm.core.io.marshallers.json.ExtensibleEntityJsonWriter<Comment>
org.nuxeo.ecm.platform.comment.impl.CommentJsonWriter
- All Implemented Interfaces:
Marshaller<Comment>,Writer<Comment>
@Setup(mode=SINGLETON,
priority=2000)
public class CommentJsonWriter
extends ExtensibleEntityJsonWriter<Comment>
- Since:
- 10.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommentManagerstatic final Stringstatic final StringFields inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter
ctx, registry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidwriteCommentEntity(Comment entity, com.fasterxml.jackson.core.JsonGenerator jg, RenderingContext ctx) protected voidwriteEntityBody(Comment entity, com.fasterxml.jackson.core.JsonGenerator jg) Implement this method to write the entity body.protected voidwriteRepliesSummary(CoreSession session, Comment entity, com.fasterxml.jackson.core.JsonGenerator jg) Methods inherited from class org.nuxeo.ecm.core.io.marshallers.json.ExtensibleEntityJsonWriter
extend, writeMethods inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter
accept, getGenerator, write, writeEntity, writeEntity, writeEntityField, writeSerializable, writeSerializableField, writeSerializableListField, writeSerializableMapField
-
Field Details
-
FETCH_AUTHOR
- Since:
- 2025.9
- See Also:
-
FETCH_REPLIES_SUMMARY
- See Also:
-
commentManager
-
-
Constructor Details
-
CommentJsonWriter
public CommentJsonWriter()
-
-
Method Details
-
writeEntityBody
protected void writeEntityBody(Comment entity, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException Description copied from class:ExtensibleEntityJsonWriterImplement this method to write the entity body.- Specified by:
writeEntityBodyin classExtensibleEntityJsonWriter<Comment>- Parameters:
entity- The Java entity.jg- AJsonGeneratorready to write your entity as Json.- Throws:
IOException
-
writeCommentEntity
protected static void writeCommentEntity(Comment entity, com.fasterxml.jackson.core.JsonGenerator jg, RenderingContext ctx) throws IOException - Throws:
IOException
-
writeRepliesSummary
protected void writeRepliesSummary(CoreSession session, Comment entity, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException - Throws:
IOException
-