Tabnine Logo
ca.uhn.fhir.rest.server
Code IndexAdd Tabnine to your IDE (free)

How to use ca.uhn.fhir.rest.server

Best Java code snippets using ca.uhn.fhir.rest.server (Showing top 20 results out of 315)

origin: jamesagnew/hapi-fhir

@Override
public String determineServerBase(ServletContext theServletContext, HttpServletRequest theRequest) {
  String forwardedHost = getForwardedHost(theRequest);
  if (forwardedHost != null) {
    return forwardedServerBase(theServletContext, theRequest, forwardedHost);
  }
  return super.determineServerBase(theServletContext, theRequest);
}
origin: jamesagnew/hapi-fhir

public static EncodingEnum determineRequestEncodingNoDefault(RequestDetails theReq) {
  ResponseEncoding retVal = determineRequestEncodingNoDefaultReturnRE(theReq);
  if (retVal == null) {
    return null;
  }
  return retVal.getEncoding();
}
origin: jamesagnew/hapi-fhir

  /**
   * Static factory for instance using <code>https://</code>
   */
  public static ApacheProxyAddressStrategy forHttps() {
    return new ApacheProxyAddressStrategy(true);
  }
}
origin: jamesagnew/hapi-fhir

/**
 * Returns the method bindings for this server which are not specific to any particular resource type. This method is
 * internal to HAPI and developers generally do not need to interact with it. Use
 * with caution, as it may change.
 */
public List<BaseMethodBinding<?>> getServerBindings() {
  return myServerBinding.getMethodBindings();
}
origin: jamesagnew/hapi-fhir

  private String getServerBase(ServletRequestDetails theHttpRequest) {
    return myRestfulServer.getServerBaseForRequest(theHttpRequest);
  }
}
origin: jamesagnew/hapi-fhir

  public static IBundleProvider newList(List<IBaseResource> theResources) {
    return new SimpleBundleProvider(theResources);
  }
}
origin: jamesagnew/hapi-fhir

/**
 * Determine whether a response should be given in JSON or XML format based on the incoming HttpServletRequest's
 * <code>"_format"</code> parameter and <code>"Accept:"</code> HTTP header.
 */
public static ResponseEncoding determineResponseEncodingWithDefault(RequestDetails theReq) {
  ResponseEncoding retVal = determineResponseEncodingNoDefault(theReq, theReq.getServer().getDefaultResponseEncoding());
  if (retVal == null) {
    retVal = new ResponseEncoding(theReq.getServer().getFhirContext(), theReq.getServer().getDefaultResponseEncoding(), null);
  }
  return retVal;
}
origin: jamesagnew/hapi-fhir

public static String createPagingLink(Set<Include> theIncludes, String theServerBase, String theSearchId, int theOffset, int theCount, Map<String, String[]> theRequestParameters, boolean thePrettyPrint,
                         BundleTypeEnum theBundleType) {
  return createPagingLink(theIncludes, theServerBase, theSearchId, theOffset, theCount, theRequestParameters, thePrettyPrint,
    theBundleType, null);
}
origin: jamesagnew/hapi-fhir

  @Override
  public void customize(RestfulServer server) {
    server.setPlainProviders(systemProviders);
  }
}
origin: jamesagnew/hapi-fhir

@Override
public final Object streamResponseAsResource(IBaseResource theResource, boolean thePrettyPrint, Set<SummaryEnum> theSummaryMode,
    int theStatusCode, String theStatusMessage, boolean theRespondGzip, boolean theAddContentLocation)
        throws IOException {
  return RestfulServerUtils.streamResponseAsResource(theRequestDetails.getServer(), theResource, theSummaryMode, theStatusCode, theStatusMessage, theAddContentLocation, theRespondGzip, getRequestDetails(), myOperationResourceId, myOperationResourceLastUpdated);
}
origin: jamesagnew/hapi-fhir

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  handleRequest(RequestTypeEnum.GET, request, response);
}
origin: jamesagnew/hapi-fhir

@Override
public BundleProviderWithNamedPages setSize(Integer theSize) {
  super.setSize(theSize);
  return this;
}
origin: jamesagnew/hapi-fhir

/**
 * @TODO: this method is only called from one place and should be removed anyway
 */
public static EncodingEnum determineRequestEncoding(RequestDetails theReq) {
  EncodingEnum retVal = determineRequestEncodingNoDefault(theReq);
  if (retVal != null) {
    return retVal;
  }
  return EncodingEnum.XML;
}
origin: jamesagnew/hapi-fhir

/**
 * Returns null if the request doesn't express that it wants FHIR. If it expresses that it wants XML and JSON
 * equally, returns thePrefer.
 */
public static ResponseEncoding determineResponseEncodingNoDefault(RequestDetails theReq, EncodingEnum thePrefer) {
  return determineResponseEncodingNoDefault(theReq, thePrefer, null);
}
origin: jamesagnew/hapi-fhir

public static Object streamResponseAsResource(IRestfulServerDefaults theServer, IBaseResource theResource, Set<SummaryEnum> theSummaryMode, int stausCode, boolean theAddContentLocationHeader,
                               boolean respondGzip, RequestDetails theRequestDetails) throws IOException {
  return streamResponseAsResource(theServer, theResource, theSummaryMode, stausCode, null, theAddContentLocationHeader, respondGzip, theRequestDetails, null, null);
}
origin: jamesagnew/hapi-fhir

@Override
public List<IBaseResource> getResources(int theFromIndex, int theToIndex) {
  return getList(); // indexes are ignored for this provider type
}
origin: jamesagnew/hapi-fhir

  private String getServerBase(ServletRequestDetails theHttpRequest) {
    return myRestfulServer.getServerBaseForRequest(theHttpRequest);
  }
}
origin: jamesagnew/hapi-fhir

public static String createPagingLink(Set<Include> theIncludes, String theServerBase, String theSearchId, String thePageId, Map<String, String[]> theRequestParameters, boolean thePrettyPrint,
                         BundleTypeEnum theBundleType) {
  return createPagingLink(theIncludes, theServerBase, theSearchId, null, null, theRequestParameters, thePrettyPrint,
    theBundleType, thePageId);
}
origin: jamesagnew/hapi-fhir

/**
 * Static factory for instance using <code>http://</code>
 */
public static ApacheProxyAddressStrategy forHttp() {
  return new ApacheProxyAddressStrategy(false);
}
origin: jamesagnew/hapi-fhir

@Override
protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  handleRequest(RequestTypeEnum.DELETE, request, response);
}
ca.uhn.fhir.rest.server

Most used classes

  • InternalErrorException
    Represents an HTTP 500 Internal Error response. This status indicates that the server failed to succ
  • InvalidRequestException
    Represents an HTTP 400 Bad Request response. This status indicates that the client's message was inv
  • ResourceNotFoundException
    Represents an HTTP 404 Resource Not Found response, which means that the request is pointing to a re
  • RestfulServer
  • BaseServerResponseException
    Base class for RESTful client and server exceptions. RESTful client methods will only throw exceptio
  • IServerAddressStrategy,
  • ResourceBinding,
  • RestulfulServerConfiguration,
  • BaseMethodBinding,
  • OperationMethodBinding,
  • SearchMethodBinding,
  • PreconditionFailedException,
  • OperationMethodBinding$ReturnType,
  • OperationParameter,
  • SearchParameter,
  • RestfulServerUtils,
  • ResponseHighlighterInterceptor,
  • SimpleBundleProvider,
  • MethodNotAllowedException
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now