Fix build issues

This commit is contained in:
James Agnew 2014-11-10 18:08:08 -05:00
parent 479c09b174
commit 4dcfdc88fd
6 changed files with 36 additions and 4 deletions

View File

@ -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)) {

View File

@ -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.
* <p>
* <b>See:</b> See the
* <a href="http://jamesagnew.github.io/hapi-fhir/doc_rest_server_interceptor.html">server interceptor documentation</a>
* for more information on how to use this class.
* </p>
*/
public interface IServerInterceptor {

View File

@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="hapi-fhir-structures-dstu">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/test/java"/>
<wb-resource deploy-path="/" source-path="/src/test/resources"/>
<wb-resource deploy-path="/" source-path="/target/generated-resources/tinder"/>
<wb-resource deploy-path="/" source-path="/target/generated-sources/tinder"/>
</wb-module>

View File

@ -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());
}
}

View File

@ -631,7 +631,7 @@
<modules>
<module>hapi-deployable-pom</module>
<module>hapi-fhir-base</module>
<module>hapi-fhir-oauth2</module>
<!--<module>hapi-fhir-oauth2</module>-->
<module>hapi-fhir-base/testmindeps</module>
<module>hapi-tinder-plugin</module>
<module>hapi-tinder-test</module>

View File

@ -15,6 +15,21 @@
<![CDATA[<a href="./doc_upgrading.html">upgrading</a>]]>
for more information.
</action>
<action type="fix">
<![CDATA[
<b>Deprocated API Removal</b>: The following classes (which were deprocated previously)
have now been removed:
<ul>
<li><b>ISecurityManager</b>: If you are using this class, the same functionality
is available through the more general purpose
<a href="http://jamesagnew.github.io/hapi-fhir/doc_rest_server_interceptor.html">server interceptor</a>
capabilities.
<li><b>CodingListParam</b>: This class was made redundant by the
<a href="http://jamesagnew.github.io/hapi-fhir/apidocs/ca/uhn/fhir/rest/param/TokenOrListParam.html">TokenOrListParam</a>
class, which can be used in its place.
</ul>
]]>
</action>
<action type="add" issue="38" dev="wdebeau1">
Profile generation on the server was not working due to IdDt being
incorrectly used. Thanks to Bill de Beaubien for the pull request!