Package juzu.impl.bridge.spi.servlet

Examples of juzu.impl.bridge.spi.servlet.ServletScopedContext


    ScopedContext context;
    switch (scope) {
      case REQUEST:
        context = (ScopedContext)req.getAttribute("juzu.request_scope");
        if (context == null && create) {
          req.setAttribute("juzu.request_scope", context = new ServletScopedContext(log));
        }
        break;
      case FLASH:
        PortletSession session = req.getPortletSession(create);
        if (session != null) {
          context = (ScopedContext)session.getAttribute("juzu.flash_scope");
          if (context == null && create) {
            session.setAttribute("juzu.flash_scope", context = new ServletScopedContext(log));
          }
        } else {
          context = null;
        }
        break;
      case SESSION:
        session = req.getPortletSession(create);
        if (session != null) {
          context = (ScopedContext)session.getAttribute("juzu.session_scope");
          if (context == null && create) {
            session.setAttribute("juzu.session_scope", context = new ServletScopedContext(log));
          }
        } else {
          context = null;
        }
        break;
View Full Code Here


    return session;
  }

  public void invalidate() {
    session.close();
    session = new ServletScopedContext(Logger.SYSTEM);
  }
View Full Code Here

      }
      RequestParameter.create(parameter).appendTo(requestParameters);
    }

    //
    ServletScopedContext attributes = new ServletScopedContext(Logger.SYSTEM) {
      @Override
      public void close() {
        attributesHistory.addAll(Tools.list(MockRequestBridge.this.attributes));
        super.close();
      }
View Full Code Here

    locales.add(Locale.ENGLISH);
    ControllerService controllerPlugin = application.getLifeCycle().resolveBean(ControllerService.class);

    //
    this.application = application;
    this.session = new ServletScopedContext(Logger.SYSTEM);
    this.flash = null;
    this.flashHistory = new LinkedList<List<Scoped>>();
    this.controllerPlugin = controllerPlugin;
    this.locales = locales;
    this.roles = new HashSet<String>();
View Full Code Here

    return request;
  }

  public ScopedContext getFlashContext(boolean create) {
    if (flash == null && create) {
      flash = new ServletScopedContext(Logger.SYSTEM) {
        @Override
        public void close() {
          flashHistory.addFirst(Tools.list(flash));
          super.close();
        }
View Full Code Here

TOP

Related Classes of juzu.impl.bridge.spi.servlet.ServletScopedContext

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.