
Package ca.uhn.fhir.rest.api.server
Class SystemRequestDetails
java.lang.Object
ca.uhn.fhir.rest.api.server.RequestDetails
ca.uhn.fhir.rest.api.server.SystemRequestDetails
A default RequestDetails implementation that can be used for system calls to
Resource DAO methods when partitioning is enabled. Using a SystemRequestDetails
instance for system calls will ensure that any resource queries or updates will
use the DEFAULT partition when partitioning is enabled.
-
Field Summary
Fields inherited from class ca.uhn.fhir.rest.api.server.RequestDetails
BAD_STREAM_PLACEHOLDER -
Constructor Summary
ConstructorsConstructorDescriptionSystemRequestDetails(ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster theInterceptorBroadcaster) SystemRequestDetails(RequestDetails theDetails) SystemRequestDetails(SystemRequestDetails theOther) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new headerstatic SystemRequestDetailsstatic SystemRequestDetailsforRequestPartitionId(ca.uhn.fhir.interceptor.model.RequestPartitionId thePartitionId) protected byte[]Return the charset as defined by the header contenttype.ca.uhn.fhir.context.FhirContextReturns the HAPI FHIR Context associated with this requestgetHeaders(String name) Retrieves the body of the request as binary data.Retrieves the body of the request as character data using aBufferedReader.ca.uhn.fhir.interceptor.model.RequestPartitionIdReturns the server base URL (with no trailing '/') for a given requeststatic SystemRequestDetailsvoidsetFhirContext(ca.uhn.fhir.context.FhirContext theFhirContext) voidsetHeaders(String theName, List<String> theValues) Replaces any existing header(s) with the given name using a List of new header valuessetRequestPartitionId(ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId) voidsetServer(RestfulServer theServer) Methods inherited from class ca.uhn.fhir.rest.api.server.RequestDetails
addParameter, getAttribute, getCompartmentName, getCompleteUrl, getConditionalUrl, getFhirServerBase, getFixedConditionalUrl, getId, getInterceptorBroadcaster, getMaxRetries, getOperation, getParameters, getRequestContentsIfLoaded, getRequestId, getRequestPath, getRequestStopwatch, getRequestType, getResource, getResourceName, getResponse, getRestOperationType, getSecondaryOperation, getTenantId, getTransactionGuid, getUnqualifiedToQualifiedNames, getUserData, isPreferAsync, isRespondGzip, isRetry, isRewriteHistory, isSubRequest, loadRequestContents, removeParameter, setAttribute, setCompartmentName, setCompleteUrl, setFhirServerBase, setFixedConditionalUrl, setId, setMaxRetries, setOperation, setParameters, setRequestContents, setRequestId, setRequestPath, setRequestType, setResource, setResourceName, setRespondGzip, setResponse, setRestOperationType, setRetry, setRewriteHistory, setSecondaryOperation, setSubRequest, setTenantId, setTransactionGuid
-
Constructor Details
-
SystemRequestDetails
public SystemRequestDetails() -
SystemRequestDetails
public SystemRequestDetails(ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster theInterceptorBroadcaster) -
SystemRequestDetails
-
SystemRequestDetails
Copy constructor- Parameters:
theOther- The request details to copy from
-
-
Method Details
-
forRequestPartitionId
public static SystemRequestDetails forRequestPartitionId(ca.uhn.fhir.interceptor.model.RequestPartitionId thePartitionId) -
getRequestPartitionId
-
setRequestPartitionId
public SystemRequestDetails setRequestPartitionId(ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId) -
getByteStreamRequestContents
- Specified by:
getByteStreamRequestContentsin classRequestDetails
-
getCharset
Description copied from class:RequestDetailsReturn the charset as defined by the header contenttype. Return null if it is not set.- Specified by:
getCharsetin classRequestDetails
-
getFhirContext
Description copied from class:RequestDetailsReturns the HAPI FHIR Context associated with this request- Specified by:
getFhirContextin classRequestDetails
-
setFhirContext
-
getHeader
- Specified by:
getHeaderin classRequestDetails
-
getHeaders
- Specified by:
getHeadersin classRequestDetails
-
addHeader
Description copied from class:RequestDetailsAdds a new header- Specified by:
addHeaderin classRequestDetails- Parameters:
theName- The header nametheValue- The header value
-
setHeaders
Description copied from class:RequestDetailsReplaces any existing header(s) with the given name using a List of new header values- Specified by:
setHeadersin classRequestDetails- Parameters:
theName- The header nametheValues- The header value
-
getInputStream
Description copied from class:RequestDetailsRetrieves the body of the request as binary data. Either this method orRequestDetails.getReader()may be called to read the body, not both.- Specified by:
getInputStreamin classRequestDetails- Returns:
- a
InputStreamobject containing the body of the request - Throws:
IOException- if an input or output exception occurred
-
getReader
Description copied from class:RequestDetailsRetrieves the body of the request as character data using aBufferedReader. The reader translates the character data according to the character encoding used on the body. Either this method orRequestDetails.getInputStream()may be called to read the body, not both.- Specified by:
getReaderin classRequestDetails- Returns:
- a
Readercontaining the body of the request - See Also:
-
getServer
- Specified by:
getServerin classRequestDetails
-
setServer
-
getServerBaseForRequest
Description copied from class:RequestDetailsReturns the server base URL (with no trailing '/') for a given request- Specified by:
getServerBaseForRequestin classRequestDetails
-
forAllPartitions
-
newSystemRequestAllPartitions
-