Package ca.uhn.fhir.rest.param

Examples of ca.uhn.fhir.rest.param.ResourceParameter


  private String myResourceName;

  public BaseOutcomeReturningMethodBindingWithResourceParam(Method theMethod, FhirContext theContext, Class<?> theMethodAnnotation, Object theProvider) {
    super(theMethod, theContext, theMethodAnnotation, theProvider);
   
    ResourceParameter resourceParameter = null;

    int index = 0;
    for (IParameter next : getParameters()) {
      if (next instanceof ResourceParameter) {
        resourceParameter = (ResourceParameter) next;
        myResourceName = theContext.getResourceDefinition(resourceParameter.getResourceType()).getName();
        myResourceParameterIndex = index;
      }
      index++;
    }
View Full Code Here


  private boolean myBinary;

  public BaseOutcomeReturningMethodBindingWithResourceParam(Method theMethod, FhirContext theContext, Class<?> theMethodAnnotation, Object theProvider) {
    super(theMethod, theContext, theMethodAnnotation, theProvider);

    ResourceParameter resourceParameter = null;

    int index = 0;
    for (IParameter next : getParameters()) {
      if (next instanceof ResourceParameter) {
        resourceParameter = (ResourceParameter) next;
        Class<? extends IResource> resourceType = resourceParameter.getResourceType();
       
        if (theProvider instanceof IResourceProvider) {
          resourceType=((IResourceProvider) theProvider).getResourceType();
        }
       
View Full Code Here

          } else if (nextAnnotation instanceof ResourceParam) {
            if (!IResource.class.isAssignableFrom(parameterType)) {
              throw new ConfigurationException("Method '" + theMethod.getName() + "' is annotated with @" + ResourceParam.class.getSimpleName()
                  + " but has a type that is not an implemtation of " + IResource.class.getCanonicalName());
            }
            param = new ResourceParameter((Class<? extends IResource>) parameterType);
          } else if (nextAnnotation instanceof IdParam || nextAnnotation instanceof VersionIdParam) {
            param = new NullParameter();
          } else if (nextAnnotation instanceof ServerBase) {
            param = new ServerBaseParamBinder();
          } else if (nextAnnotation instanceof Since) {
View Full Code Here

  private String myResourceName;

  public BaseOutcomeReturningMethodBindingWithResourceParam(Method theMethod, FhirContext theContext, Class<?> theMethodAnnotation, Object theProvider) {
    super(theMethod, theContext, theMethodAnnotation, theProvider);

    ResourceParameter resourceParameter = null;

    int index = 0;
    for (IParameter next : getParameters()) {
      if (next instanceof ResourceParameter) {
        resourceParameter = (ResourceParameter) next;
        Class<? extends IResource> resourceType = resourceParameter.getResourceType();
       
        if (theProvider instanceof IResourceProvider) {
          resourceType=((IResourceProvider) theProvider).getResourceType();
        }
       
View Full Code Here

        } else if (nextAnnotation instanceof ResourceParam) {
          if (!IResource.class.isAssignableFrom(parameterType)) {
            throw new ConfigurationException("Method '" + method.getName() + "' is annotated with @" + ResourceParam.class.getSimpleName()
                + " but has a type that is not an implemtation of " + IResource.class.getCanonicalName());
          }
          param = new ResourceParameter((Class<? extends IResource>) parameterType);
        } else if (nextAnnotation instanceof IdParam || nextAnnotation instanceof VersionIdParam) {
          param = null;
        } else {
          continue;
        }
View Full Code Here

  private String myResourceName;

  public BaseOutcomeReturningMethodBindingWithResourceParam(Method theMethod, FhirContext theContext, Class<?> theMethodAnnotation) {
    super(theMethod, theContext, theMethodAnnotation);
   
    ResourceParameter resourceParameter = null;

    int index = 0;
    for (IParameter next : getParameters()) {
      if (next instanceof ResourceParameter) {
        resourceParameter = (ResourceParameter) next;
        myResourceName = theContext.getResourceDefinition(resourceParameter.getResourceType()).getName();
        myResourceParameterIndex = index;
      }
      index++;
    }
View Full Code Here

  private boolean myBinary;

  public BaseOutcomeReturningMethodBindingWithResourceParam(Method theMethod, FhirContext theContext, Class<?> theMethodAnnotation, Object theProvider) {
    super(theMethod, theContext, theMethodAnnotation, theProvider);

    ResourceParameter resourceParameter = null;

    int index = 0;
    for (IParameter next : getParameters()) {
      if (next instanceof ResourceParameter) {
        resourceParameter = (ResourceParameter) next;
        Class<? extends IResource> resourceType = resourceParameter.getResourceType();

        if (theProvider instanceof IResourceProvider) {
          resourceType = ((IResourceProvider) theProvider).getResourceType();
        }
View Full Code Here

          } else if (nextAnnotation instanceof ResourceParam) {
            if (!IResource.class.isAssignableFrom(parameterType)) {
              throw new ConfigurationException("Method '" + theMethod.getName() + "' is annotated with @" + ResourceParam.class.getSimpleName()
                  + " but has a type that is not an implemtation of " + IResource.class.getCanonicalName());
            }
            param = new ResourceParameter((Class<? extends IResource>) parameterType);
          } else if (nextAnnotation instanceof IdParam || nextAnnotation instanceof VersionIdParam) {
            param = new NullParameter();
          } else if (nextAnnotation instanceof ServerBase) {
            param = new ServerBaseParamBinder();
          } else if (nextAnnotation instanceof Since) {
View Full Code Here

TOP

Related Classes of ca.uhn.fhir.rest.param.ResourceParameter

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.