Bug 6848 - repackage providers for jersey+create xml
[netconf.git] / restconf / sal-rest-connector / src / main / java / org / opendaylight / netconf / sal / rest / impl / AbstractIdentifierAwareJaxRsProvider.java
index 243858c9c20da3fee4e304ea908755cb958eff0e..49072d83395cb683d21f9508b59349dc760e32f0 100644 (file)
@@ -15,6 +15,11 @@ import org.opendaylight.netconf.sal.rest.api.RestconfConstants;
 import org.opendaylight.netconf.sal.restconf.impl.ControllerContext;
 import org.opendaylight.netconf.sal.restconf.impl.InstanceIdentifierContext;
 
+/**
+ * @deprecated This class will be replaced by
+ *             {@link org.opendaylight.restconf.jersey.providers.AbstractIdentifierAwareJaxRsProvider}
+ */
+@Deprecated
 public class AbstractIdentifierAwareJaxRsProvider {
 
     private static final String POST = "POST";
@@ -26,7 +31,7 @@ public class AbstractIdentifierAwareJaxRsProvider {
     private Request request;
 
     protected final String getIdentifier() {
-        return uriInfo.getPathParameters(false).getFirst(RestconfConstants.IDENTIFIER);
+        return this.uriInfo.getPathParameters(false).getFirst(RestconfConstants.IDENTIFIER);
     }
 
     protected InstanceIdentifierContext<?> getInstanceIdentifierContext() {
@@ -34,10 +39,14 @@ public class AbstractIdentifierAwareJaxRsProvider {
     }
 
     protected UriInfo getUriInfo() {
-        return uriInfo;
+        return this.uriInfo;
     }
 
     protected boolean isPost() {
-        return POST.equals(request.getMethod());
+        return POST.equals(this.request.getMethod());
+    }
+
+    Request getRequest() {
+        return this.request;
     }
 }