Bump versions to 4.0.0-SNAPSHOT
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / netconf / sal / rest / impl / PatchJsonBodyWriter.java
index eb6db3caf8b9264d183cd2793facd0d874550d2f..63586af75b220ae8210864cae52102df902d4c86 100644 (file)
@@ -24,17 +24,14 @@ import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 import org.opendaylight.netconf.sal.rest.api.Draft02;
 import org.opendaylight.netconf.sal.rest.api.RestconfService;
-import org.opendaylight.netconf.sal.restconf.impl.PatchStatusContext;
-import org.opendaylight.netconf.sal.restconf.impl.PatchStatusEntity;
-import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
-import org.opendaylight.restconf.Rfc8040;
-import org.opendaylight.restconf.utils.RestconfConstants;
+import org.opendaylight.restconf.common.errors.RestconfError;
+import org.opendaylight.restconf.common.patch.PatchStatusContext;
+import org.opendaylight.restconf.common.patch.PatchStatusEntity;
 import org.opendaylight.yangtools.yang.data.codec.gson.JsonWriterFactory;
 
 
 @Provider
-@Produces({Draft02.MediaTypes.PATCH_STATUS + RestconfService.JSON,
-        Rfc8040.MediaTypes.PATCH_STATUS + RestconfConstants.JSON})
+@Produces({ Draft02.MediaTypes.PATCH_STATUS + RestconfService.JSON })
 public class PatchJsonBodyWriter implements MessageBodyWriter<PatchStatusContext> {
 
     @Override
@@ -102,8 +99,8 @@ public class PatchJsonBodyWriter implements MessageBodyWriter<PatchStatusContext
 
         for (final RestconfError restconfError : errors) {
             jsonWriter.beginObject();
-            jsonWriter.name("error-type").value(restconfError.getErrorType().getErrorTypeTag());
-            jsonWriter.name("error-tag").value(restconfError.getErrorTag().getTagValue());
+            jsonWriter.name("error-type").value(restconfError.getErrorType().elementBody());
+            jsonWriter.name("error-tag").value(restconfError.getErrorTag().elementBody());
 
             // optional node
             if (restconfError.getErrorPath() != null) {