Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3 from kml27/migrate-package
Browse files Browse the repository at this point in the history
Migrating to unique namespace(s), classes jar
  • Loading branch information
kml27 authored Nov 6, 2020
2 parents 61a2181 + e4213b5 commit 58160f0
Show file tree
Hide file tree
Showing 19 changed files with 74 additions and 57 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ local.properties
.loadpath
.recommenders

### Additional Eclipse files
.classpath
.project

# External tool builders
.externalToolBuilders/

Expand Down Expand Up @@ -157,4 +161,7 @@ Icon
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
.apdisk

# settings.xml copied from local dev workflow for tiny-maven-proxy
settings.xml
2 changes: 1 addition & 1 deletion docker-build.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker build --tag hapiproject/hapi:latest --tag hapiproject/hapi:4.1 -m 4g .
docker build --tag uwcirg/hapi-fhir-oauth2-starter:latest -m 4g .
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
<version>4.2.0</version>
</parent>

<artifactId>hapi-fhir-jpaserver-starter</artifactId>
<groupId>edu.washington.cirg</groupId>
<artifactId>hapi-fhir-oauth2-starter</artifactId>

<prerequisites>
<maven>3.5.0</maven>
Expand Down Expand Up @@ -254,7 +255,7 @@

<packaging>war</packaging>

<name>HAPI FHIR JPA Server - Starter Project</name>
<name>UW CIRG HAPI FHIR JPA Server </name>

<repositories>
<repository>
Expand Down Expand Up @@ -300,6 +301,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<attachClasses>true</attachClasses>
<archive>
<manifestEntries>
<Build-Time>${maven.build.timestamp}</Build-Time>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import ca.uhn.fhir.context.FhirVersionEnum;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import ca.uhn.fhir.jpa.binstore.DatabaseBlobBinaryStorageSvcImpl;
import ca.uhn.fhir.jpa.binstore.IBinaryStorageSvc;
Expand Down Expand Up @@ -51,7 +51,7 @@ public class FhirServerConfigCommon {
private Boolean emailStartTlsRequired = HapiProperties.getEmailStartTlsRequired();
private Boolean emailQuitWait = HapiProperties.getEmailQuitWait();

@Autowired
@Autowired(required=false)
private SubscriptionDeliveryHandlerFactory mySubscriptionDeliveryHandlerFactory;

public FhirServerConfigCommon() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.jpa.config.BaseJavaConfigDstu2;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.jpa.config.BaseJavaConfigDstu3;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.jpa.config.BaseJavaConfigR4;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.jpa.config.BaseJavaConfigR5;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.context.FhirVersionEnum;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;
Expand Down
6 changes: 3 additions & 3 deletions src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<context-param>
<param-name>contextClass</param-name>
<param-value>
ca.uhn.fhir.jpa.starter.ApplicationContext
edu.washington.cirg.fhir.jpa.starter.ApplicationContext
</param-value>
</context-param>
<context-param>
Expand All @@ -31,7 +31,7 @@
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
ca.uhn.fhir.jpa.starter.FhirTesterConfig
edu.washington.cirg.fhir.jpa.starter.FhirTesterConfig
</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
Expand All @@ -43,7 +43,7 @@

<servlet>
<servlet-name>fhirServlet</servlet-name>
<servlet-class>ca.uhn.fhir.jpa.starter.JpaRestfulServer</servlet-class>
<servlet-class>edu.washington.cirg.fhir.jpa.starter.JpaRestfulServer</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.model.dstu2.resource.Patient;
import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor;
import ca.uhn.fhir.test.utilities.JettyUtil;
import edu.washington.cirg.fhir.jpa.starter.HapiProperties;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;
import org.hl7.fhir.instance.model.api.IIdType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.rest.api.CacheControlDirective;
Expand All @@ -8,6 +8,8 @@
import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor;
import ca.uhn.fhir.test.utilities.JettyUtil;
import edu.washington.cirg.fhir.jpa.starter.HapiProperties;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;
import org.eclipse.jetty.websocket.api.Session;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.rest.api.CacheControlDirective;
Expand All @@ -8,6 +8,8 @@
import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor;
import ca.uhn.fhir.test.utilities.JettyUtil;
import edu.washington.cirg.fhir.jpa.starter.HapiProperties;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;
import org.eclipse.jetty.websocket.api.Session;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.rest.api.CacheControlDirective;
Expand All @@ -8,6 +8,8 @@
import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor;
import ca.uhn.fhir.test.utilities.JettyUtil;
import edu.washington.cirg.fhir.jpa.starter.HapiProperties;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;
import org.eclipse.jetty.websocket.api.Session;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
package ca.uhn.fhir.jpa.starter;

import java.io.IOException;
import java.net.ServerSocket;
import java.util.ArrayList;
import java.util.List;

/**
* Provides server ports
*/
public class RandomServerPortProvider {

private static List<Integer> ourPorts = new ArrayList<Integer>();

public static int findFreePort() {
ServerSocket server;
try {
server = new ServerSocket(0);
int port = server.getLocalPort();
ourPorts.add(port);
server.close();
Thread.sleep(500);
return port;
} catch (IOException e) {
throw new Error(e);
} catch (InterruptedException e) {
throw new Error(e);
}
}

public static List<Integer> list() {
return ourPorts;
}

}
package edu.washington.cirg.fhir.jpa.starter;

import java.io.IOException;
import java.net.ServerSocket;
import java.util.ArrayList;
import java.util.List;

/**
* Provides server ports
*/
public class RandomServerPortProvider {

private static List<Integer> ourPorts = new ArrayList<Integer>();

public static int findFreePort() {
ServerSocket server;
try {
server = new ServerSocket(0);
int port = server.getLocalPort();
ourPorts.add(port);
server.close();
Thread.sleep(500);
return port;
} catch (IOException e) {
throw new Error(e);
} catch (InterruptedException e) {
throw new Error(e);
}
}

public static List<Integer> list() {
return ourPorts;
}

}

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

package ca.uhn.fhir.jpa.starter;
package edu.washington.cirg.fhir.jpa.starter;

import ca.uhn.fhir.rest.api.EncodingEnum;
import org.eclipse.jetty.websocket.api.Session;
Expand Down

0 comments on commit 58160f0

Please sign in to comment.