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
-
Constructor Summary
ConstructorDescriptionServerCapabilityStatementProvider
(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 String
getOperationDefinitionPrefix
(RequestDetails theRequestDetails) Gets the value of the "publisher" that will be placed in the generated conformance statement.org.hl7.fhir.instance.model.api.IBaseConformance
getServerConformance
(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 void
postProcess
(ca.uhn.fhir.util.FhirTerser theTerser, org.hl7.fhir.instance.model.api.IBaseConformance theCapabilityStatement) Subclasses may overrideprotected void
postProcessRest
(ca.uhn.fhir.util.FhirTerser theTerser, org.hl7.fhir.instance.model.api.IBase theRest) Subclasses may overrideprotected void
postProcessRestResource
(ca.uhn.fhir.util.FhirTerser theTerser, org.hl7.fhir.instance.model.api.IBase theResource, String theResourceName) Subclasses may overrideorg.hl7.fhir.instance.model.api.IBaseResource
readOperationDefinition
(org.hl7.fhir.instance.model.api.IIdType theId, RequestDetails theRequestDetails) protected boolean
searchParamEnabled
(String theSearchParam) void
setPublisher
(String thePublisher) Sets the value of the "publisher" that will be placed in the generated conformance statement.void
setRestfulServer
(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.void
setRestResourceRevIncludesEnabled
(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:IServerConformanceProvider
Actually create and return the conformance statement See the class documentation for an important note if you are extending this class- Specified by:
getServerConformance
in 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:
readOperationDefinition
in interfaceIServerConformanceProvider<org.hl7.fhir.instance.model.api.IBaseConformance>
-
setRestfulServer
Description copied from interface:IServerConformanceProvider
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.- Specified by:
setRestfulServer
in interfaceIServerConformanceProvider<org.hl7.fhir.instance.model.api.IBaseConformance>
- Parameters:
theRestfulServer
-
-
setRestResourceRevIncludesEnabled
-