Package br.com.caelum.vraptor

Examples of br.com.caelum.vraptor.HeaderParam


  }

  private void addHeaderParametersToAttribute() {
    for (ValuedParameter param : methodInfo.getValuedParameters()) {
      if (param.getParameter().isAnnotationPresent(HeaderParam.class)) {
        HeaderParam headerParam = param.getParameter().getAnnotation(HeaderParam.class);
        String value = request.getHeader(headerParam.value());
        request.setParameter(param.getName(), value);
      }
    }
  }
View Full Code Here


    }
  }

  private void addHeaderParametersToAttribute(ControllerMethod controllerMethod) {
    for (Parameter param : parameterNameProvider.parametersFor(controllerMethod.getMethod())) {
      HeaderParam headerParam = param.getAnnotation(HeaderParam.class);
      if (headerParam != null) {
        String value = request.getHeader(headerParam.value());
        request.setParameter(param.getName(), value);
      }
    }
  }
View Full Code Here

        Annotation[][] annotations = trueMethod.getParameterAnnotations()
        for (int i = 0; i < annotations.length; i++) { 
            for (Annotation annotation : annotations[i]) { 
                if (annotation instanceof HeaderParam) { 
                    HeaderParam headerParam = (HeaderParam) annotation; 
                    String value = request.getHeader(headerParam.value())
                    request.setAttribute(parameters[i], value)
               
            } 
        } 
   
View Full Code Here

    Annotation[][] annotations = trueMethod.getParameterAnnotations();
    for (int i = 0; i < annotations.length; i++) {
      for (Annotation annotation : annotations[i]) {
        if (annotation instanceof HeaderParam) {
          HeaderParam headerParam = (HeaderParam) annotation;
          String value = request.getHeader(headerParam.value());
          request.setAttribute(parameters[i], value);
        }
      }
    }
View Full Code Here

    ValuedParameter[] valuedParameters = methodInfo.getValuedParameters();
    for (int i = 0; i < valuedParameters.length; i++) {
      Parameter parameter = valuedParameters[i].getParameter();
      if (parameter.isAnnotationPresent(HeaderParam.class)) {
        HeaderParam headerParam = parameter.getAnnotation(HeaderParam.class);
        valuedParameters[i].setValue(request.getHeader(headerParam.value()));
      } else {
        ValuedParameter valuedParameter = valuedParameters[i];
        if (valuedParameter.getValue() == null) {
          valuedParameter.setValue(values[i]);
        }
View Full Code Here

  }

  private void addHeaderParametersToAttribute() {
    for (ValuedParameter param : methodInfo.getValuedParameters()) {
      if (param.getParameter().isAnnotationPresent(HeaderParam.class)) {
        HeaderParam headerParam = param.getParameter().getAnnotation(HeaderParam.class);
        String value = request.getHeader(headerParam.value());
        if (!isNullOrEmpty(value)) {
          request.setParameter(param.getName(), value);
        }
      }
    }
View Full Code Here

    stack.next(method, controllerInstance);
  }

  private void addHeaderParametersToAttribute(ControllerMethod controllerMethod) {
    for (Parameter param : parameterNameProvider.parametersFor(controllerMethod.getMethod())) {
      HeaderParam headerParam = param.getAnnotation(HeaderParam.class);
      if (headerParam != null) {
        String value = request.getHeader(headerParam.value());
        request.setParameter(param.getName(), value);
      }
    }
  }
View Full Code Here

    Annotation[][] annotations = trueMethod.getParameterAnnotations();
    for (int i = 0; i < annotations.length; i++) {
      for (Annotation annotation : annotations[i]) {
        if (annotation instanceof HeaderParam) {
          HeaderParam headerParam = (HeaderParam) annotation;
          String value = request.getHeader(headerParam.value());
          request.setAttribute(parameters[i], value);
        }
      }
    }
View Full Code Here

  }

  private void addHeaderParametersToAttribute() {
    for (ValuedParameter param : methodInfo.getValuedParameters()) {
      if (param.getParameter().isAnnotationPresent(HeaderParam.class)) {
        HeaderParam headerParam = param.getParameter().getAnnotation(HeaderParam.class);
        String value = request.getHeader(headerParam.value());
        request.setParameter(param.getName(), value);
      }
    }
  }
View Full Code Here

    Annotation[][] annotations = trueMethod.getParameterAnnotations();
    for (int i = 0; i < annotations.length; i++) {
      for (Annotation annotation : annotations[i]) {
        if (annotation instanceof HeaderParam) {
          HeaderParam headerParam = (HeaderParam) annotation;
          String value = request.getHeader(headerParam.value());
          request.setAttribute(parameters[i], value);
        }
      }
    }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.HeaderParam

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.