Class CommentJsonWriter
- java.lang.Object
-
- org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter<EntityType>
-
- 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
Fields Modifier and Type Field Description protected CommentManager
commentManager
static String
FETCH_REPLIES_SUMMARY
-
Fields inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter
ctx, registry
-
-
Constructor Summary
Constructors Constructor Description CommentJsonWriter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void
writeCommentEntity(Comment entity, com.fasterxml.jackson.core.JsonGenerator jg)
protected void
writeEntityBody(Comment entity, com.fasterxml.jackson.core.JsonGenerator jg)
Implement this method to write the entity body.protected void
writeRepliesSummary(CoreSession session, Comment entity, com.fasterxml.jackson.core.JsonGenerator jg)
-
Methods inherited from class org.nuxeo.ecm.core.io.marshallers.json.ExtensibleEntityJsonWriter
extend, write
-
Methods inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter
accept, getGenerator, write, writeEntity, writeEntity, writeEntityField, writeSerializable, writeSerializableField, writeSerializableListField, writeSerializableMapField
-
-
-
-
Field Detail
-
FETCH_REPLIES_SUMMARY
public static final String FETCH_REPLIES_SUMMARY
- See Also:
- Constant Field Values
-
commentManager
@Inject protected CommentManager commentManager
-
-
Method Detail
-
writeEntityBody
protected void writeEntityBody(Comment entity, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException
Description copied from class:ExtensibleEntityJsonWriter
Implement this method to write the entity body.- Specified by:
writeEntityBody
in classExtensibleEntityJsonWriter<Comment>
- Parameters:
entity
- The Java entity.jg
- AJsonGenerator
ready to write your entity as Json.- Throws:
IOException
-
writeCommentEntity
protected static void writeCommentEntity(Comment entity, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException
- Throws:
IOException
-
writeRepliesSummary
protected void writeRepliesSummary(CoreSession session, Comment entity, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException
- Throws:
IOException
-
-