Refactor pretty printing
[netconf.git] / restconf / restconf-nb / src / main / java / org / opendaylight / restconf / nb / jaxrs / XmlFormattableBody.java
similarity index 73%
rename from restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/jaxrs/XmlReplyBodyWriter.java
rename to restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/jaxrs/XmlFormattableBody.java
index 15b8d3a97e70c094129340dfdfc020e78608c5bf..c276bfddb7312735b081890701621336ccfcf17c 100644 (file)
@@ -13,13 +13,13 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.ext.Provider;
 import org.opendaylight.restconf.api.MediaTypes;
-import org.opendaylight.restconf.server.api.ReplyBody;
+import org.opendaylight.restconf.server.api.FormattableBody;
 
 @Provider
 @Produces({ MediaTypes.APPLICATION_YANG_DATA_XML, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
-public final class XmlReplyBodyWriter extends ReplyBodyWriter {
+public final class XmlFormattableBody extends FormattableBodyWriter {
     @Override
-    void writeTo(final ReplyBody body, final OutputStream out) throws IOException {
-        body.writeXML(out);
+    void writeTo(final FormattableBody body, final OutputStream out) throws IOException {
+        body.formatToXML(out);
     }
 }