Package ca.uhn.fhir.rest.client

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


  @Override
  protected BaseClientInvocation createClientInvocation(Object[] theArgs, IResource resource, String resourceName) {
    StringBuilder urlExtension = new StringBuilder();
    urlExtension.append(resourceName);

    return new PostClientInvocation(getContext(), resource, urlExtension.toString());
  }
View Full Code Here


  @Override
  protected BaseClientInvocation createClientInvocation(Object[] theArgs, IResource resource, String resourceName) {
    StringBuilder urlExtension = new StringBuilder();
    urlExtension.append(resourceName);

    return new PostClientInvocation(getContext(), resource, urlExtension.toString());
  }
View Full Code Here

    String resourceName = def.getName();

    StringBuilder urlExtension = new StringBuilder();
    urlExtension.append(resourceName);

    return new PostClientInvocation(context, resource, urlExtension.toString());
  }
View Full Code Here

  protected abstract boolean isDelete();

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

    IdDt id = (IdDt) theArgs[myIdParamIndex];
    if (id == null || id.isEmpty()) {
      throw new InvalidRequestException("ID must not be null or empty for this operation");
    }

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

    TagList tagList = (TagList) theArgs[myTagListParamIndex];

    Class<? extends IResource> type = myType;
    assert type != null;

    if (isDelete()) {
      if (versionId != null) {
        retVal = new PostClientInvocation(getContext(), tagList, getResourceName(), id.getValue(), Constants.PARAM_HISTORY, versionId.getValue(), Constants.PARAM_TAGS, Constants.PARAM_DELETE);
      } else {
        retVal = new PostClientInvocation(getContext(), tagList, getResourceName(), id.getValue(), Constants.PARAM_TAGS, Constants.PARAM_DELETE);
      }
    } else {
      if (versionId != null) {
        retVal = new PostClientInvocation(getContext(), tagList, getResourceName(), id.getValue(), Constants.PARAM_HISTORY, versionId.getValue(), Constants.PARAM_TAGS);
      } else {
        retVal = new PostClientInvocation(getContext(), tagList, getResourceName(), id.getValue(), Constants.PARAM_TAGS);
      }
    }
    for (int idx = 0; idx < theArgs.length; idx++) {
      IParameter nextParam = getParameters().get(idx);
      nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], null, retVal);
View Full Code Here

  @Override
  protected BaseClientInvocation createClientInvocation(Object[] theArgs, IResource theResource) {
    StringBuilder urlExtension = new StringBuilder();
    urlExtension.append(getContext().getResourceDefinition(theResource).getName());

    return new PostClientInvocation(getContext(), theResource, urlExtension.toString());
  }
View Full Code Here

    IdDt idDt=null;
    if (myIdParameterIndex != null) {
      idDt = (IdDt) theArgs[myIdParameterIndex];
    }

    PostClientInvocation retVal = createValidateInvocation(theResource, idDt, context);
   
    for (int idx = 0; idx < theArgs.length; idx++) {
      IParameter nextParam = getParameters().get(idx);
      nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], null, retVal);
    }
View Full Code Here

      String id = theId.getValue();
      urlExtension.append('/');
      urlExtension.append(id);
    }
    // TODO: is post correct here?
    PostClientInvocation retVal = new PostClientInvocation(theContext, theResource, urlExtension.toString());
    return retVal;
  }
View Full Code Here

  @Override
  protected BaseClientInvocation createClientInvocation(Object[] theArgs, IResource resource, String resourceName) {
    StringBuilder urlExtension = new StringBuilder();
    urlExtension.append(resourceName);

    return new PostClientInvocation(getContext(), resource, urlExtension.toString());
  }
View Full Code Here

  @Override
  protected BaseClientInvocation createClientInvocation(Object[] theArgs, IResource resource, String resourceName) {
    StringBuilder urlExtension = new StringBuilder();
    urlExtension.append(resourceName);

    return new PostClientInvocation(getContext(), resource, urlExtension.toString());
  }
View Full Code Here

TOP

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

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.