Package org.apache.cocoon.environment

Examples of org.apache.cocoon.environment.Session


            throw new ProcessingException(msg);
        }

        // Get the object to stream
        Request request = (Request)ObjectModelHelper.getRequest(objectModel);
        Session session = request.getSession(false);
        if (session != null) {
            this.attrObject = session.getAttribute(attrName);
        }
       
        // Controls
        if (this.attrObject == null) {
           
View Full Code Here


        rs = this.Authenticate( conf, req );

        if (rs != null )
        {
          getLogger ().debug ("DBXMLAUTH: authorized successfully");
          Session session = null;

          if (cs) {
            session = req.getSession (false);
            if (session != null)
                session.invalidate ();
            session = req.getSession (true);
            if (session == null)
                return null;
            getLogger ().debug ("DBXMLAUTH: session created");
          } else {
View Full Code Here

    /**
     * Get the list of contexts
     */
    protected Map getSessionContexts() {
        if (this.contexts == null) {
            Session session = this.getSession(true);
            this.contexts = (Map)session.getAttribute("org.apache.cocoon.sunshine.context.SessionContext");
            if (this.contexts == null) {
                this.contexts = new HashMap(5, 3);
                session.setAttribute("org.apache.cocoon.sunshine.context.SessionContext", this.contexts);
            }
        }
        return this.contexts;
    }
View Full Code Here

    /**
     * Get the list of contexts
     */
    protected Map getSessionContextsTransactionStates() {
        if (this.transactionStates == null) {
            Session session = this.getSession(true);
            this.transactionStates = (Map)session.getAttribute("org.apache.cocoon.sunshine.context.TransactionState");
            if (this.transactionStates == null) {
                this.transactionStates = new HashMap(5, 3);
                session.setAttribute("org.apache.cocoon.sunshine.context.TransactionState", this.transactionStates);
            }
        }
        return this.transactionStates;
    }
View Full Code Here

    public Session createSession() {
        // synchronized
        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("BEGIN createSession");
        }
        Session session = this.getSession(true);

        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("END createSession session=" + session);
        }
        return session;
View Full Code Here

    public Session getSession(boolean createFlag) {
        // synchronized
        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("BEGIN getSession create=" + createFlag);
        }
        Session session = this.request.getSession(createFlag);

        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("END getSession session=" + session);
        }
View Full Code Here

        // synchronized
        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("BEGIN terminateSession force="+force);
        }

        Session session = request.getSession(false);
        if (session != null) {
            if (force == true
                || this.hasSessionContext() == false) {
                synchronized(session) {
                    session.invalidate();
                }
            }
        }
        if (this.getLogger().isDebugEnabled() == true) {
            this.getLogger().debug("END terminateSession");
View Full Code Here

            this.getLogger().debug("BEGIN createContext name=" + name +
                                   "load=" + loadURI +
                                   "save=" + saveURI);
        }
        // test arguments
        Session session = this.getSession(false);
        if (session == null) {
            throw new IllegalArgumentException("sunShine.createContext: Session is required");
        }
        if (name == null) {
            throw new IllegalArgumentException("sunShine.createContext: Name is required");
View Full Code Here

            throw new IllegalArgumentException("sunShine.deleteContext: Name is required");
        }
        if (SunShine.isReservedContextName(name) == true) {
            throw new ProcessingException("SessionContext with name " + name + " is reserved and cannot be deleted manually.");
        }
        Session session = this.getSession(false);
        if (session == null) {
            throw new IllegalArgumentException("sunShine.deleteContext: Session is required");
        }

        synchronized(session) {
View Full Code Here

        SessionContext context;
        if (SunShine.isReservedContextName(contextName) == true) {
            context = this.getReservedContext(contextName);
        } else {
            Session session = this.getSession(false);
            if (session == null) {
                throw new IllegalArgumentException("sunShine.getContextFragment: Session is required for context " + contextName);
            }
            context = this.getContext(contextName);
        }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.environment.Session

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.