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 StringENTITY_TYPEstatic StringFETCH_ACTORSstatic StringFETCH_TARGET_DOCUMENTstatic StringFETCH_WORKFLOW_INITATIORprotected static StringGROUP_PREFIXprotected SchemaManagerschemaManagerprotected static StringSEPARATORstatic StringTARGET_DOCUMENT_IDSprotected static StringUSER_PREFIXprotected UserManageruserManager-
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 ActionContextcreateActionContext(CoreSession session)Deprecated.since 11.1 usecreateActionContext(CoreSession, GraphNode)insteadprotected static ActionContextcreateActionContext(CoreSession session, GraphNode node)protected ObjectfetchActor(String actorId)protected voidwriteActors(List<String> actors, boolean isFetchActors, com.fasterxml.jackson.core.JsonGenerator jg)voidwriteEntityBody(Task item, com.fasterxml.jackson.core.JsonGenerator jg)Implement this method to write the entity body.static voidwriteTaskVariables(GraphNode node, com.fasterxml.jackson.core.JsonGenerator jg, MarshallerRegistry registry, RenderingContext ctx, SchemaManager schemaManager)protected voidwriteWorkflowInitiator(com.fasterxml.jackson.core.JsonGenerator jg, String workflowInitiator)static voidwriteWorkflowVariables(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:ExtensibleEntityJsonWriterImplement this method to write the entity body.- Specified by:
writeEntityBodyin classExtensibleEntityJsonWriter<Task>- Parameters:
item- The Java entity.jg- AJsonGeneratorready 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
-
-