Package ca.uhn.fhir.rest.method

Examples of ca.uhn.fhir.rest.method.HttpGetClientInvocation


    myContext = theContext;
  }

  @Override
  public Conformance conformance() {
    HttpGetClientInvocation invocation = ConformanceMethodBinding.createConformanceInvocation();
    if (isKeepResponses()) {
      myLastRequest = invocation.asHttpRequest(getServerBase(), createExtraParams(), getEncoding());
    }

    ResourceResponseHandler<Conformance> binding = new ResourceResponseHandler<Conformance>(Conformance.class, null);
    Conformance resp = invokeClient(binding, invocation, myLogRequestAndResponse);
    return resp;
View Full Code Here


  @Override
  public <T extends IResource> Bundle history(final Class<T> theType, IdDt theIdDt, DateTimeDt theSince, Integer theLimit) {
    String resourceName = theType != null ? toResourceName(theType) : null;
    IdDt id = theIdDt != null && theIdDt.isEmpty() == false ? theIdDt : null;
    HttpGetClientInvocation invocation = HistoryMethodBinding.createHistoryInvocation(resourceName, id, theSince, theLimit);
    if (isKeepResponses()) {
      myLastRequest = invocation.asHttpRequest(getServerBase(), createExtraParams(), getEncoding());
    }

    BundleResponseHandler binding = new BundleResponseHandler(theType);
    Bundle resp = invokeClient(binding, invocation, myLogRequestAndResponse);
    return resp;
View Full Code Here

  public <T extends IResource> T read(final Class<T> theType, IdDt theId) {
    if (theId == null || theId.hasIdPart() == false) {
      throw new IllegalArgumentException("theId does not contain a valid ID, is: " + theId);
    }
   
    HttpGetClientInvocation invocation = ReadMethodBinding.createReadInvocation(theId, toResourceName(theType));
    if (isKeepResponses()) {
      myLastRequest = invocation.asHttpRequest(getServerBase(), createExtraParams(), getEncoding());
    }

    ResourceResponseHandler<T> binding = new ResourceResponseHandler<T>(theType, theId);
    T resp = invokeClient(binding, invocation, myLogRequestAndResponse);
    return resp;
View Full Code Here

      }
      qualifier = StringUtils.defaultString(qualifier);
      params.put(nextEntry.getKey() + qualifier, valueList);
    }

    HttpGetClientInvocation invocation = SearchMethodBinding.createSearchInvocation(toResourceName(theType), params);
    if (isKeepResponses()) {
      myLastRequest = invocation.asHttpRequest(getServerBase(), createExtraParams(), getEncoding());
    }

    BundleResponseHandler binding = new BundleResponseHandler(theType);
    Bundle resp = invokeClient(binding, invocation, myLogRequestAndResponse);
    return resp;
View Full Code Here

    return resp;
  }

  @Override
  public <T extends IResource> T vread(final Class<T> theType, IdDt theId, IdDt theVersionId) {
    HttpGetClientInvocation invocation = ReadMethodBinding.createVReadInvocation(theId, theVersionId, toResourceName(theType));
    if (isKeepResponses()) {
      myLastRequest = invocation.asHttpRequest(getServerBase(), createExtraParams(), getEncoding());
    }

    ResourceResponseHandler<T> binding = new ResourceResponseHandler<T>(theType, theId);
    T resp = invokeClient(binding, invocation, myLogRequestAndResponse);
    return resp;
View Full Code Here

      if (myParamLimit != null) {
        addParam(params, Constants.PARAM_COUNT, Integer.toString(myParamLimit));
      }

      BundleResponseHandler binding = new BundleResponseHandler(myResourceType);
      HttpGetClientInvocation invocation = new HttpGetClientInvocation(params, myResourceName);

      return invoke(params, binding, invocation);

    }
View Full Code Here

          }
        }
      }
      urlFragments.add(Constants.PARAM_TAGS);

      HttpGetClientInvocation invocation = new HttpGetClientInvocation(params, urlFragments);

      return invoke(params, binding, invocation);

    }
View Full Code Here

    myContext = theContext;
  }

  @Override
  public Conformance conformance() {
    HttpGetClientInvocation invocation = MethodUtil.createConformanceInvocation();
    if (isKeepResponses()) {
      myLastRequest = invocation.asHttpRequest(getServerBase(), createExtraParams(), getEncoding());
    }

    ResourceResponseHandler<Conformance> binding = new ResourceResponseHandler<Conformance>(Conformance.class, null);
    Conformance resp = invokeClient(myContext, binding, invocation, myLogRequestAndResponse);
    return resp;
View Full Code Here

  @Override
  public <T extends IResource> Bundle history(final Class<T> theType, IdDt theIdDt, DateTimeDt theSince, Integer theLimit) {
    String resourceName = theType != null ? toResourceName(theType) : null;
    IdDt id = theIdDt != null && theIdDt.isEmpty() == false ? theIdDt : null;
    HttpGetClientInvocation invocation = HistoryMethodBinding.createHistoryInvocation(resourceName, id, theSince, theLimit);
    if (isKeepResponses()) {
      myLastRequest = invocation.asHttpRequest(getServerBase(), createExtraParams(), getEncoding());
    }

    BundleResponseHandler binding = new BundleResponseHandler(theType);
    Bundle resp = invokeClient(myContext, binding, invocation, myLogRequestAndResponse);
    return resp;
View Full Code Here

  public <T extends IResource> T read(final Class<T> theType, IdDt theId) {
    if (theId == null || theId.hasIdPart() == false) {
      throw new IllegalArgumentException("theId does not contain a valid ID, is: " + theId);
    }

    HttpGetClientInvocation invocation = ReadMethodBinding.createReadInvocation(theId, toResourceName(theType));
    if (isKeepResponses()) {
      myLastRequest = invocation.asHttpRequest(getServerBase(), createExtraParams(), getEncoding());
    }

    ResourceResponseHandler<T> binding = new ResourceResponseHandler<T>(theType, theId);
    T resp = invokeClient(myContext, binding, invocation, myLogRequestAndResponse);
    return resp;
View Full Code Here

TOP

Related Classes of ca.uhn.fhir.rest.method.HttpGetClientInvocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.