
Package ca.uhn.fhir.rest.server.provider
Class ServerCapabilityStatementProvider
java.lang.Object
ca.uhn.fhir.rest.server.provider.ServerCapabilityStatementProvider
- All Implemented Interfaces:
IServerConformanceProvider<org.hl7.fhir.instance.model.api.IBaseConformance>
public class ServerCapabilityStatementProvider
extends Object
implements IServerConformanceProvider<org.hl7.fhir.instance.model.api.IBaseConformance>
Server FHIR Provider which serves the conformance statement for a RESTful server implementation
This class is version independent, but will only work on servers supporting FHIR R4+ (as this was the first FHIR release where CapabilityStatement was a normative resource)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServerCapabilityStatementProvider(ca.uhn.fhir.context.FhirContext theContext, RestfulServerConfiguration theServerConfiguration) ConstructorServerCapabilityStatementProvider(RestfulServer theServer) ConstructorServerCapabilityStatementProvider(RestfulServer theRestfulServer, ISearchParamRegistry theSearchParamRegistry, ca.uhn.fhir.context.support.IValidationSupport theValidationSupport) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetOperationDefinitionPrefix(RequestDetails theRequestDetails) Gets the value of the "publisher" that will be placed in the generated conformance statement.org.hl7.fhir.instance.model.api.IBaseConformancegetServerConformance(jakarta.servlet.http.HttpServletRequest theRequest, RequestDetails theRequestDetails) Actually create and return the conformance statement See the class documentation for an important note if you are extending this classprotected voidpostProcess(ca.uhn.fhir.util.FhirTerser theTerser, org.hl7.fhir.instance.model.api.IBaseConformance theCapabilityStatement) Subclasses may overrideprotected voidpostProcessRest(ca.uhn.fhir.util.FhirTerser theTerser, org.hl7.fhir.instance.model.api.IBase theRest) Subclasses may overrideprotected voidpostProcessRestResource(ca.uhn.fhir.util.FhirTerser theTerser, org.hl7.fhir.instance.model.api.IBase theResource, String theResourceName) Subclasses may overrideorg.hl7.fhir.instance.model.api.IBaseResourcereadOperationDefinition(org.hl7.fhir.instance.model.api.IIdType theId, RequestDetails theRequestDetails) protected booleansearchParamEnabled(String theResourceName, String theSearchParam) voidsetPublisher(String thePublisher) Sets the value of the "publisher" that will be placed in the generated conformance statement.voidsetRestfulServer(RestfulServer theRestfulServer) This setter is needed in implementation classes (along with a no-arg constructor) to avoid reference cycles in the Spring wiring of a RestfulServer instance.voidsetRestResourceRevIncludesEnabled(boolean theRestResourceRevIncludesEnabled)
-
Field Details
-
DEFAULT_REST_RESOURCE_REV_INCLUDES_ENABLED
- See Also:
-
-
Constructor Details
-
ServerCapabilityStatementProvider
Constructor -
ServerCapabilityStatementProvider
public ServerCapabilityStatementProvider(ca.uhn.fhir.context.FhirContext theContext, RestfulServerConfiguration theServerConfiguration) Constructor -
ServerCapabilityStatementProvider
public ServerCapabilityStatementProvider(RestfulServer theRestfulServer, ISearchParamRegistry theSearchParamRegistry, ca.uhn.fhir.context.support.IValidationSupport theValidationSupport) Constructor
-
-
Method Details
-
getPublisher
Gets the value of the "publisher" that will be placed in the generated conformance statement. As this is a mandatory element, the value should not be null (although this is not enforced). The value defaults to "Not provided" but may be set to null, which will cause this element to be omitted. -
setPublisher
Sets the value of the "publisher" that will be placed in the generated conformance statement. As this is a mandatory element, the value should not be null (although this is not enforced). The value defaults to "Not provided" but may be set to null, which will cause this element to be omitted. -
getServerConformance
public org.hl7.fhir.instance.model.api.IBaseConformance getServerConformance(jakarta.servlet.http.HttpServletRequest theRequest, RequestDetails theRequestDetails) Description copied from interface:IServerConformanceProviderActually create and return the conformance statement See the class documentation for an important note if you are extending this class- Specified by:
getServerConformancein interfaceIServerConformanceProvider<org.hl7.fhir.instance.model.api.IBaseConformance>
-
searchParamEnabled
- Parameters:
theSearchParam-- Returns:
- true if theSearchParam is enabled on this server
-
postProcess
protected void postProcess(ca.uhn.fhir.util.FhirTerser theTerser, org.hl7.fhir.instance.model.api.IBaseConformance theCapabilityStatement) Subclasses may override -
postProcessRest
protected void postProcessRest(ca.uhn.fhir.util.FhirTerser theTerser, org.hl7.fhir.instance.model.api.IBase theRest) Subclasses may override -
postProcessRestResource
protected void postProcessRestResource(ca.uhn.fhir.util.FhirTerser theTerser, org.hl7.fhir.instance.model.api.IBase theResource, String theResourceName) Subclasses may override -
getOperationDefinitionPrefix
-
readOperationDefinition
public org.hl7.fhir.instance.model.api.IBaseResource readOperationDefinition(org.hl7.fhir.instance.model.api.IIdType theId, RequestDetails theRequestDetails) - Specified by:
readOperationDefinitionin interfaceIServerConformanceProvider<org.hl7.fhir.instance.model.api.IBaseConformance>
-
setRestfulServer
Description copied from interface:IServerConformanceProviderThis setter is needed in implementation classes (along with a no-arg constructor) to avoid reference cycles in the Spring wiring of a RestfulServer instance.- Specified by:
setRestfulServerin interfaceIServerConformanceProvider<org.hl7.fhir.instance.model.api.IBaseConformance>- Parameters:
theRestfulServer-
-
setRestResourceRevIncludesEnabled
-