X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnorthbound%2Fcommons%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnorthbound%2Fcommons%2FNorthboundApplication.java;h=87f51364ba1c5b59f3b9326a518a07c99c72129c;hp=47bb3ffd7c72df59e0804527412a5a897dc922db;hb=31c83799d67d0bf4012aefedaba5356ebfaad8ab;hpb=0ae12c54560ef14cb8c08beef4553f7523d41578 diff --git a/opendaylight/northbound/commons/src/main/java/org/opendaylight/controller/northbound/commons/NorthboundApplication.java b/opendaylight/northbound/commons/src/main/java/org/opendaylight/controller/northbound/commons/NorthboundApplication.java index 47bb3ffd7c..87f51364ba 100644 --- a/opendaylight/northbound/commons/src/main/java/org/opendaylight/controller/northbound/commons/NorthboundApplication.java +++ b/opendaylight/northbound/commons/src/main/java/org/opendaylight/controller/northbound/commons/NorthboundApplication.java @@ -12,15 +12,15 @@ import java.util.Dictionary; import java.util.HashSet; import java.util.List; import java.util.Set; + import javax.ws.rs.core.Application; import javax.ws.rs.ext.ContextResolver; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.annotation.XmlRootElement; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; import org.opendaylight.controller.northbound.bundlescanner.IBundleScanService; +import org.opendaylight.controller.northbound.commons.query.QueryContextProvider; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.BundleReference; @@ -30,12 +30,14 @@ import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; + /** * Instance of javax.ws.rs.core.Application used to return the classes * that will be instantiated for JAXRS processing. This hooks onto the * bundle scanner service to provide JAXB classes to JAX-RS for prorcessing. */ -@SuppressWarnings("unchecked") public class NorthboundApplication extends Application { public static final String JAXRS_RESOURCES_MANIFEST_NAME = "Jaxrs-Resources"; public static final String JAXRS_EXCLUDES_MANIFEST_NAME = "Jaxrs-Exclude-Types"; @@ -57,6 +59,7 @@ public class NorthboundApplication extends Application { } ); _singletons.add(getJsonProvider()); _singletons.add(new JacksonJsonProcessingExceptionMapper()); + _singletons.add(new QueryContextProvider()); } //////////////////////////////////////////////////////////////// @@ -97,7 +100,7 @@ public class NorthboundApplication extends Application { } private static final IBundleScanService lookupBundleScanner(BundleContext ctx) { - ServiceReference svcRef = ctx.getServiceReference(IBundleScanService.class); + ServiceReference svcRef = ctx.getServiceReference(IBundleScanService.class); if (svcRef == null) { throw new ServiceException("Unable to lookup IBundleScanService"); }