From 3ff6822599c823eb933406ca428aae71ea944963 Mon Sep 17 00:00:00 2001 From: "C. Mike Bylund" Date: Fri, 6 Nov 2015 21:20:06 -0700 Subject: [PATCH] Added the ability to wire JpaConformanceProviderDstu1 & JpaConformanceProviderDstu1 with spring, as accommodated by [RestfulServer.java](https://github.com/jamesagnew/hapi-fhir/blob/d3685e72bac36e2bcaf422d7d9203bbe0d1c7759/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java#L1313) --- .../provider/JpaConformanceProviderDstu1.java | 15 ++++++++++++++ .../provider/JpaConformanceProviderDstu2.java | 20 ++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu1.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu1.java index 134e2ce30ada..c51eb66cfa8c 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu1.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu1.java @@ -56,6 +56,11 @@ public JpaConformanceProviderDstu1(RestfulServer theRestfulServer, IFhirSystemDa super.setCache(false); } + public JpaConformanceProviderDstu1(){ + super(); + super.setCache(false); + } + @Override public Conformance getServerConformance(HttpServletRequest theRequest) { Conformance retVal = myCachedValue; @@ -95,6 +100,16 @@ public Conformance getServerConformance(HttpServletRequest theRequest) { return retVal; } + @Override + public void setRestfulServer(RestfulServer theRestfulServer) { + this.myRestfulServer = theRestfulServer; + super.setRestfulServer(theRestfulServer); + } + + public void setMySystemDao(IFhirSystemDao> mySystemDao) { + this.mySystemDao = mySystemDao; + } + public void setImplementationDescription(String theImplDesc) { myImplementationDescription = theImplDesc; } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java index ec77e43dc58d..4ac61f653b85 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/JpaConformanceProviderDstu2.java @@ -60,6 +60,11 @@ public JpaConformanceProviderDstu2(RestfulServer theRestfulServer, IFhirSystemDa super.setCache(false); } + public JpaConformanceProviderDstu2(){ + super(); + super.setCache(false); + } + @Override public Conformance getServerConformance(HttpServletRequest theRequest) { Conformance retVal = myCachedValue; @@ -105,8 +110,21 @@ public Conformance getServerConformance(HttpServletRequest theRequest) { return retVal; } + @Override + public void setRestfulServer(RestfulServer theRestfulServer) { + this.myRestfulServer = theRestfulServer; + super.setRestfulServer(theRestfulServer); + } + + public void setMyDaoConfig(DaoConfig myDaoConfig) { + this.myDaoConfig = myDaoConfig; + } + + public void setMySystemDao(IFhirSystemDao mySystemDao) { + this.mySystemDao = mySystemDao; + } + public void setImplementationDescription(String theImplDesc) { myImplementationDescription = theImplDesc; } - }