Class AbstractJaxRsBundleProvider

java.lang.Object
ca.uhn.fhir.jaxrs.server.AbstractJaxRsProvider
ca.uhn.fhir.jaxrs.server.AbstractJaxRsBundleProvider
All Implemented Interfaces:
ca.uhn.fhir.rest.api.server.IBundleProvider, ca.uhn.fhir.rest.api.server.IRestfulServer<JaxRsRequest>, ca.uhn.fhir.rest.server.IRestfulServerDefaults

@Produces({"application/json","application/xml","text/plain"}) @Consumes({"application/x-www-form-urlencoded","application/json","application/json+fhir","application/xml+fhir"}) public abstract class AbstractJaxRsBundleProvider extends AbstractJaxRsProvider implements ca.uhn.fhir.rest.api.server.IRestfulServer<JaxRsRequest>, ca.uhn.fhir.rest.api.server.IBundleProvider
This server is the abstract superclass for all bundle providers. It exposes a large amount of the fhir api functionality using JAXRS
Author:
Peter Van Houte | peter.vanhoute@agfa.com | Agfa Healthcare
  • Constructor Details

    • AbstractJaxRsBundleProvider

      The default constructor. The method bindings are retrieved from the class being constructed.
    • AbstractJaxRsBundleProvider

      protected AbstractJaxRsBundleProvider(ca.uhn.fhir.context.FhirContext ctx)
      Provides the ability to specify the FhirContext.
      Parameters:
      ctx - the FhirContext instance.
    • AbstractJaxRsBundleProvider

      protected AbstractJaxRsBundleProvider(Class<? extends AbstractJaxRsProvider> theProviderClass)
      This constructor takes in an explicit interface class. This subclass should be identical to the class being constructed but is given explicitly in order to avoid issues with proxy classes in a jee environment.
      Parameters:
      theProviderClass - the interface of the class
  • Method Details

    • create

      @POST public javax.ws.rs.core.Response create(String resource) throws IOException
      Create all resources in one transaction
      Parameters:
      resource - the body of the post method containing the bundle of the resources being created in a xml/json form
      Returns:
      the response
      Throws:
      IOException
      See Also:
      https://www.hl7. org/fhir/http.html#create
    • search

      @GET public javax.ws.rs.core.Response search() throws IOException
      Search the resource type based on some filter criteria
      Returns:
      the response
      Throws:
      IOException
      See Also:
      https://www.hl7.org/fhir/http.html#search
    • getBinding

      protected ca.uhn.fhir.rest.server.method.BaseMethodBinding<?> getBinding(ca.uhn.fhir.rest.api.RestOperationTypeEnum restOperation, String theBindingKey)
      Return the method binding for the given rest operation
      Parameters:
      restOperation - the rest operation to retrieve
      theBindingKey - the key determining the method to be executed (needed for e.g. custom operation)
      Returns:
    • getInterceptors_

      public List<ca.uhn.fhir.rest.server.interceptor.IServerInterceptor> getInterceptors_()
      Default: an empty list of interceptors
      Specified by:
      getInterceptors_ in interface ca.uhn.fhir.rest.server.IRestfulServerDefaults
      Overrides:
      getInterceptors_ in class AbstractJaxRsProvider
      See Also:
      IRestfulServerDefaults.getInterceptors_()
    • getPagingProvider

      public ca.uhn.fhir.rest.server.IPagingProvider getPagingProvider()
      Default: no paging provider
      Specified by:
      getPagingProvider in interface ca.uhn.fhir.rest.api.server.IRestfulServer<JaxRsRequest>
      Specified by:
      getPagingProvider in interface ca.uhn.fhir.rest.server.IRestfulServerDefaults
      Overrides:
      getPagingProvider in class AbstractJaxRsProvider
    • getBundleInclusionRule

      public ca.uhn.fhir.context.api.BundleInclusionRule getBundleInclusionRule()
      Default: BundleInclusionRule.BASED_ON_INCLUDES
      Specified by:
      getBundleInclusionRule in interface ca.uhn.fhir.rest.api.server.IRestfulServer<JaxRsRequest>
    • getBindings

      Return the bindings defined in this resource provider
      Returns:
      the jax-rs method bindings