diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java index 615fe7b63ad..99dbe62aab3 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java @@ -34,6 +34,7 @@ import ca.uhn.fhir.i18n.HapiLocalizer; import ca.uhn.fhir.model.api.IElement; import ca.uhn.fhir.model.api.IFhirVersion; import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.dstu.resource.Binary; import ca.uhn.fhir.model.view.ViewGenerator; import ca.uhn.fhir.narrative.INarrativeGenerator; import ca.uhn.fhir.parser.DataFormatException; @@ -167,7 +168,12 @@ public class FhirContext { try { String className = myNameToResourceType.get(resourceName.toLowerCase()); if (className == null) { - throw new DataFormatException("Unknown resource name[" + resourceName + "]"); + if ("binary".equals(resourceName.toLowerCase())) { + // Binary is not generated so it's not in the list of potential resources + className = Binary.class.getName(); + } else { + throw new DataFormatException("Unknown resource name[" + resourceName + "]"); + } } Class clazz = Class.forName(className); if (IResource.class.isAssignableFrom(clazz)) { diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerInterceptor.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerInterceptor.java index 19de6ce35ea..27a79e6d770 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerInterceptor.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/interceptor/IServerInterceptor.java @@ -37,6 +37,11 @@ import ca.uhn.fhir.rest.server.exceptions.AuthenticationException; /** * Provides methods to intercept requests and responses. Note that implementations of this interface may wish to use {@link InterceptorAdapter} in order to not need to implement every method. + *

+ * See: See the + * server interceptor documentation + * for more information on how to use this class. + *

*/ public interface IServerInterceptor { diff --git a/hapi-fhir-structures-dstu/.settings/org.eclipse.wst.common.component b/hapi-fhir-structures-dstu/.settings/org.eclipse.wst.common.component index b5d99862419..bb633a08b36 100644 --- a/hapi-fhir-structures-dstu/.settings/org.eclipse.wst.common.component +++ b/hapi-fhir-structures-dstu/.settings/org.eclipse.wst.common.component @@ -1,8 +1,6 @@ - - diff --git a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/context/FhirContextTest.java b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/context/FhirContextTest.java index 2df0eefba6a..cd5f1174cd6 100644 --- a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/context/FhirContextTest.java +++ b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/context/FhirContextTest.java @@ -1,5 +1,7 @@ package ca.uhn.fhir.context; +import static org.junit.Assert.*; + import org.junit.Test; import ca.uhn.fhir.model.dstu.resource.Patient; @@ -15,4 +17,10 @@ public class FhirContextTest { ctx.getResourceDefinition(Patient.class); } + @Test + public void testFindBinary() { + RuntimeResourceDefinition def = new FhirContext().getResourceDefinition("Binary"); + assertEquals("Binary", def.getName()); + } + } diff --git a/pom.xml b/pom.xml index 8fa1c6ff697..074ef1fad9b 100644 --- a/pom.xml +++ b/pom.xml @@ -631,7 +631,7 @@ hapi-deployable-pom hapi-fhir-base - hapi-fhir-oauth2 + hapi-fhir-base/testmindeps hapi-tinder-plugin hapi-tinder-test diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 77f3f84edba..56d16e85394 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -15,6 +15,21 @@ upgrading]]> for more information. + + Deprocated API Removal: The following classes (which were deprocated previously) + have now been removed: +
    +
  • ISecurityManager: If you are using this class, the same functionality + is available through the more general purpose + server interceptor + capabilities. +
  • CodingListParam: This class was made redundant by the + TokenOrListParam + class, which can be used in its place. +
+ ]]> +
Profile generation on the server was not working due to IdDt being incorrectly used. Thanks to Bill de Beaubien for the pull request!