Package org.springframework.web.context.request

Examples of org.springframework.web.context.request.RequestScope


    } else {
      flowContext = new GenericApplicationContext();
    }
    flowContext.setDisplayName("Flow ApplicationContext [" + getContext().getFlowId() + "]");
    flowContext.setParent(parent);
    flowContext.getBeanFactory().registerScope("request", new RequestScope());
    flowContext.getBeanFactory().registerScope("flash", new FlashScope());
    flowContext.getBeanFactory().registerScope("view", new ViewScope());
    flowContext.getBeanFactory().registerScope("flow", new FlowScope());
    flowContext.getBeanFactory().registerScope("conversation", new ConversationScope());
    Resource flowResource = flowModelHolder.getFlowModelResource();
View Full Code Here


  }

  public void setUpApplicationContextWithScopes(ConfigurableApplicationContext applicationContext) {
    assert applicationContext!=null;
    ConfigurableListableBeanFactory beanFactory = applicationContext.getBeanFactory();
    beanFactory.registerScope("request", new RequestScope());
    beanFactory.registerScope("session", new SessionScope(false));
    beanFactory.registerScope("globalSession", new SessionScope(true));

    beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(getServletContext(),
        getConfig()));
View Full Code Here

   * with the given BeanFactory, as used by the Portlet ApplicationContext.
   * @param beanFactory the BeanFactory to configure
   * @param pc the PortletContext that we're running within
   */
  static void registerPortletApplicationScopes(ConfigurableListableBeanFactory beanFactory, PortletContext pc) {
    beanFactory.registerScope(WebApplicationContext.SCOPE_REQUEST, new RequestScope());
    beanFactory.registerScope(WebApplicationContext.SCOPE_SESSION, new SessionScope(false));
    beanFactory.registerScope(WebApplicationContext.SCOPE_GLOBAL_SESSION, new SessionScope(true));
    if (pc != null) {
      PortletContextScope appScope = new PortletContextScope(pc);
      beanFactory.registerScope(WebApplicationContext.SCOPE_APPLICATION, appScope);
View Full Code Here

   * with the given BeanFactory, as used by the WebApplicationContext.
   * @param beanFactory the BeanFactory to configure
   * @param sc the ServletContext that we're running within
   */
  public static void registerWebApplicationScopes(ConfigurableListableBeanFactory beanFactory, ServletContext sc) {
    beanFactory.registerScope(WebApplicationContext.SCOPE_REQUEST, new RequestScope());
    beanFactory.registerScope(WebApplicationContext.SCOPE_SESSION, new SessionScope(false));
    beanFactory.registerScope(WebApplicationContext.SCOPE_GLOBAL_SESSION, new SessionScope(true));
    if (sc != null) {
      ServletContextScope appScope = new ServletContextScope(sc);
      beanFactory.registerScope(WebApplicationContext.SCOPE_APPLICATION, appScope);
View Full Code Here

   * and #{...} SpEL expressions in default values, or {@code null} if default
   * values are not expected to contain expressions
   */
  public AbstractNamedValueMethodArgumentResolver(ConfigurableBeanFactory beanFactory) {
    this.configurableBeanFactory = beanFactory;
    this.expressionContext = (beanFactory != null) ? new BeanExpressionContext(beanFactory, new RequestScope()) : null;
  }
View Full Code Here

   * with the given BeanFactory, as used by the WebApplicationContext.
   * @param beanFactory the BeanFactory to configure
   * @param sc the ServletContext that we're running within
   */
  public static void registerWebApplicationScopes(ConfigurableListableBeanFactory beanFactory, ServletContext sc) {
    beanFactory.registerScope(WebApplicationContext.SCOPE_REQUEST, new RequestScope());
    beanFactory.registerScope(WebApplicationContext.SCOPE_SESSION, new SessionScope(false));
    beanFactory.registerScope(WebApplicationContext.SCOPE_GLOBAL_SESSION, new SessionScope(true));
    if (sc != null) {
      ServletContextScope appScope = new ServletContextScope(sc);
      beanFactory.registerScope(WebApplicationContext.SCOPE_APPLICATION, appScope);
View Full Code Here

   * @param beanFactory a bean factory to use for resolving  ${...} placeholder and #{...} SpEL expressions
   * in default values, or {@code null} if default values are not expected to contain expressions
   */
  public AbstractNamedValueMethodArgumentResolver(ConfigurableBeanFactory beanFactory) {
    this.configurableBeanFactory = beanFactory;
    this.expressionContext = (beanFactory != null) ? new BeanExpressionContext(beanFactory, new RequestScope()) : null;
  }
View Full Code Here

  }

  public void setBeanFactory(BeanFactory beanFactory) {
    if (beanFactory instanceof ConfigurableBeanFactory) {
      this.beanFactory = (ConfigurableBeanFactory) beanFactory;
      this.expressionContext = new BeanExpressionContext(this.beanFactory, new RequestScope());
    }
  }
View Full Code Here

  }

  public void setBeanFactory(BeanFactory beanFactory) {
    if (beanFactory instanceof ConfigurableBeanFactory) {
      this.beanFactory = (ConfigurableBeanFactory) beanFactory;
      this.expressionContext = new BeanExpressionContext(this.beanFactory, new RequestScope());
    }
  }
View Full Code Here

  }

  public void setBeanFactory(BeanFactory beanFactory) {
    if (beanFactory instanceof ConfigurableBeanFactory) {
      this.beanFactory = (ConfigurableBeanFactory) beanFactory;
      this.expressionContext = new BeanExpressionContext(this.beanFactory, new RequestScope());
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.web.context.request.RequestScope

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.