
Package ca.uhn.fhir.jaxrs.server
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 Summary
ConstructorsModifierConstructorDescriptionprotectedThe default constructor.protectedAbstractJaxRsBundleProvider(ca.uhn.fhir.context.FhirContext ctx) Provides the ability to specify theFhirContext.protectedAbstractJaxRsBundleProvider(Class<? extends AbstractJaxRsProvider> theProviderClass) This constructor takes in an explicit interface class. -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseCreate all resources in one transactionprotected ca.uhn.fhir.rest.server.method.BaseMethodBindinggetBinding(ca.uhn.fhir.rest.api.RestOperationTypeEnum restOperation, String theBindingKey) Return the method binding for the given rest operationReturn the bindings defined in this resource providerca.uhn.fhir.context.api.BundleInclusionRuleDefault: BundleInclusionRule.BASED_ON_INCLUDESList<ca.uhn.fhir.rest.server.interceptor.IServerInterceptor> Default: an empty list of interceptorsca.uhn.fhir.rest.server.IPagingProviderDefault: no paging providerjakarta.ws.rs.core.Responsesearch()Search the resource type based on some filter criteriaMethods inherited from class ca.uhn.fhir.jaxrs.server.AbstractJaxRsProvider
getAddProfileTag, getBaseForRequest, getBaseForServer, getDefaultResponseEncoding, getElementsSupport, getETagSupport, getFhirContext, getHeaders, getInterceptorService, getParameters, getRequest, getRequest, getServerAddressStrategy, getUriInfo, handleException, isDefaultPrettyPrint, setHeaders, setUriInfo, withStackTraceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ca.uhn.fhir.rest.api.server.IBundleProvider
containsAllResources, getAllResourceIds, getAllResources, getCurrentPageId, getCurrentPageOffset, getCurrentPageSize, getNextPageId, getPreviousPageId, getPublished, getResourceListComplete, getResources, getResources, getUuid, isEmpty, preferredPageSize, size, sizeOrThrowNpeMethods inherited from interface ca.uhn.fhir.rest.api.server.IRestfulServer
canStoreSearchResults, getDefaultPreferReturnMethods inherited from interface ca.uhn.fhir.rest.server.IRestfulServerDefaults
getAddProfileTag, getDefaultPageSize, getDefaultResponseEncoding, getElementsSupport, getETagSupport, getFhirContext, getInterceptorService, getMaximumPageSize, isDefaultPrettyPrint
-
Constructor Details
-
AbstractJaxRsBundleProvider
protected AbstractJaxRsBundleProvider()The default constructor. The method bindings are retrieved from the class being constructed. -
AbstractJaxRsBundleProvider
Provides the ability to specify theFhirContext.- Parameters:
ctx- theFhirContextinstance.
-
AbstractJaxRsBundleProvider
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
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:
-
search
Search the resource type based on some filter criteria- Returns:
- the response
- Throws:
IOException- See Also:
-
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 retrievetheBindingKey- the key determining the method to be executed (needed for e.g. custom operation)- Returns:
-
getInterceptors_
Default: an empty list of interceptors- Specified by:
getInterceptors_in interfaceca.uhn.fhir.rest.server.IRestfulServerDefaults- Overrides:
getInterceptors_in classAbstractJaxRsProvider- See Also:
-
getPagingProvider
Default: no paging provider- Specified by:
getPagingProviderin interfaceca.uhn.fhir.rest.api.server.IRestfulServer<JaxRsRequest>- Specified by:
getPagingProviderin interfaceca.uhn.fhir.rest.server.IRestfulServerDefaults- Overrides:
getPagingProviderin classAbstractJaxRsProvider
-
getBundleInclusionRule
Default: BundleInclusionRule.BASED_ON_INCLUDES- Specified by:
getBundleInclusionRulein interfaceca.uhn.fhir.rest.api.server.IRestfulServer<JaxRsRequest>
-
getBindings
Return the bindings defined in this resource provider- Returns:
- the jax-rs method bindings
-