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
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) {