@Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(); task.toXContent(builder, params); if (childTasks.isEmpty() == false) { builder.startArray("children"); for (TaskGroup taskGroup : childTasks) { taskGroup.toXContent(builder, params); } builder.endArray(); } return builder.endObject(); } }
public XContentBuilder innerToXContent(XContentBuilder builder, Params params) throws IOException { builder.field("completed", completed); builder.startObject("task"); task.toXContent(builder, params); builder.endObject(); if (error != null) { XContentHelper.writeRawField("error", error, builder, params); } if (response != null) { XContentHelper.writeRawField("response", response, builder, params); } return builder; }
/** * Presents a flat list of tasks */ public XContentBuilder toXContentGroupedByNone(XContentBuilder builder, Params params) throws IOException { toXContentCommon(builder, params); builder.startArray(TASKS); for (TaskInfo taskInfo : getTasks()) { builder.startObject(); taskInfo.toXContent(builder, params); builder.endObject(); } builder.endArray(); return builder; }
for(TaskInfo task : entry.getValue()) { builder.startObject(task.getTaskId().toString()); task.toXContent(builder, params); builder.endObject();
@Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(); task.toXContent(builder, params); if (childTasks.isEmpty() == false) { builder.startArray("children"); for (TaskGroup taskGroup : childTasks) { taskGroup.toXContent(builder, params); } builder.endArray(); } return builder.endObject(); } }
@Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(); task.toXContent(builder, params); if (childTasks.isEmpty() == false) { builder.startArray("children"); for (TaskGroup taskGroup : childTasks) { taskGroup.toXContent(builder, params); } builder.endArray(); } return builder.endObject(); } }
public XContentBuilder innerToXContent(XContentBuilder builder, Params params) throws IOException { builder.field("completed", completed); builder.startObject("task"); task.toXContent(builder, params); builder.endObject(); if (error != null) { XContentHelper.writeRawField("error", error, builder, params); } if (response != null) { XContentHelper.writeRawField("response", response, builder, params); } return builder; }
@Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(); task.toXContent(builder, params); if (childTasks.isEmpty() == false) { builder.startArray("children"); for (TaskGroup taskGroup : childTasks) { taskGroup.toXContent(builder, params); } builder.endArray(); } return builder.endObject(); } }
public XContentBuilder innerToXContent(XContentBuilder builder, Params params) throws IOException { builder.field("completed", completed); builder.startObject("task"); task.toXContent(builder, params); builder.endObject(); if (error != null) { XContentHelper.writeRawField("error", error, builder, params); } if (response != null) { XContentHelper.writeRawField("response", response, builder, params); } return builder; }
public XContentBuilder innerToXContent(XContentBuilder builder, Params params) throws IOException { builder.field("completed", completed); builder.startObject("task"); task.toXContent(builder, params); builder.endObject(); if (error != null) { XContentHelper.writeRawField("error", error, builder, params); } if (response != null) { XContentHelper.writeRawField("response", response, builder, params); } return builder; }
/** * Presents a flat list of tasks */ public XContentBuilder toXContentGroupedByNone(XContentBuilder builder, Params params) throws IOException { toXContentCommon(builder, params); builder.startArray(TASKS); for (TaskInfo taskInfo : getTasks()) { builder.startObject(); taskInfo.toXContent(builder, params); builder.endObject(); } builder.endArray(); return builder; }
/** * Presents a flat list of tasks */ public XContentBuilder toXContentGroupedByNone(XContentBuilder builder, Params params) throws IOException { toXContentCommon(builder, params); builder.startArray(TASKS); for (TaskInfo taskInfo : getTasks()) { builder.startObject(); taskInfo.toXContent(builder, params); builder.endObject(); } builder.endArray(); return builder; }
for(TaskInfo task : entry.getValue()) { builder.startObject(task.getTaskId().toString()); task.toXContent(builder, params); builder.endObject();
for(TaskInfo task : entry.getValue()) { builder.startObject(task.getTaskId().toString()); task.toXContent(builder, params); builder.endObject();
for(TaskInfo task : entry.getValue()) { builder.startObject(task.getTaskId().toString()); task.toXContent(builder, params); builder.endObject();