Disable automatic bundle inclusion for now
This commit is contained in:
parent
7f9b1baa14
commit
c9e54e3a20
|
@ -6,16 +6,15 @@ import ca.uhn.fhir.util.ResourceReferenceInfo;
|
|||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Created by Bill de Beaubien on 3/4/2015.
|
||||
*
|
||||
* Controls how bundles decide whether referenced resources should be included
|
||||
* Used to set server bahaviour for adding included resources when responding to search operations.
|
||||
*
|
||||
* @author Created by Bill de Beaubien on 3/4/2015.
|
||||
* @see RestfulServer#setBundleInclusionRule(BundleInclusionRule)
|
||||
*/
|
||||
public enum BundleInclusionRule {
|
||||
/**
|
||||
* Decision is based on whether the resource's Include is in the IncludeSet (e.g. DiagnosticReport.result). Note that
|
||||
* the resource has to be populated to be included.
|
||||
*
|
||||
* This is the default behavior
|
||||
*/
|
||||
BASED_ON_INCLUDES {
|
||||
@Override
|
||||
|
@ -27,8 +26,6 @@ public enum BundleInclusionRule {
|
|||
/**
|
||||
* Decision is based on whether the resource reference is set to a populated resource (in which case its included) or just
|
||||
* an id (in which case it's not included)
|
||||
*
|
||||
* This is the original HAPI behavior
|
||||
*/
|
||||
BASED_ON_RESOURCE_PRESENCE {
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,14 @@ import java.lang.annotation.Annotation;
|
|||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.UnavailableException;
|
||||
|
@ -37,7 +44,6 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
import org.hl7.fhir.instance.model.IBaseResource;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
|
@ -45,8 +51,6 @@ import ca.uhn.fhir.context.ProvidedResourceScanner;
|
|||
import ca.uhn.fhir.context.RuntimeResourceDefinition;
|
||||
import ca.uhn.fhir.model.api.Bundle;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.base.resource.BaseOperationOutcome;
|
||||
import ca.uhn.fhir.model.base.resource.BaseOperationOutcome.BaseIssue;
|
||||
import ca.uhn.fhir.model.primitive.IdDt;
|
||||
import ca.uhn.fhir.rest.annotation.Destroy;
|
||||
import ca.uhn.fhir.rest.annotation.IdParam;
|
||||
|
@ -54,12 +58,10 @@ import ca.uhn.fhir.rest.method.BaseMethodBinding;
|
|||
import ca.uhn.fhir.rest.method.ConformanceMethodBinding;
|
||||
import ca.uhn.fhir.rest.method.OtherOperationTypeEnum;
|
||||
import ca.uhn.fhir.rest.method.Request;
|
||||
import ca.uhn.fhir.rest.method.RequestDetails;
|
||||
import ca.uhn.fhir.rest.method.SearchMethodBinding;
|
||||
import ca.uhn.fhir.rest.method.SearchMethodBinding.RequestType;
|
||||
import ca.uhn.fhir.rest.server.exceptions.AuthenticationException;
|
||||
import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException;
|
||||
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
||||
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
|
||||
import ca.uhn.fhir.rest.server.exceptions.NotModifiedException;
|
||||
import ca.uhn.fhir.rest.server.interceptor.ExceptionHandlingInterceptor;
|
||||
|
@ -78,7 +80,7 @@ public class RestfulServer extends HttpServlet {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private AddProfileTagEnum myAddProfileTag;
|
||||
private BundleInclusionRule myBundleInclusionRule = BundleInclusionRule.BASED_ON_INCLUDES;
|
||||
private BundleInclusionRule myBundleInclusionRule = BundleInclusionRule.BASED_ON_RESOURCE_PRESENCE;
|
||||
private boolean myDefaultPrettyPrint = false;
|
||||
private EncodingEnum myDefaultResponseEncoding = EncodingEnum.XML;
|
||||
private ETagSupportEnum myETagSupport = DEFAULT_ETAG_SUPPORT;
|
||||
|
|
Loading…
Reference in New Issue