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
ModifierConstructorDescriptionprotected
The default constructor.protected
AbstractJaxRsBundleProvider
(ca.uhn.fhir.context.FhirContext ctx) Provides the ability to specify theFhirContext
.protected
AbstractJaxRsBundleProvider
(Class<? extends AbstractJaxRsProvider> theProviderClass) This constructor takes in an explicit interface class. -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
Create all resources in one transactionprotected 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 operationReturn the bindings defined in this resource providerca.uhn.fhir.context.api.BundleInclusionRule
Default: BundleInclusionRule.BASED_ON_INCLUDESList
<ca.uhn.fhir.rest.server.interceptor.IServerInterceptor> Default: an empty list of interceptorsca.uhn.fhir.rest.server.IPagingProvider
Default: no paging providerjakarta.ws.rs.core.Response
search()
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, withStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ca.uhn.fhir.rest.api.server.IBundleProvider
getAllResourceIds, getAllResources, getCurrentPageId, getCurrentPageOffset, getCurrentPageSize, getNextPageId, getPreviousPageId, getPublished, getResources, getResources, getUuid, isEmpty, preferredPageSize, size, sizeOrThrowNpe
Methods inherited from interface ca.uhn.fhir.rest.api.server.IRestfulServer
canStoreSearchResults, getDefaultPreferReturn
Methods 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
- theFhirContext
instance.
-
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:
getPagingProvider
in interfaceca.uhn.fhir.rest.api.server.IRestfulServer<JaxRsRequest>
- Specified by:
getPagingProvider
in interfaceca.uhn.fhir.rest.server.IRestfulServerDefaults
- Overrides:
getPagingProvider
in classAbstractJaxRsProvider
-
getBundleInclusionRule
Default: BundleInclusionRule.BASED_ON_INCLUDES- Specified by:
getBundleInclusionRule
in interfaceca.uhn.fhir.rest.api.server.IRestfulServer<JaxRsRequest>
-
getBindings
Return the bindings defined in this resource provider- Returns:
- the jax-rs method bindings
-