Package ca.uhn.fhir.rest.client

Examples of ca.uhn.fhir.rest.client.GetClientInvocation


  @Override
  public GetClientInvocation invokeClient(Object[] theArgs) {
    String id = ((IdDt) theArgs[myIdIndex]).getValue();
    if (myVersionIdIndex == null) {
      return new GetClientInvocation(getResourceName(), id);
    } else {
      String vid = ((IdDt) theArgs[myVersionIdIndex]).getValue();
      return new GetClientInvocation(getResourceName(), id, Constants.URL_TOKEN_HISTORY, vid);
    }
  }
View Full Code Here


    if (b.length()>0) {
      b.append('/');
    }
    b.append(Constants.PARAM_HISTORY);
   
    return new GetClientInvocation(b.toString());
  }
View Full Code Here

        IParameter nextParam = myParameters.get(idx);
        nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], queryStringArgs);
      }
    }

    return new GetClientInvocation(queryStringArgs, getResourceName());
  }
View Full Code Here

    return ReturnTypeEnum.RESOURCE;
  }

  @Override
  public GetClientInvocation invokeClient(Object[] theArgs) throws InternalErrorException {
    return new GetClientInvocation("metadata");
  }
View Full Code Here

    if (myQueryName != null) {
      queryStringArgs.put(Constants.PARAM_QUERY, Collections.singletonList(myQueryName));
    }
   
    String resourceName = getResourceName();
    GetClientInvocation retVal = createSearchInvocation(resourceName, queryStringArgs);

    if (theArgs != null) {
      for (int idx = 0; idx < theArgs.length; idx++) {
        IParameter nextParam = getParameters().get(idx);
        nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], queryStringArgs,retVal);
View Full Code Here

    return retVal;
  }

  public static GetClientInvocation createSearchInvocation(String theResourceName, Map<String, List<String>> theParameters) {
    return new GetClientInvocation(theParameters, theResourceName);
  }
View Full Code Here

    return null;
  }

  @Override
  public BaseClientInvocation invokeClient(Object[] theArgs) throws InternalErrorException {
    GetClientInvocation retVal;

    IdDt id = null;
    IdDt versionId = null;
    if (myIdParamIndex != null) {
      id = (IdDt) theArgs[myIdParamIndex];
      if (myVersionIdParamIndex != null) {
        versionId = (IdDt) theArgs[myVersionIdParamIndex];
      }
    }

    if (myType != IResource.class) {
      if (id != null) {
        if (versionId != null) {
          retVal = new GetClientInvocation(getResourceName(), id.getValue(), Constants.PARAM_HISTORY, versionId.getValue(), Constants.PARAM_TAGS);
        } else {
          retVal = new GetClientInvocation(getResourceName(), id.getValue(), Constants.PARAM_TAGS);
        }
      } else {
        retVal = new GetClientInvocation(getResourceName(), Constants.PARAM_TAGS);
      }
    } else {
      retVal = new GetClientInvocation(Constants.PARAM_TAGS);
    }

    if (theArgs != null) {
      for (int idx = 0; idx < theArgs.length; idx++) {
        IParameter nextParam = getParameters().get(idx);
View Full Code Here

      if (id == null || isBlank(id.getValue())) {
        throw new NullPointerException("ID can not be null");
      }
    }
   
    GetClientInvocation retVal = createHistoryInvocation(resourceName, id);

    if (theArgs != null) {
      for (int idx = 0; idx < theArgs.length; idx++) {
        IParameter nextParam = getParameters().get(idx);
        nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], retVal.getParameters(),retVal);
      }
    }

    return retVal;
  }
View Full Code Here

    }
    if (b.length() > 0) {
      b.append('/');
    }
    b.append(Constants.PARAM_HISTORY);
    GetClientInvocation retVal = new GetClientInvocation(b.toString());
    return retVal;
  }
View Full Code Here

    return ReturnTypeEnum.RESOURCE;
  }

  @Override
  public GetClientInvocation invokeClient(Object[] theArgs) throws InternalErrorException {
    GetClientInvocation retVal = createConformanceInvocation();

    if (theArgs != null) {
      for (int idx = 0; idx < theArgs.length; idx++) {
        IParameter nextParam = getParameters().get(idx);
        nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], null, retVal);
View Full Code Here

TOP

Related Classes of ca.uhn.fhir.rest.client.GetClientInvocation

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.