@Setup(mode=SINGLETON, priority=2000) public class TaskWriter extends ExtensibleEntityJsonWriter<Task>
Modifier and Type | Field and Description |
---|---|
static String |
ENTITY_TYPE |
static String |
FETCH_ACTORS |
static String |
FETCH_TARGET_DOCUMENT |
static String |
FETCH_WORKFLOW_INITATIOR |
protected static String |
GROUP_PREFIX |
protected SchemaManager |
schemaManager |
protected static String |
SEPARATOR |
static String |
TARGET_DOCUMENT_IDS |
protected static String |
USER_PREFIX |
protected UserManager |
userManager |
ctx, registry
Constructor and Description |
---|
TaskWriter() |
Modifier and Type | Method and Description |
---|---|
protected static ActionContext |
createActionContext(CoreSession session) |
protected Object |
fetchActor(String actorId) |
protected String |
getUnprefixedActorId(String actorId) |
protected void |
writeActors(List<String> actors,
boolean isFetchActors,
com.fasterxml.jackson.core.JsonGenerator jg) |
void |
writeEntityBody(Task item,
com.fasterxml.jackson.core.JsonGenerator jg)
Implement this method to write the entity body.
|
static void |
writeTaskVariables(GraphNode node,
com.fasterxml.jackson.core.JsonGenerator jg,
MarshallerRegistry registry,
RenderingContext ctx,
SchemaManager schemaManager) |
protected void |
writeWorkflowInitiator(com.fasterxml.jackson.core.JsonGenerator jg,
String workflowInitiator) |
static void |
writeWorkflowVariables(DocumentRoute route,
GraphNode node,
com.fasterxml.jackson.core.JsonGenerator jg,
MarshallerRegistry registry,
RenderingContext ctx,
SchemaManager schemaManager) |
extend, write
accept, getGenerator, write, writeEntity, writeEntity, writeEntityField, writeSerializable, writeSerializableField, writeSerializableListField, writeSerializableMapField
public static final String FETCH_ACTORS
public static final String TARGET_DOCUMENT_IDS
public static final String FETCH_TARGET_DOCUMENT
public static final String FETCH_WORKFLOW_INITATIOR
protected static final String USER_PREFIX
protected static final String GROUP_PREFIX
protected static final String SEPARATOR
@Inject protected SchemaManager schemaManager
@Inject protected UserManager userManager
public static final String ENTITY_TYPE
public TaskWriter()
public void writeEntityBody(Task item, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException
ExtensibleEntityJsonWriter
writeEntityBody
in class ExtensibleEntityJsonWriter<Task>
item
- The Java entity.jg
- A JsonGenerator
ready to write your entity as Json.IOException
protected void writeActors(List<String> actors, boolean isFetchActors, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException
IOException
protected Object fetchActor(String actorId)
protected String getUnprefixedActorId(String actorId)
protected void writeWorkflowInitiator(com.fasterxml.jackson.core.JsonGenerator jg, String workflowInitiator) throws IOException
IOException
protected static ActionContext createActionContext(CoreSession session)
public static void writeTaskVariables(GraphNode node, com.fasterxml.jackson.core.JsonGenerator jg, MarshallerRegistry registry, RenderingContext ctx, SchemaManager schemaManager) throws IOException
IOException
public static void writeWorkflowVariables(DocumentRoute route, GraphNode node, com.fasterxml.jackson.core.JsonGenerator jg, MarshallerRegistry registry, RenderingContext ctx, SchemaManager schemaManager) throws IOException
IOException
Copyright © 2019 Nuxeo. All rights reserved.