Work on refactor
This commit is contained in:
parent
8f76e4e463
commit
b2bef47100
|
@ -23,24 +23,28 @@ package ca.uhn.fhir.model.api;
|
|||
import java.io.InputStream;
|
||||
import java.util.Date;
|
||||
|
||||
import org.hl7.fhir.instance.model.api.*;
|
||||
import org.hl7.fhir.instance.model.api.IBase;
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
import org.hl7.fhir.instance.model.api.IIdType;
|
||||
import org.hl7.fhir.instance.model.api.IPrimitiveType;
|
||||
|
||||
import ca.uhn.fhir.context.*;
|
||||
import ca.uhn.fhir.context.api.IVersionSpecificBundleFactory;
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.context.FhirVersionEnum;
|
||||
import ca.uhn.fhir.context.RuntimeResourceDefinition;
|
||||
import ca.uhn.fhir.context.support.IContextValidationSupport;
|
||||
import ca.uhn.fhir.fluentpath.IFluentPath;
|
||||
import ca.uhn.fhir.rest.server.IResourceProvider;
|
||||
import ca.uhn.fhir.rest.server.IServerConformanceProvider;
|
||||
import ca.uhn.fhir.rest.server.RestfulServer;
|
||||
|
||||
/**
|
||||
* Each structure version JAR will have an implementation of this interface.
|
||||
* This is used internally by HAPI and subject to change. Do not use this interface
|
||||
* directly in user code.
|
||||
*
|
||||
* See also IFhirVersionServer for the hapi-fhir-server equivalent.
|
||||
*/
|
||||
public interface IFhirVersion {
|
||||
|
||||
IFluentPath createFluentPathExecutor(FhirContext theFhirContext);
|
||||
|
||||
IServerConformanceProvider<? extends IBaseResource> createServerConformanceProvider(RestfulServer theRestfulServer);
|
||||
|
||||
IResourceProvider createServerProfilesProvider(RestfulServer theRestfulServer);
|
||||
|
||||
IContextValidationSupport<?, ?, ?, ?, ?, ?> createValidationSupport();
|
||||
|
||||
IBaseResource generateProfile(RuntimeResourceDefinition theRuntimeResourceDefinition, String theServerBase);
|
||||
|
@ -57,8 +61,6 @@ public interface IFhirVersion {
|
|||
|
||||
FhirVersionEnum getVersion();
|
||||
|
||||
IVersionSpecificBundleFactory newBundleFactory(FhirContext theContext);
|
||||
|
||||
IBase newCodingDt();
|
||||
|
||||
IIdType newIdType();
|
||||
|
|
|
@ -2,12 +2,14 @@ package ca.uhn.fhir.rest.api.server;
|
|||
|
||||
import java.util.*;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
|
||||
public interface IRequestDetails {
|
||||
|
||||
Map<String, String[]> getParameters();
|
||||
|
||||
Map<String, List<String>> getUnqualifiedToQualifiedNames();
|
||||
|
||||
IRestfulServer getServer();
|
||||
FhirContext getFhirContext();
|
||||
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
package ca.uhn.fhir.rest.api.server;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
|
||||
public interface IRestfulServer {
|
||||
|
||||
FhirContext getFhirContext();
|
||||
|
||||
}
|
|
@ -143,12 +143,12 @@ public abstract class BaseQueryParameter implements IParameter {
|
|||
ourLog.debug("No value for parameter '{}' - Qualified names {} and qualifier whitelist {}", new Object[] { getName(), qualified, getQualifierWhitelist() });
|
||||
|
||||
if (handlesMissing()) {
|
||||
return parse(theRequest.getServer().getFhirContext(), paramList);
|
||||
return parse(theRequest.getFhirContext(), paramList);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
return parse(theRequest.getServer().getFhirContext(), paramList);
|
||||
return parse(theRequest.getFhirContext(), paramList);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -33,13 +33,13 @@ import org.hl7.fhir.instance.model.api.IIdType;
|
|||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.context.FhirVersionEnum;
|
||||
import ca.uhn.fhir.context.api.IVersionSpecificBundleFactory;
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
import ca.uhn.fhir.model.api.TagList;
|
||||
import ca.uhn.fhir.model.valueset.BundleTypeEnum;
|
||||
import ca.uhn.fhir.parser.DataFormatException;
|
||||
import ca.uhn.fhir.parser.IParser;
|
||||
import ca.uhn.fhir.rest.api.RequestTypeEnum;
|
||||
import ca.uhn.fhir.rest.api.server.IVersionSpecificBundleFactory;
|
||||
import ca.uhn.fhir.rest.client.api.IHttpClient;
|
||||
import ca.uhn.fhir.rest.client.api.IHttpRequest;
|
||||
import ca.uhn.fhir.rest.client.impl.BaseHttpClientInvocation;
|
||||
|
|
|
@ -35,7 +35,6 @@ import org.hl7.fhir.instance.model.api.IPrimitiveType;
|
|||
import ca.uhn.fhir.context.ConfigurationException;
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.context.FhirVersionEnum;
|
||||
import ca.uhn.fhir.context.api.IVersionSpecificBundleFactory;
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
|
@ -44,6 +43,7 @@ import ca.uhn.fhir.parser.IParser;
|
|||
import ca.uhn.fhir.rest.api.MethodOutcome;
|
||||
import ca.uhn.fhir.rest.api.RequestTypeEnum;
|
||||
import ca.uhn.fhir.rest.api.SummaryEnum;
|
||||
import ca.uhn.fhir.rest.api.server.IVersionSpecificBundleFactory;
|
||||
import ca.uhn.fhir.rest.client.exceptions.InvalidResponseException;
|
||||
import ca.uhn.fhir.rest.server.*;
|
||||
import ca.uhn.fhir.rest.server.RestfulServerUtils.ResponseEncoding;
|
||||
|
|
|
@ -30,12 +30,12 @@ import org.hl7.fhir.instance.model.api.IBase;
|
|||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.context.api.IVersionSpecificBundleFactory;
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.valueset.BundleTypeEnum;
|
||||
import ca.uhn.fhir.rest.api.RequestTypeEnum;
|
||||
import ca.uhn.fhir.rest.api.RestOperationTypeEnum;
|
||||
import ca.uhn.fhir.rest.api.server.IVersionSpecificBundleFactory;
|
||||
import ca.uhn.fhir.rest.client.impl.BaseHttpClientInvocation;
|
||||
import ca.uhn.fhir.rest.server.*;
|
||||
import ca.uhn.fhir.rest.server.RestfulServerUtils.ResponseEncoding;
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
package ca.uhn.fhir.rest.api.server;
|
||||
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.model.api.IFhirVersion;
|
||||
import ca.uhn.fhir.rest.server.IResourceProvider;
|
||||
import ca.uhn.fhir.rest.server.IServerConformanceProvider;
|
||||
import ca.uhn.fhir.rest.server.RestfulServer;
|
||||
|
||||
/**
|
||||
* This class is the server specific equivalent to {@link IFhirVersion}
|
||||
*/
|
||||
public interface IFhirVersionServer {
|
||||
|
||||
IServerConformanceProvider<? extends IBaseResource> createServerConformanceProvider(RestfulServer theRestfulServer);
|
||||
|
||||
IResourceProvider createServerProfilesProvider(RestfulServer theRestfulServer);
|
||||
|
||||
IVersionSpecificBundleFactory newBundleFactory(FhirContext theContext);
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package ca.uhn.fhir.context.api;
|
||||
package ca.uhn.fhir.rest.api.server;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
|
@ -24,12 +24,11 @@ import java.util.*;
|
|||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
import org.hl7.fhir.instance.model.api.IPrimitiveType;
|
||||
|
||||
import ca.uhn.fhir.context.api.BundleInclusionRule;
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.valueset.BundleTypeEnum;
|
||||
import ca.uhn.fhir.rest.api.EncodingEnum;
|
||||
import ca.uhn.fhir.rest.api.server.IBundleProvider;
|
||||
import ca.uhn.fhir.rest.api.server.IRestfulServer;
|
||||
|
||||
/**
|
||||
* This interface should be considered experimental and will likely change in future releases of HAPI. Use with caution!
|
|
@ -35,7 +35,6 @@ import org.hl7.fhir.instance.model.api.IPrimitiveType;
|
|||
import ca.uhn.fhir.context.ConfigurationException;
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.context.FhirVersionEnum;
|
||||
import ca.uhn.fhir.context.api.IVersionSpecificBundleFactory;
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.hl7.fhir.instance.model.api.IBase;
|
|||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.context.api.IVersionSpecificBundleFactory;
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.model.valueset.BundleTypeEnum;
|
||||
|
|
Loading…
Reference in New Issue