Class ResponseHighlighterInterceptor
- Since:
- 1.0
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
capabilityStatementGenerated
(RequestDetails theRequestDetails, org.hl7.fhir.instance.model.api.IBaseConformance theCapabilityStatement) boolean
handleException
(RequestDetails theRequestDetails, ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException theException, jakarta.servlet.http.HttpServletRequest theServletRequest, jakarta.servlet.http.HttpServletResponse theServletResponse) boolean
If set to true (default is true), if the response is a FHIR resource, and that resource includes a Narrative, the narrative will be rendered in the HTML response page as actual rendered HTML.boolean
If set totrue
(default isfalse
) response will include the request headersboolean
If set totrue
(default istrue
) response will include the response headersboolean
outgoingGraphqlResponse
(RequestDetails theRequestDetails, String theRequest, String theResponse, jakarta.servlet.http.HttpServletRequest theServletRequest, jakarta.servlet.http.HttpServletResponse theServletResponse) boolean
outgoingResponse
(RequestDetails theRequestDetails, ResponseDetails theResponseObject, jakarta.servlet.http.HttpServletRequest theServletRequest, jakarta.servlet.http.HttpServletResponse theServletResponse) void
setShowNarrative
(boolean theShowNarrative) If set to true (default is true), if the response is a FHIR resource, and that resource includes a Narrative, the narrative will be rendered in the HTML response page as actual rendered HTML.setShowRequestHeaders
(boolean theShowRequestHeaders) If set totrue
(default isfalse
) response will include the request headerssetShowResponseHeaders
(boolean theShowResponseHeaders) If set totrue
(default istrue
) response will include the response headers
-
Field Details
-
PARAM_RAW
TODO: As of HAPI 1.6 (2016-06-10) this parameter has been replaced with simply requesting _format=json or xml so eventually this parameter should be removed- See Also:
-
PARAM_RAW_TRUE
- See Also:
-
-
Constructor Details
-
ResponseHighlighterInterceptor
public ResponseHighlighterInterceptor()Constructor
-
-
Method Details
-
handleException
public boolean handleException(RequestDetails theRequestDetails, ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException theException, jakarta.servlet.http.HttpServletRequest theServletRequest, jakarta.servlet.http.HttpServletResponse theServletResponse) -
isShowRequestHeaders
If set totrue
(default isfalse
) response will include the request headers -
setShowRequestHeaders
If set totrue
(default isfalse
) response will include the request headers- Returns:
- Returns a reference to this for easy method chaining
-
isShowResponseHeaders
If set totrue
(default istrue
) response will include the response headers -
setShowResponseHeaders
If set totrue
(default istrue
) response will include the response headers- Returns:
- Returns a reference to this for easy method chaining
-
outgoingGraphqlResponse
public boolean outgoingGraphqlResponse(RequestDetails theRequestDetails, String theRequest, String theResponse, jakarta.servlet.http.HttpServletRequest theServletRequest, jakarta.servlet.http.HttpServletResponse theServletResponse) throws ca.uhn.fhir.rest.server.exceptions.AuthenticationException - Throws:
ca.uhn.fhir.rest.server.exceptions.AuthenticationException
-
outgoingResponse
public boolean outgoingResponse(RequestDetails theRequestDetails, ResponseDetails theResponseObject, jakarta.servlet.http.HttpServletRequest theServletRequest, jakarta.servlet.http.HttpServletResponse theServletResponse) throws ca.uhn.fhir.rest.server.exceptions.AuthenticationException - Throws:
ca.uhn.fhir.rest.server.exceptions.AuthenticationException
-
capabilityStatementGenerated
public void capabilityStatementGenerated(RequestDetails theRequestDetails, org.hl7.fhir.instance.model.api.IBaseConformance theCapabilityStatement) -
isShowNarrative
If set to true (default is true), if the response is a FHIR resource, and that resource includes a Narrative, the narrative will be rendered in the HTML response page as actual rendered HTML.The narrative to be rendered will be sourced from one of 3 possible locations, depending on the resource being returned by the server:
- if the resource is a DomainResource, the narrative in Resource.text will be rendered.
- If the resource is a document bundle, the narrative in the document Composition will be rendered.
- If the resource is a Parameters resource, and the first parameter has the name "Narrative" and a value consisting of a string starting with "invalid input: '<'div", that will be rendered.
In all cases, the narrative is scanned to ensure that it does not contain any tags or attributes that are not explicitly allowed by the FHIR specification in order to prevent active content. If any such tags or attributes are found, the narrative is not rendered and instead a warning is displayed. Note that while this scanning is helpful, it does not completely mitigate the security risks associated with narratives. See FHIR Security: Narrative for more information.
-