Class FHIROperationContext


  • public class FHIROperationContext
    extends java.lang.Object
    This class holds context information for custom operation invocations.
    • Field Detail

      • PROPNAME_REQUEST_BASE_URI

        public static final java.lang.String PROPNAME_REQUEST_BASE_URI
        This property is of type String and represents the base URI string (e.g. "https://localhost:9443/fhir-server/api/v4") associated with the request.
        See Also:
        Constant Field Values
      • PROPNAME_LOCATION_URI

        public static final java.lang.String PROPNAME_LOCATION_URI
        This property is of type String and represents the value of the Location header.
        See Also:
        Constant Field Values
      • PROPNAME_PERSISTENCE_IMPL

        public static final java.lang.String PROPNAME_PERSISTENCE_IMPL
        This property is of type FHIRPersistence and is the handle to the persistence layer implementation being used by the FHIR Server while processing the current request. It is recommended that custom operation implementors use the RESOURCE_HELPER property instead of this property unless you have been advised otherwise.
        See Also:
        Constant Field Values
      • PROPNAME_URI_INFO

        public static final java.lang.String PROPNAME_URI_INFO
        This property is of type javax.ws.rs.core.UriInfo and contains Application and Request URI information associated with the REST API request for which the interceptor is being invoked.
        See Also:
        Constant Field Values
      • PROPNAME_HTTP_HEADERS

        public static final java.lang.String PROPNAME_HTTP_HEADERS
        This property is of type javax.ws.rs.core.HttpHeaders and contains the set of HTTP headers associated with the REST API request.
        See Also:
        Constant Field Values
      • PROPNAME_SECURITY_CONTEXT

        public static final java.lang.String PROPNAME_SECURITY_CONTEXT
        This property is of type javax.ws.rs.core.SecurityContext and contains security-related information associated with the REST API request for which the interceptor is being invoked.
        See Also:
        Constant Field Values
      • PROPNAME_METHOD_TYPE

        public static final java.lang.String PROPNAME_METHOD_TYPE
        This property is of type HttpMethod
        See Also:
        Constant Field Values
      • PROPNAME_STATUS_TYPE

        public static final java.lang.String PROPNAME_STATUS_TYPE
        The property is of Response.Status.
        See Also:
        Constant Field Values
      • PROPNAME_RESPONSE

        public static final java.lang.String PROPNAME_RESPONSE
        The property is of the Response
        See Also:
        Constant Field Values
      • PROPNAME_HTTP_REQUEST

        public static final java.lang.String PROPNAME_HTTP_REQUEST
        The property is of the Http Request object
        See Also:
        Constant Field Values
      • PROPNAME_REQUEST_PARAMETERS

        public static final java.lang.String PROPNAME_REQUEST_PARAMETERS
        The request parameters for this invocation
        See Also:
        Constant Field Values
      • PROPNAME_RESPONSE_PARAMETERS

        public static final java.lang.String PROPNAME_RESPONSE_PARAMETERS
        The response parameters for this invocation
        See Also:
        Constant Field Values
    • Method Detail

      • getOperationCode

        public java.lang.String getOperationCode()
      • setProperty

        public void setProperty​(java.lang.String name,
                                java.lang.Object value)
      • getProperty

        public java.lang.Object getProperty​(java.lang.String name)
      • getHttpHeaders

        public javax.ws.rs.core.HttpHeaders getHttpHeaders()
        Returns the HttpHeaders instance associated with the request that triggered the operation. Note that this HttpHeaders instance is only valid within the scope of a single request.
      • createSystemOperationContext

        public static FHIROperationContext createSystemOperationContext​(java.lang.String operationCode)
      • createResourceTypeOperationContext

        public static FHIROperationContext createResourceTypeOperationContext​(java.lang.String operationCode)
      • createInstanceOperationContext

        public static FHIROperationContext createInstanceOperationContext​(java.lang.String operationCode)
      • getHeaderString

        public java.lang.String getHeaderString​(java.lang.String headerName)
        Retrieves the specified header from the list of request headers.
        Parameters:
        headerName - the name of the header to retrieve
        Returns:
        the value of the request header or null if not present
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object