Package org.springframework.web.bind.annotation

Examples of org.springframework.web.bind.annotation.SessionAttributes.types()


    this.typeLevelMapping = handlerType.getAnnotation(RequestMapping.class);
    SessionAttributes sessionAttributes = handlerType.getAnnotation(SessionAttributes.class);
    this.sessionAttributesFound = (sessionAttributes != null);
    if (this.sessionAttributesFound) {
      this.sessionAttributeNames.addAll(Arrays.asList(sessionAttributes.value()));
      this.sessionAttributeTypes.addAll(Arrays.asList(sessionAttributes.types()));
    }
  }


  public final boolean hasHandlerMethods() {
View Full Code Here


    this.sessionAttributeStore = sessionAttributeStore;

    SessionAttributes annotation = AnnotationUtils.findAnnotation(handlerType, SessionAttributes.class);
    if (annotation != null) {
      this.attributeNames.addAll(Arrays.asList(annotation.value()));
      this.attributeTypes.addAll(Arrays.<Class<?>>asList(annotation.types()));
    }

    for (String attributeName : this.attributeNames) {
      this.knownAttributeNames.put(attributeName, Boolean.TRUE);
    }
View Full Code Here

    this.typeLevelMapping = AnnotationUtils.findAnnotation(handlerType, RequestMapping.class);
    SessionAttributes sessionAttributes = AnnotationUtils.findAnnotation(handlerType, SessionAttributes.class);
    this.sessionAttributesFound = (sessionAttributes != null);
    if (this.sessionAttributesFound) {
      this.sessionAttributeNames.addAll(Arrays.asList(sessionAttributes.value()));
      this.sessionAttributeTypes.addAll(Arrays.asList(sessionAttributes.types()));
    }
  }

  protected boolean isHandlerMethod(Method method) {
    return AnnotationUtils.findAnnotation(method, RequestMapping.class) != null;
View Full Code Here

    this.typeLevelMapping = AnnotationUtils.findAnnotation(handlerType, RequestMapping.class);
    SessionAttributes sessionAttributes = AnnotationUtils.findAnnotation(handlerType, SessionAttributes.class);
    this.sessionAttributesFound = (sessionAttributes != null);
    if (this.sessionAttributesFound) {
      this.sessionAttributeNames.addAll(Arrays.asList(sessionAttributes.value()));
      this.sessionAttributeTypes.addAll(Arrays.asList(sessionAttributes.types()));
    }
  }

  protected boolean isHandlerMethod(Method method) {
    return AnnotationUtils.findAnnotation(method, RequestMapping.class) != null;
View Full Code Here

    this.sessionAttributeStore = sessionAttributeStore;
   
    SessionAttributes annotation = AnnotationUtils.findAnnotation(handlerType, SessionAttributes.class);
    if (annotation != null) {
      this.attributeNames.addAll(Arrays.asList(annotation.value()));
      this.attributeTypes.addAll(Arrays.<Class<?>>asList(annotation.types()));
    }   
  }

  /**
   * Whether the controller represented by this instance has declared session
View Full Code Here

      }
      // Expose model attributes as session attributes, if required.
      Map<String, Object> model = (mav != null ? mav.getModel() : implicitModel);
      Set<Object> sessionAttributeSet = new HashSet<Object>();
      sessionAttributeSet.addAll(Arrays.asList(sessionAttributes.value()));
      sessionAttributeSet.addAll(Arrays.asList(sessionAttributes.types()));
      for (Map.Entry entry : new HashSet<Map.Entry>(model.entrySet())) {
        String attrName = (String) entry.getKey();
        Object attrValue = entry.getValue();
        if (sessionAttributeSet.contains(attrName) ||
            (attrValue != null && sessionAttributeSet.contains(attrValue.getClass()))) {
View Full Code Here

      SessionAttributes sessionAttributes = handler.getClass().getAnnotation(SessionAttributes.class);
      Set sessionAttributeSet = null;
      if (sessionAttributes != null) {
        sessionAttributeSet = new HashSet();
        sessionAttributeSet.addAll(Arrays.asList(sessionAttributes.value()));
        sessionAttributeSet.addAll(Arrays.asList(sessionAttributes.types()));
      }
      Object[] args = new Object[handlerMethod.getParameterTypes().length];
      String[] paramNames = null;
      boolean paramNamesResolved = false;
      for (int i = 0; i < args.length; i++) {
View Full Code Here

    this.typeLevelMapping = AnnotationUtils.findAnnotation(handlerType, RequestMapping.class);
    SessionAttributes sessionAttributes = AnnotationUtils.findAnnotation(handlerType, SessionAttributes.class);
    this.sessionAttributesFound = (sessionAttributes != null);
    if (this.sessionAttributesFound) {
      this.sessionAttributeNames.addAll(Arrays.asList(sessionAttributes.value()));
      this.sessionAttributeTypes.addAll(Arrays.asList(sessionAttributes.types()));
    }
  }

  protected boolean isHandlerMethod(Method method) {
    return AnnotationUtils.findAnnotation(method, RequestMapping.class) != null;
View Full Code Here

    this.typeLevelMapping = AnnotationUtils.findAnnotation(handlerType, RequestMapping.class);
    SessionAttributes sessionAttributes = AnnotationUtils.findAnnotation(handlerType, SessionAttributes.class);
    this.sessionAttributesFound = (sessionAttributes != null);
    if (this.sessionAttributesFound) {
      this.sessionAttributeNames.addAll(Arrays.asList(sessionAttributes.value()));
      this.sessionAttributeTypes.addAll(Arrays.asList(sessionAttributes.types()));
    }
  }

  protected boolean isHandlerMethod(Method method) {
    return AnnotationUtils.findAnnotation(method, RequestMapping.class) != null;
View Full Code Here

    this.typeLevelMapping = handlerType.getAnnotation(RequestMapping.class);
    SessionAttributes sessionAttributes = handlerType.getAnnotation(SessionAttributes.class);
    this.sessionAttributesFound = (sessionAttributes != null);
    if (this.sessionAttributesFound) {
      this.sessionAttributeNames.addAll(Arrays.asList(sessionAttributes.value()));
      this.sessionAttributeTypes.addAll(Arrays.asList(sessionAttributes.types()));
    }
  }


  public final boolean hasHandlerMethods() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.