public abstract class AbstractJaxRsProvider extends Object implements IRestfulServerDefaults
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractJaxRsProvider()
Default is DSTU2.
|
protected |
AbstractJaxRsProvider(FhirContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
AddProfileTagEnum |
getAddProfileTag()
DEFAULT = AddProfileTagEnum.NEVER
|
String |
getBaseForRequest()
This method returns the server base, including the resource path.
|
String |
getBaseForServer()
This method returns the server base, independent of the request or resource.
|
EncodingEnum |
getDefaultResponseEncoding()
DEFAULT = EncodingEnum.JSON
|
ETagSupportEnum |
getETagSupport()
DEFAULT = ETagSupportEnum.DISABLED
|
FhirContext |
getFhirContext() |
javax.ws.rs.core.HttpHeaders |
getHeaders()
Get the headers
|
List<IServerInterceptor> |
getInterceptors()
Default: an empty list of interceptors (Interceptors are not yet supported
in the JAX-RS server).
|
Map<String,String[]> |
getParameters()
This method returns the query parameters
|
JaxRsRequest.Builder |
getRequest(RequestTypeEnum requestType,
RestOperationTypeEnum restOperation)
Return the requestbuilder for the server
|
JaxRsRequest.Builder |
getRequest(RequestTypeEnum requestType,
RestOperationTypeEnum restOperation,
String theResourceName)
Return the requestbuilder for the server
|
IServerAddressStrategy |
getServerAddressStrategy()
This method returns the default server address strategy.
|
javax.ws.rs.core.UriInfo |
getUriInfo()
Get the uriInfo
|
javax.ws.rs.core.Response |
handleException(JaxRsRequest theRequest,
Throwable theException)
Convert an exception to a response
|
boolean |
isDefaultPrettyPrint()
DEFAULT = true
|
boolean |
isUseBrowserFriendlyContentTypes()
DEFAULT = false
|
void |
setHeaders(javax.ws.rs.core.HttpHeaders headers)
Set the headers
|
void |
setUriInfo(javax.ws.rs.core.UriInfo uriInfo)
Set the Uri Info
|
boolean |
withStackTrace()
DEFAULT = false
|
protected AbstractJaxRsProvider()
AbstractJaxRsProvider(FhirContext) to specify a DSTU3 context.protected AbstractJaxRsProvider(FhirContext ctx)
ctx - the FhirContext to support.public FhirContext getFhirContext()
getFhirContext in interface IRestfulServerDefaultspublic Map<String,String[]> getParameters()
public IServerAddressStrategy getServerAddressStrategy()
getBaseForRequest()public String getBaseForServer()
UriInfo.getBaseUri()public String getBaseForRequest()
UriInfo#getBaseUri()public List<IServerInterceptor> getInterceptors()
getInterceptors in interface IRestfulServerDefaultsIRestfulServerDefaults.getInterceptors()public javax.ws.rs.core.UriInfo getUriInfo()
public void setUriInfo(javax.ws.rs.core.UriInfo uriInfo)
uriInfo - the uri infopublic javax.ws.rs.core.HttpHeaders getHeaders()
public void setHeaders(javax.ws.rs.core.HttpHeaders headers)
headers - the headers to setpublic JaxRsRequest.Builder getRequest(RequestTypeEnum requestType, RestOperationTypeEnum restOperation, String theResourceName)
requestType - the type of the requestrestOperation - the rest operation typetheResourceName - the resource namepublic JaxRsRequest.Builder getRequest(RequestTypeEnum requestType, RestOperationTypeEnum restOperation)
requestType - the type of the requestrestOperation - the rest operation typepublic EncodingEnum getDefaultResponseEncoding()
getDefaultResponseEncoding in interface IRestfulServerDefaultspublic boolean isDefaultPrettyPrint()
isDefaultPrettyPrint in interface IRestfulServerDefaultspublic ETagSupportEnum getETagSupport()
getETagSupport in interface IRestfulServerDefaultspublic AddProfileTagEnum getAddProfileTag()
getAddProfileTag in interface IRestfulServerDefaultspublic boolean isUseBrowserFriendlyContentTypes()
isUseBrowserFriendlyContentTypes in interface IRestfulServerDefaultspublic boolean withStackTrace()
public javax.ws.rs.core.Response handleException(JaxRsRequest theRequest, Throwable theException) throws IOException
theRequest - the incoming requesttheException - the exception to convertIOExceptionCopyright © 2014–2016 University Health Network. All rights reserved.