Package org.springframework.web.bind.annotation

Examples of org.springframework.web.bind.annotation.RequestParam


      this.hasRequestHeaderAnnotation = false;
      this.hasCookieValueAnnotation = false;
      this.hasAuthenticationPrincipalAnnotation = null;

      if (RequestParam.class.isInstance(paramAnn)) {
        RequestParam requestParam = (RequestParam) paramAnn;
        if (StringUtils.hasText(requestParam.value())) {
          this.name = requestParam.value();
        }
        this.required = requestParam.required();
        this.defaultValue = ValueConstants.DEFAULT_NONE.equals(requestParam
            .defaultValue()) ? null : requestParam.defaultValue();
        this.hasRequestParamAnnotation = true;
        break;
      }
      else if (RequestHeader.class.isInstance(paramAnn)) {
        RequestHeader requestHeader = (RequestHeader) paramAnn;
View Full Code Here


    for (int i = 0; i < this.handlerMethod.getParameterTypes().length; i++) {
      MethodParameter methodParameter = new MethodParameter(this.handlerMethod, i);
      if (!isIgnored(request, methodParameter)) {
        methodParameter.initParameterNameDiscovery(parameterNameDiscoverer);
        PathVariable pathVariable = methodParameter.getParameterAnnotation(PathVariable.class);
        RequestParam requestParam = methodParameter.getParameterAnnotation(RequestParam.class);
        if (pathVariable != null) {
          addToPathVariableModel(model, methodParameter, pathVariable, source);
        } else {
          addRequestParameterToModel(model, methodParameter, requestParam, source);
        }
View Full Code Here

      if (parameterAnnotations != null) {

        for (Annotation paramAnn : parameterAnnotations[paramIndex]) {
          if (RequestParam.class.isInstance(paramAnn)) {
            RequestParam requestParam = (RequestParam) paramAnn;
            if (StringUtils.hasText(requestParam.value())) {
              parameterInfo.setName(requestParam.value());
            }
            parameterInfo.setRequired(requestParam.required());
            parameterInfo
                .setDefaultValue(ValueConstants.DEFAULT_NONE.equals(requestParam.defaultValue()) ? null
                    : requestParam.defaultValue());
            parameterInfo.setHasRequestParamAnnotation(true);
            break;
          }
        }
      }
View Full Code Here

    boolean required = false;
    String parameterName = null;
    String defaultValue = null;
    for (Annotation paramAnn : parameterAnnotations) {
      if (RequestParam.class.isInstance(paramAnn)) {
        RequestParam requestParam = (RequestParam) paramAnn;
        parameterName = requestParam.value();
        required = requestParam.required();
        defaultValue = (ValueConstants.DEFAULT_NONE.equals(requestParam.defaultValue()) ? null : requestParam
            .defaultValue());
        break;
      }
    }
View Full Code Here

    Annotation[] paramAnnotations = methodParam.getParameterAnnotations();

    for (Annotation paramAnn : paramAnnotations) {
      if (RequestParam.class.isInstance(paramAnn)) {
        RequestParam requestParam = (RequestParam) paramAnn;
        if (StringUtils.hasText(requestParam.value())) {
          this.name = requestParam.value();
        }
        this.required = requestParam.required();
        this.defaultValue = ValueConstants.DEFAULT_NONE.equals(requestParam.defaultValue()) ? null
            : requestParam.defaultValue();
        this.hasRequestParamAnnotation = true;
        this.hasRequestHeaderAnnotation = false;
        break;
      } else if (RequestHeader.class.isInstance(paramAnn)) {
        RequestHeader requestHeader = (RequestHeader) paramAnn;
View Full Code Here

    if (paramAnnotations != null) {

      for (Annotation paramAnn : paramAnnotations) {
        if (RequestParam.class.isInstance(paramAnn)) {
          RequestParam requestParam = (RequestParam) paramAnn;
          if (StringUtils.hasText(requestParam.value())) {
            this.name = requestParam.value();
          }
          this.required = requestParam.required();
          this.defaultValue = ValueConstants.DEFAULT_NONE.equals(requestParam.defaultValue()) ? null
              : requestParam.defaultValue();
          this.hasRequestParamAnnotation = true;
          break;
        }
      }
    }
View Full Code Here

    Annotation[] paramAnnotations = methodParam.getParameterAnnotations();

    for (Annotation paramAnn : paramAnnotations) {
      if (RequestParam.class.isInstance(paramAnn)) {
        RequestParam requestParam = (RequestParam) paramAnn;
        if (StringUtils.hasText(requestParam.value())) {
          this.name = requestParam.value();
        }
        this.required = requestParam.required();
        this.defaultValue = ValueConstants.DEFAULT_NONE.equals(requestParam.defaultValue()) ? null
            : requestParam.defaultValue();
        this.hasRequestParamAnnotation = true;
        this.hasRequestHeaderAnnotation = false;
        break;
      } else if (RequestHeader.class.isInstance(paramAnn)) {
        RequestHeader requestHeader = (RequestHeader) paramAnn;
View Full Code Here

    boolean required = false;
    String parameterName = null;
    String defaultValue = null;
    for (Annotation paramAnn : parameterAnnotations) {
      if (RequestParam.class.isInstance(paramAnn)) {
        RequestParam requestParam = (RequestParam) paramAnn;
        parameterName = requestParam.value();
        required = requestParam.required();
        defaultValue = (ValueConstants.DEFAULT_NONE.equals(requestParam.defaultValue()) ? null : requestParam
            .defaultValue());
        break;
      }
    }
View Full Code Here

    Annotation[] paramAnnotations = methodParam.getParameterAnnotations();

    for (Annotation paramAnn : paramAnnotations) {
      if (RequestParam.class.isInstance(paramAnn)) {
        RequestParam requestParam = (RequestParam) paramAnn;
        if (StringUtils.hasText(requestParam.value())) {
          this.name = requestParam.value();
        }
        this.required = requestParam.required();
        this.defaultValue = ValueConstants.DEFAULT_NONE.equals(requestParam
            .defaultValue()) ? null : requestParam.defaultValue();
        this.hasRequestParamAnnotation = true;
        this.hasRequestHeaderAnnotation = false;
        break;
      }
      else if (RequestHeader.class.isInstance(paramAnn)) {
View Full Code Here

      if (parameterAnnotations != null) {

        for (Annotation paramAnn : parameterAnnotations[paramIndex]) {
          if (RequestParam.class.isInstance(paramAnn)) {
            RequestParam requestParam = (RequestParam) paramAnn;
            if (StringUtils.hasText(requestParam.value())) {
              parameterInfo.setName(requestParam.value());
            }
            parameterInfo.setRequired(requestParam.required());
            parameterInfo
                .setDefaultValue(ValueConstants.DEFAULT_NONE.equals(requestParam.defaultValue()) ? null
                    : requestParam.defaultValue());
            parameterInfo.setHasRequestParamAnnotation(true);
            break;
          }
        }
      }
View Full Code Here

TOP

Related Classes of org.springframework.web.bind.annotation.RequestParam

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.