Package org.apache.cocoon.environment

Examples of org.apache.cocoon.environment.Session.removeAttribute()


        Session session = request.getSession(false);

        if (session != null) {
            session.removeAttribute(Identity.class.getName());
            RepositoryUtil.removeSession(manager, request);
            session.removeAttribute(Login.HISTORY_SESSION_ATTRIBUTE);
        }
    }
}
View Full Code Here


     * Removes the clipboard from the session.
     * @param context The context.
     */
    public void removeClipboard(Context context) {
        Session session = getSession(context);
        session.removeAttribute(getSessionAttributeName());
    }
   
}
View Full Code Here

        getLogger().debug(statekey+"="+newstate);

    } else { // sublevels != 0
        oldstate = (String) session.getAttribute( statekey + Integer.toString(mylevel) );
        for (int i=mylevel+1; i<=sublevels; i++) {
      session.removeAttribute( statekey+Integer.toString(i) );
      getLogger().debug("remove "+statekey+Integer.toString(i));
        }
        session.setAttribute( statekey + Integer.toString(mylevel), newstate);
        getLogger().debug(statekey+Integer.toString(mylevel)+"="+newstate);
    }
View Full Code Here

            getLogger().debug(statekey+"="+newstate);

        } else { // sublevels != 0
            oldstate = (String) session.getAttribute( statekey + Integer.toString(mylevel) );
            for (int i=mylevel+1; i<=sublevels; i++) {
            session.removeAttribute( statekey+Integer.toString(i) );
            getLogger().debug("remove "+statekey+Integer.toString(i));
            }
            session.setAttribute( statekey + Integer.toString(mylevel), newstate);
            getLogger().debug(statekey+Integer.toString(mylevel)+"="+newstate);
        }
View Full Code Here

                throw new CascadingRuntimeException("Unable to get application '"
                                                    + appName + "'", ignore);
            }

            // remove application data from session
            session.removeAttribute(APPLICATION_KEY_PREFIX + appName);

            // remove application from object model
            if ( app.equals( ApplicationUtil.getApplication(objectModel) ) ) {
                objectModel.remove(ApplicationManager.APPLICATION);
                objectModel.remove(ApplicationManager.APPLICATION_DATA);
View Full Code Here

                objectModel.remove(ApplicationManager.APPLICATION_DATA);
                objectModel.remove(ApplicationManager.USER);
            }

            // remove user
            session.removeAttribute(USER + '-' + appName);

            // decrement logininfo counter
            final Map loginInfos = (Map)session.getAttribute(LOGIN_INFO_KEY);
            if ( loginInfos != null ) {
                final LoginInfo info = (LoginInfo)loginInfos.get(app.getSecurityHandler().getId());
View Full Code Here

                        // remove user info
                        loginInfos.remove(app.getSecurityHandler().getId());
                        if ( loginInfos.size() > 0 ) {
                            session.setAttribute(LOGIN_INFO_KEY, loginInfos);
                        } else {
                            session.removeAttribute(LOGIN_INFO_KEY);
                            // the user has left all applications, test the mode:
                            String mode = null;
                            if ( logoutContext != null ) {
                                mode = (String)logoutContext.get(LOGOUT_CONTEXT_MODE_KEY);
                            }
View Full Code Here

        Map objectModel = ContextHelper.getObjectModel(getContext());
        Request request = ObjectModelHelper.getRequest(objectModel);
        Session session = request.getSession(false);

        if (session != null) {
            session.removeAttribute(Identity.class.getName());
        }
    }
}
View Full Code Here

        String parent_uri =
            (String) session.getAttribute(
                "org.apache.lenya.cms.cocoon.acting.TaskAction.parent_uri");
        HashMap actionMap = new HashMap();
        actionMap.put("parent_uri", parent_uri);
        session.removeAttribute("org.apache.lenya.cms.cocoon.acting.TaskAction.parent_uri");

        return actionMap;
    }
}
View Full Code Here

                    }
                    this.addRole(role, pars, handler);
                } else {
                    role = null;
                }
                session.removeAttribute(SESSION_CONTEXT_ATTRIBUTE_ADMIN_ROLE);
            }

            if (state.equals("delrole") == true) {
                try {
                    String role = request.getParameter(REQ_PARAMETER_ROLE);
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.