Rework body formatting wiring
[netconf.git] / restconf / restconf-nb / src / main / java / org / opendaylight / restconf / nb / jaxrs / JsonJaxRsFormattableBodyWriter.java
similarity index 70%
rename from restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/jaxrs/JsonFormattableBody.java
rename to restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/jaxrs/JsonJaxRsFormattableBodyWriter.java
index 91884746a8a81e565eadd7795b67760eeaf6ca82..f012e0d0134a29a0480429469e11ba58fbe4b49d 100644 (file)
@@ -12,14 +12,15 @@ import java.io.OutputStream;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.ext.Provider;
+import org.opendaylight.restconf.api.FormatParameters;
 import org.opendaylight.restconf.api.FormattableBody;
 import org.opendaylight.restconf.api.MediaTypes;
 
 @Provider
 @Produces({ MediaTypes.APPLICATION_YANG_DATA_JSON, MediaType.APPLICATION_JSON })
-public final class JsonFormattableBody extends FormattableBodyWriter {
+public final class JsonJaxRsFormattableBodyWriter extends JaxRsFormattableBodyWriter {
     @Override
-    void writeTo(final FormattableBody body, final OutputStream out) throws IOException {
-        body.formatToJSON(out);
+    void writeTo(final FormattableBody body, final FormatParameters format, final OutputStream out) throws IOException {
+        body.formatToJSON(format, out);
     }
 }