From: Vaclav Demcak Date: Tue, 24 Feb 2015 13:33:44 +0000 (+0100) Subject: BUG 2412 - Restconf migration - marking deprecated classes X-Git-Tag: release/lithium~473^2~1 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=0b569a91ef772bb996549c77804d9103c0843c37 BUG 2412 - Restconf migration - marking deprecated classes * mark basic deprecated classes and functionality which has to be overwirte by this commit chain. New faster Infrastructure API works with NormizedNodeContext and it provides read/write REST msg body (JSON & XML) direct to NormalizedNodeContext. So we have to replace all places where we use StructuredData, CompositeNode, NodeWrapper and all relevant REST codecs (e.g. XmlToCompositeNodeProvider...) Change-Id: I33ff24e5a8de2876dfdb6ea263fc9cb659fc3db8 Signed-off-by: Vaclav Demcak --- diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/gson/JsonParser.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/gson/JsonParser.java index a784be2adc..699aed66d7 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/gson/JsonParser.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/gson/JsonParser.java @@ -22,31 +22,34 @@ import java.io.EOFException; import java.io.IOException; /** + * @deprecated class will be removed in Lithium release + * * This class parses JSON elements from a gson JsonReader. It disallows multiple elements of the same name unlike the * default gson JsonParser." */ +@Deprecated public class JsonParser { - public JsonElement parse(JsonReader reader) throws JsonIOException, JsonSyntaxException { + public JsonElement parse(final JsonReader reader) throws JsonIOException, JsonSyntaxException { // code copied from gson's JsonParser and Stream classes - boolean lenient = reader.isLenient(); + final boolean lenient = reader.isLenient(); reader.setLenient(true); boolean isEmpty = true; try { reader.peek(); isEmpty = false; return read(reader); - } catch (EOFException e) { + } catch (final EOFException e) { if (isEmpty) { return JsonNull.INSTANCE; } // The stream ended prematurely so it is likely a syntax error. throw new JsonSyntaxException(e); - } catch (MalformedJsonException e) { + } catch (final MalformedJsonException e) { throw new JsonSyntaxException(e); - } catch (IOException e) { + } catch (final IOException e) { throw new JsonIOException(e); - } catch (NumberFormatException e) { + } catch (final NumberFormatException e) { throw new JsonSyntaxException(e); } catch (StackOverflowError | OutOfMemoryError e) { throw new JsonParseException("Failed parsing JSON source: " + reader + " to Json", e); @@ -55,12 +58,12 @@ public class JsonParser { } } - public JsonElement read(JsonReader in) throws IOException { + public JsonElement read(final JsonReader in) throws IOException { switch (in.peek()) { case STRING: return new JsonPrimitive(in.nextString()); case NUMBER: - String number = in.nextString(); + final String number = in.nextString(); return new JsonPrimitive(new LazilyParsedNumber(number)); case BOOLEAN: return new JsonPrimitive(in.nextBoolean()); @@ -68,7 +71,7 @@ public class JsonParser { in.nextNull(); return JsonNull.INSTANCE; case BEGIN_ARRAY: - JsonArray array = new JsonArray(); + final JsonArray array = new JsonArray(); in.beginArray(); while (in.hasNext()) { array.add(read(in)); @@ -76,7 +79,7 @@ public class JsonParser { in.endArray(); return array; case BEGIN_OBJECT: - JsonObject object = new JsonObject(); + final JsonObject object = new JsonObject(); in.beginObject(); while (in.hasNext()) { final String childName = in.nextName(); diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonToCompositeNodeProvider.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonToCompositeNodeProvider.java index caff848180..6863b964d4 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonToCompositeNodeProvider.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonToCompositeNodeProvider.java @@ -26,6 +26,9 @@ import org.opendaylight.yangtools.yang.data.api.Node; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * @deprecated class will be removed in Lithium release + */ @Provider @Consumes({ Draft02.MediaTypes.DATA + RestconfService.JSON, Draft02.MediaTypes.OPERATION + RestconfService.JSON, MediaType.APPLICATION_JSON }) @@ -47,7 +50,7 @@ public enum JsonToCompositeNodeProvider implements MessageBodyReader> { WebApplicationException { try { return JsonToCompositeNodeReader.read(entityStream); - } catch (Exception e) { + } catch (final Exception e) { LOG.debug("Error parsing json input", e); throw new RestconfDocumentedException("Error parsing input: " + e.getMessage(), ErrorType.PROTOCOL, diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonToCompositeNodeReader.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonToCompositeNodeReader.java index 552e2bbd19..2834fa15c1 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonToCompositeNodeReader.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/JsonToCompositeNodeReader.java @@ -28,6 +28,10 @@ import org.opendaylight.controller.sal.restconf.impl.SimpleNodeWrapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * @deprecated class will be removed in Lithium release + */ +@Deprecated class JsonToCompositeNodeReader { private static final Logger LOG = LoggerFactory.getLogger(JsonToCompositeNodeReader.class); private static final Splitter COLON_SPLITTER = Splitter.on(':'); @@ -37,9 +41,9 @@ class JsonToCompositeNodeReader { } public static CompositeNodeWrapper read(final InputStream entityStream) throws UnsupportedFormatException { - JsonParser parser = new JsonParser(); + final JsonParser parser = new JsonParser(); - JsonElement rootElement = parser.parse(new JsonReader(new InputStreamReader(entityStream))); + final JsonElement rootElement = parser.parse(new JsonReader(new InputStreamReader(entityStream))); if (rootElement.isJsonNull()) { // no content, so return null to indicate no input return null; @@ -49,14 +53,14 @@ class JsonToCompositeNodeReader { throw new UnsupportedFormatException("Root element of Json has to be Object"); } - Set> entrySetsOfRootJsonObject = rootElement.getAsJsonObject().entrySet(); + final Set> entrySetsOfRootJsonObject = rootElement.getAsJsonObject().entrySet(); if (entrySetsOfRootJsonObject.size() != 1) { throw new UnsupportedFormatException("Json Object should contain one element"); } - Entry childEntry = entrySetsOfRootJsonObject.iterator().next(); - String firstElementName = childEntry.getKey(); - JsonElement firstElementType = childEntry.getValue(); + final Entry childEntry = entrySetsOfRootJsonObject.iterator().next(); + final String firstElementName = childEntry.getKey(); + final JsonElement firstElementType = childEntry.getValue(); if (firstElementType.isJsonObject()) { // container in yang return createStructureWithRoot(firstElementName, firstElementType.getAsJsonObject()); @@ -64,7 +68,7 @@ class JsonToCompositeNodeReader { if (firstElementType.isJsonArray()) { // list in yang if (firstElementType.getAsJsonArray().size() == 1) { - JsonElement firstElementInArray = firstElementType.getAsJsonArray().get(0); + final JsonElement firstElementInArray = firstElementType.getAsJsonArray().get(0); if (firstElementInArray.isJsonObject()) { return createStructureWithRoot(firstElementName, firstElementInArray.getAsJsonObject()); } @@ -77,9 +81,9 @@ class JsonToCompositeNodeReader { } private static CompositeNodeWrapper createStructureWithRoot(final String rootObjectName, final JsonObject rootObject) { - CompositeNodeWrapper firstNode = new CompositeNodeWrapper(getNamespaceFor(rootObjectName), + final CompositeNodeWrapper firstNode = new CompositeNodeWrapper(getNamespaceFor(rootObjectName), getLocalNameFor(rootObjectName)); - for (Entry childOfFirstNode : rootObject.entrySet()) { + for (final Entry childOfFirstNode : rootObject.entrySet()) { addChildToParent(childOfFirstNode.getKey(), childOfFirstNode.getValue(), firstNode); } return firstNode; @@ -88,10 +92,10 @@ class JsonToCompositeNodeReader { private static void addChildToParent(final String childName, final JsonElement childType, final CompositeNodeWrapper parent) { if (childType.isJsonObject()) { - CompositeNodeWrapper child = new CompositeNodeWrapper(getNamespaceFor(childName), + final CompositeNodeWrapper child = new CompositeNodeWrapper(getNamespaceFor(childName), getLocalNameFor(childName)); parent.addValue(child); - for (Entry childOfChild : childType.getAsJsonObject().entrySet()) { + for (final Entry childOfChild : childType.getAsJsonObject().entrySet()) { addChildToParent(childOfChild.getKey(), childOfChild.getValue(), child); } } else if (childType.isJsonArray()) { @@ -99,13 +103,13 @@ class JsonToCompositeNodeReader { parent.addValue(new EmptyNodeWrapper(getNamespaceFor(childName), getLocalNameFor(childName))); } else { - for (JsonElement childOfChildType : childType.getAsJsonArray()) { + for (final JsonElement childOfChildType : childType.getAsJsonArray()) { addChildToParent(childName, childOfChildType, parent); } } } else if (childType.isJsonPrimitive()) { - JsonPrimitive childPrimitive = childType.getAsJsonPrimitive(); - String value = childPrimitive.getAsString().trim(); + final JsonPrimitive childPrimitive = childType.getAsJsonPrimitive(); + final String value = childPrimitive.getAsString().trim(); parent.addValue(new SimpleNodeWrapper(getNamespaceFor(childName), getLocalNameFor(childName), resolveValueOfElement(value))); } else { @@ -133,7 +137,7 @@ class JsonToCompositeNodeReader { if (Iterators.size(it) == 1) { try { return URI.create(maybeURI); - } catch (IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { LOG.debug("Value {} couldn't be interpreted as URI.", maybeURI); } } @@ -153,14 +157,14 @@ class JsonToCompositeNodeReader { private static Object resolveValueOfElement(final String value) { // it could be instance-identifier Built-In Type if (!value.isEmpty() && value.charAt(0) == '/') { - IdentityValuesDTO resolvedValue = RestUtil.asInstanceIdentifier(value, new PrefixMapingFromJson()); + final IdentityValuesDTO resolvedValue = RestUtil.asInstanceIdentifier(value, new PrefixMapingFromJson()); if (resolvedValue != null) { return resolvedValue; } } // it could be identityref Built-In Type therefore it is necessary to look at value as module_name:local_name - URI namespace = getNamespaceFor(value); + final URI namespace = getNamespaceFor(value); if (namespace != null) { return new IdentityValuesDTO(namespace.toString(), getLocalNameFor(value), null, value); } diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/StructuredDataToJsonProvider.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/StructuredDataToJsonProvider.java index 063d2f51af..13dbf26689 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/StructuredDataToJsonProvider.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/StructuredDataToJsonProvider.java @@ -28,6 +28,9 @@ import org.opendaylight.controller.sal.restconf.impl.StructuredData; import org.opendaylight.yangtools.yang.data.api.CompositeNode; import org.opendaylight.yangtools.yang.model.api.DataNodeContainer; +/** + * @deprecated class will be removed in Lithium release + */ @Provider @Produces({ Draft02.MediaTypes.API + RestconfService.JSON, Draft02.MediaTypes.DATA + RestconfService.JSON, Draft02.MediaTypes.OPERATION + RestconfService.JSON, MediaType.APPLICATION_JSON }) @@ -48,19 +51,19 @@ public enum StructuredDataToJsonProvider implements MessageBodyWriter type, final Type genericType, final Annotation[] annotations, final MediaType mediaType, final MultivaluedMap httpHeaders, final OutputStream entityStream) throws IOException, WebApplicationException { - CompositeNode data = t.getData(); + final CompositeNode data = t.getData(); if (data == null) { throw new RestconfDocumentedException(Response.Status.NOT_FOUND); } - JsonWriter writer = new JsonWriter(new OutputStreamWriter(entityStream, Charsets.UTF_8)); + final JsonWriter writer = new JsonWriter(new OutputStreamWriter(entityStream, Charsets.UTF_8)); if (t.isPrettyPrintMode()) { writer.setIndent(" "); } else { writer.setIndent(""); } - JsonMapper jsonMapper = new JsonMapper(t.getMountPoint()); + final JsonMapper jsonMapper = new JsonMapper(t.getMountPoint()); jsonMapper.write(writer, data, (DataNodeContainer) t.getSchema()); writer.flush(); } diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/StructuredDataToXmlProvider.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/StructuredDataToXmlProvider.java index 703a2a4634..fcb7b1de91 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/StructuredDataToXmlProvider.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/StructuredDataToXmlProvider.java @@ -37,6 +37,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; +/** + * @deprecated class will be removed in Lithium release + */ @Provider @Produces({ Draft02.MediaTypes.API + RestconfService.XML, Draft02.MediaTypes.DATA + RestconfService.XML, Draft02.MediaTypes.OPERATION + RestconfService.XML, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) @@ -51,7 +54,7 @@ public enum StructuredDataToXmlProvider implements MessageBodyWriter httpHeaders, final OutputStream entityStream) throws IOException, WebApplicationException { - CompositeNode data = t.getData(); + final CompositeNode data = t.getData(); if (data == null) { throw new RestconfDocumentedException(Response.Status.NOT_FOUND); } @@ -96,7 +99,7 @@ public enum StructuredDataToXmlProvider implements MessageBodyWriter> { @Override public Node readFrom(final Class> type, final Type genericType, final Annotation[] annotations, - MediaType mediaType, MultivaluedMap httpHeaders, InputStream entityStream) + final MediaType mediaType, final MultivaluedMap httpHeaders, final InputStream entityStream) throws IOException, WebApplicationException { - XmlToCompositeNodeReader xmlReader = new XmlToCompositeNodeReader(); + final XmlToCompositeNodeReader xmlReader = new XmlToCompositeNodeReader(); try { return xmlReader.read(entityStream); } catch (XMLStreamException | UnsupportedFormatException e) { diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/XmlToCompositeNodeReader.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/XmlToCompositeNodeReader.java index d71a12ff74..c9a09552ad 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/XmlToCompositeNodeReader.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/XmlToCompositeNodeReader.java @@ -8,7 +8,6 @@ package org.opendaylight.controller.sal.rest.impl; import static com.google.common.base.Preconditions.checkArgument; - import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; @@ -28,6 +27,9 @@ import org.opendaylight.controller.sal.restconf.impl.NodeWrapper; import org.opendaylight.controller.sal.restconf.impl.SimpleNodeWrapper; import org.opendaylight.yangtools.yang.data.api.Node; +/** + * @deprecated class will be removed in Lithium release + */ @Deprecated public class XmlToCompositeNodeReader { @@ -50,7 +52,7 @@ public class XmlToCompositeNodeReader { eventReader = xmlInputFactory.createXMLEventReader(entityStream); if (eventReader.hasNext()) { - XMLEvent element = eventReader.peek(); + final XMLEvent element = eventReader.peek(); if (element.isStartDocument()) { eventReader.nextEvent(); } @@ -126,7 +128,7 @@ public class XmlToCompositeNodeReader { private boolean isSimpleNodeEvent(final XMLEvent event) throws XMLStreamException { checkArgument(event != null, "XML Event cannot be NULL!"); if (event.isStartElement()) { - XMLEvent innerEvent = skipCommentsAndWhitespace(); + final XMLEvent innerEvent = skipCommentsAndWhitespace(); if (innerEvent != null && (innerEvent.isCharacters() || innerEvent.isEndElement())) { return true; } @@ -137,7 +139,7 @@ public class XmlToCompositeNodeReader { private boolean isCompositeNodeEvent(final XMLEvent event) throws XMLStreamException { checkArgument(event != null, "XML Event cannot be NULL!"); if (event.isStartElement()) { - XMLEvent innerEvent = skipCommentsAndWhitespace(); + final XMLEvent innerEvent = skipCommentsAndWhitespace(); if (innerEvent != null) { if (innerEvent.isStartElement()) { return true; @@ -149,14 +151,14 @@ public class XmlToCompositeNodeReader { private XMLEvent skipCommentsAndWhitespace() throws XMLStreamException { while (eventReader.hasNext()) { - XMLEvent event = eventReader.peek(); + final XMLEvent event = eventReader.peek(); if (event.getEventType() == XMLStreamConstants.COMMENT) { eventReader.nextEvent(); continue; } if (event.isCharacters()) { - Characters chars = event.asCharacters(); + final Characters chars = event.asCharacters(); if (chars.isWhiteSpace()) { eventReader.nextEvent(); continue; @@ -175,7 +177,7 @@ public class XmlToCompositeNodeReader { private NodeWrapper> resolveSimpleNodeFromStartElement(final StartElement startElement) throws XMLStreamException { checkArgument(startElement != null, "Start Element cannot be NULL!"); - String data = getValueOf(startElement); + final String data = getValueOf(startElement); if (data == null) { return new EmptyNodeWrapper(getNamespaceFor(startElement), getLocalNameFor(startElement)); } @@ -224,23 +226,23 @@ public class XmlToCompositeNodeReader { } private URI getNamespaceFor(final StartElement startElement) { - String namespaceURI = startElement.getName().getNamespaceURI(); + final String namespaceURI = startElement.getName().getNamespaceURI(); return namespaceURI.isEmpty() ? null : URI.create(namespaceURI); } private Object resolveValueOfElement(final String value, final StartElement startElement) { // it could be instance-identifier Built-In Type if (value.startsWith("/")) { - IdentityValuesDTO iiValue = RestUtil.asInstanceIdentifier(value, new RestUtil.PrefixMapingFromXml( + final IdentityValuesDTO iiValue = RestUtil.asInstanceIdentifier(value, new RestUtil.PrefixMapingFromXml( startElement)); if (iiValue != null) { return iiValue; } } // it could be identityref Built-In Type - String[] namespaceAndValue = value.split(":"); + final String[] namespaceAndValue = value.split(":"); if (namespaceAndValue.length == 2) { - String namespace = startElement.getNamespaceContext().getNamespaceURI(namespaceAndValue[0]); + final String namespace = startElement.getNamespaceContext().getNamespaceURI(namespaceAndValue[0]); if (namespace != null && !namespace.isEmpty()) { return new IdentityValuesDTO(namespace, namespaceAndValue[1], namespaceAndValue[0], value); } diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/CompositeNodeWrapper.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/CompositeNodeWrapper.java index 206dbdeab6..c3edfccb98 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/CompositeNodeWrapper.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/CompositeNodeWrapper.java @@ -23,6 +23,10 @@ import org.opendaylight.yangtools.yang.data.api.Node; import org.opendaylight.yangtools.yang.data.api.SimpleNode; import org.opendaylight.yangtools.yang.data.impl.NodeFactory; +/** + * @deprecated class will be removed in Lithium release + */ +@Deprecated public final class CompositeNodeWrapper implements NodeWrapper, CompositeNode { private MutableCompositeNode compositeNode; @@ -102,8 +106,8 @@ public final class CompositeNodeWrapper implements NodeWrapper, C name = new QName(namespace, localName); } - List> nodeValues = new ArrayList<>(values.size()); - for (NodeWrapper nodeWrapper : values) { + final List> nodeValues = new ArrayList<>(values.size()); + for (final NodeWrapper nodeWrapper : values) { nodeValues.add(nodeWrapper.unwrap()); } compositeNode = NodeFactory.createMutableCompositeNode(name, null, nodeValues, null, null); diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/EmptyNodeWrapper.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/EmptyNodeWrapper.java index a3d44d3572..5a310e8af2 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/EmptyNodeWrapper.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/EmptyNodeWrapper.java @@ -15,6 +15,10 @@ import org.opendaylight.yangtools.yang.data.api.CompositeNode; import org.opendaylight.yangtools.yang.data.api.Node; import org.opendaylight.yangtools.yang.data.impl.NodeFactory; +/** + * @deprecated class will be removed in Lithium release + */ +@Deprecated public final class EmptyNodeWrapper implements NodeWrapper>, Node { private Node unwrapped; diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/NodeWrapper.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/NodeWrapper.java index 9637a36268..09c7835ef6 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/NodeWrapper.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/NodeWrapper.java @@ -11,6 +11,10 @@ import java.net.URI; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.data.api.Node; +/** + * @deprecated class will be removed in Lithium release + */ +@Deprecated public interface NodeWrapper> { void setQname(QName name); diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/SimpleNodeWrapper.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/SimpleNodeWrapper.java index 854e9635cf..2f50fd2ef5 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/SimpleNodeWrapper.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/SimpleNodeWrapper.java @@ -16,6 +16,10 @@ import org.opendaylight.yangtools.yang.data.api.MutableSimpleNode; import org.opendaylight.yangtools.yang.data.api.SimpleNode; import org.opendaylight.yangtools.yang.data.impl.NodeFactory; +/** + * @deprecated class will be removed in Lithium release + */ +@Deprecated public final class SimpleNodeWrapper implements NodeWrapper>, SimpleNode { private SimpleNode simpleNode; diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/StructuredData.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/StructuredData.java index 2935434967..be4ac992da 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/StructuredData.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/StructuredData.java @@ -11,6 +11,10 @@ import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint; import org.opendaylight.yangtools.yang.data.api.CompositeNode; import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; +/** + * @deprecated class will be removed in Lithium release + */ +@Deprecated public class StructuredData { private final CompositeNode data; @@ -27,7 +31,7 @@ public class StructuredData { this.data = data; this.schema = schema; this.mountPoint = mountPoint; - this.prettyPrintMode = preattyPrintMode; + prettyPrintMode = preattyPrintMode; } public CompositeNode getData() {