}
@Override
protected void write(XMLStreamWriter w) throws XMLStreamException {
final String taskId = cmd.getTaskId();
final Status status = cmd.getStatus();
final String description = cmd.getDescription();
final Optional<UUID> transactionId = cmd.getTransactionId();
checkNotNull(taskId);
checkNotNull(status);
w.writeStartElement("task");
element(w, "id", taskId);
element(w, "status", status.toString());
if (transactionId.isPresent()) {
element(w, "transactionId", transactionId.get().toString());
}
element(w, "description", description);
String link = "tasks/" + taskId;// relative to baseURL (e.g. /geoserver/geogig)