Class TaskWriter
- java.lang.Object
-
- org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter<EntityType>
-
- org.nuxeo.ecm.core.io.marshallers.json.ExtensibleEntityJsonWriter<Task>
-
- org.nuxeo.ecm.platform.routing.core.io.TaskWriter
-
- All Implemented Interfaces:
Marshaller<Task>
,Writer<Task>
@Setup(mode=SINGLETON, priority=2000) public class TaskWriter extends ExtensibleEntityJsonWriter<Task>
- Since:
- 7.2
-
-
Field Summary
Fields Modifier and Type Field 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
-
Fields inherited from class org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter
ctx, registry
-
-
Constructor Summary
Constructors Constructor Description TaskWriter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected static ActionContext
createActionContext(CoreSession session)
Deprecated.since 11.1 usecreateActionContext(CoreSession, GraphNode)
insteadprotected static ActionContext
createActionContext(CoreSession session, GraphNode node)
protected Object
fetchActor(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)
-
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_ACTORS
public static final String FETCH_ACTORS
- See Also:
- Constant Field Values
-
TARGET_DOCUMENT_IDS
public static final String TARGET_DOCUMENT_IDS
- See Also:
- Constant Field Values
-
FETCH_TARGET_DOCUMENT
public static final String FETCH_TARGET_DOCUMENT
- See Also:
- Constant Field Values
-
FETCH_WORKFLOW_INITATIOR
public static final String FETCH_WORKFLOW_INITATIOR
- See Also:
- Constant Field Values
-
USER_PREFIX
protected static final String USER_PREFIX
- See Also:
- Constant Field Values
-
GROUP_PREFIX
protected static final String GROUP_PREFIX
- See Also:
- Constant Field Values
-
SEPARATOR
protected static final String SEPARATOR
- See Also:
- Constant Field Values
-
schemaManager
@Inject protected SchemaManager schemaManager
-
userManager
@Inject protected UserManager userManager
-
ENTITY_TYPE
public static final String ENTITY_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TaskWriter
public TaskWriter()
-
-
Method Detail
-
writeEntityBody
public void writeEntityBody(Task item, 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<Task>
- Parameters:
item
- The Java entity.jg
- AJsonGenerator
ready to write your entity as Json.- Throws:
IOException
-
writeActors
protected void writeActors(List<String> actors, boolean isFetchActors, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException
- Throws:
IOException
-
fetchActor
protected Object fetchActor(String actorId)
-
writeWorkflowInitiator
protected void writeWorkflowInitiator(com.fasterxml.jackson.core.JsonGenerator jg, String workflowInitiator) throws IOException
- Throws:
IOException
-
createActionContext
@Deprecated protected static ActionContext createActionContext(CoreSession session)
Deprecated.since 11.1 usecreateActionContext(CoreSession, GraphNode)
instead
-
createActionContext
protected static ActionContext createActionContext(CoreSession session, GraphNode node)
-
writeTaskVariables
public static void writeTaskVariables(GraphNode node, com.fasterxml.jackson.core.JsonGenerator jg, MarshallerRegistry registry, RenderingContext ctx, SchemaManager schemaManager) throws IOException
- Throws:
IOException
- Since:
- 8.3
-
writeWorkflowVariables
public static void writeWorkflowVariables(DocumentRoute route, GraphNode node, com.fasterxml.jackson.core.JsonGenerator jg, MarshallerRegistry registry, RenderingContext ctx, SchemaManager schemaManager) throws IOException
- Throws:
IOException
- Since:
- 8.3
-
-