Class FHIROperationContext
- java.lang.Object
-
- com.ibm.fhir.server.operation.spi.FHIROperationContext
-
public class FHIROperationContext extends Object
This class holds context information for custom operation invocations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FHIROperationContext.Type
-
Field Summary
Fields Modifier and Type Field Description static 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.static String
PROPNAME_HTTP_REQUEST
The property is of the Http Request objectstatic String
PROPNAME_LOCATION_URI
This property is of type String and represents the value of the Location header.static String
PROPNAME_METHOD_TYPE
This property is of type HttpMethodstatic 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.static String
PROPNAME_REQUEST_BASE_URI
This property is of type String and represents the base URI string (e.g.static String
PROPNAME_RESPONSE
The property is of the Responsestatic 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.static String
PROPNAME_STATUS_TYPE
The property is of Response.Status.static 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FHIROperationContext
createInstanceOperationContext()
static FHIROperationContext
createResourceTypeOperationContext()
static FHIROperationContext
createSystemOperationContext()
String
getHeaderString(String headerName)
Retrieves the specified header from the list of request headers.javax.ws.rs.core.HttpHeaders
getHttpHeaders()
Returns the HttpHeaders instance associated with the request that triggered the operation.Object
getProperty(String name)
FHIROperationContext.Type
getType()
void
setProperty(String name, Object value)
String
toString()
-
-
-
Field Detail
-
PROPNAME_REQUEST_BASE_URI
public static final 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 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 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 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 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 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 String PROPNAME_METHOD_TYPE
This property is of type HttpMethod- See Also:
- Constant Field Values
-
PROPNAME_STATUS_TYPE
public static final String PROPNAME_STATUS_TYPE
The property is of Response.Status.- See Also:
- Constant Field Values
-
PROPNAME_RESPONSE
public static final String PROPNAME_RESPONSE
The property is of the Response- See Also:
- Constant Field Values
-
PROPNAME_HTTP_REQUEST
public static final String PROPNAME_HTTP_REQUEST
The property is of the Http Request object- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
public FHIROperationContext.Type getType()
-
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()
-
createResourceTypeOperationContext
public static FHIROperationContext createResourceTypeOperationContext()
-
createInstanceOperationContext
public static FHIROperationContext createInstanceOperationContext()
-
getHeaderString
public String getHeaderString(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
-
-