Package javax.portlet

Examples of javax.portlet.PortletSession


                }
            }
            if (found != null) {
                data.jars = new String[]{found.getRepositoryURI()};
                WriteableRepository repo = PortletManager.getCurrentServer(actionRequest).getWritableRepositories()[0];
                final PortletSession session = actionRequest.getPortletSession();
                ProgressInfo progressInfo = new ProgressInfo();
                progressInfo.setMainMessage("Downloading " + found.getName());
                session.setAttribute(ProgressInfo.PROGRESS_INFO_KEY, progressInfo, PortletSession.APPLICATION_SCOPE);
                // Start the download monitoring
                new Thread(new Downloader(found, progressInfo, repo)).start();
                actionResponse.setRenderParameter(MODE_KEY, DOWNLOAD_STATUS_MODE);
            } else {
                actionResponse.setRenderParameter(MODE_KEY, DOWNLOAD_MODE);
View Full Code Here


    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
        return getMode();
    }

    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model) throws PortletException, IOException {
        PortletSession assemblysession = request.getPortletSession(false);
        List<PluginInfoBean> plugins = (List<PluginInfoBean>) assemblysession.getAttribute("plugins");
        String assemblyFileLocation = request.getParameter("assemblyFileLocation");
        File deployedPath = new File(assemblyFileLocation);
        if (!deployedPath.isAbsolute()) {
            deployedPath = new File(System.getProperty("org.apache.geronimo.home.dir"), assemblyFileLocation);
        }
View Full Code Here

    private void renderTestLoginForm(RenderRequest request, RenderResponse response) throws IOException, PortletException {
        testLoginView.include(request, response);
    }

    private void renderTestResults(RenderRequest request, RenderResponse response) throws IOException, PortletException {
        PortletSession session = request.getPortletSession();
        String status = (String) session.getAttribute("TestLoginError");
        if (status == null) {
            Set principals = (Set) session.getAttribute("TestLoginPrincipals");
            status = "Login succeeded with " + (principals == null ? 0 : principals.size()) + " principals";
            request.setAttribute("principals", principals);
        }
        request.setAttribute("LoginResults", status);
        testResultsView.include(request, response);
View Full Code Here

        request.setAttribute("groupId", groupId);
        request.setAttribute("artifactId", artifactId);
        request.setAttribute("version", version);
        request.setAttribute("format", format);
       
        PortletSession assemblysession = request.getPortletSession(true);
        assemblysession.setAttribute("plugins", plugins);

        request.setAttribute("allInstallable", true);
        request.setAttribute("mode", ASSEMBLY_VIEW_MODE + "-after");
    }
View Full Code Here

        request.getPortletSession().setAttribute(name, value, scope);
    }

    @Override
    public void removeValue(String name) {
        PortletSession session = request.getPortletSession(false);
        if (session != null) {
            session.removeAttribute(name, scope);
        }
    }
View Full Code Here

        }
    }

    @Override
    public Enumeration<String> getKeys() {
        PortletSession session = request.getPortletSession(false);
        if (session != null) {
            return session.getAttributeNames(scope);
        }
        return null;
    }
View Full Code Here

        return null;
    }

    @Override
    public Object getValue(String key) {
        PortletSession session = request.getPortletSession(false);
        if (session != null) {
            return session.getAttribute(key, scope);
        }
        return null;
    }
View Full Code Here

        _portletRequest = portletRequest;
    }

    protected Object getAttribute(String key)
    {
        PortletSession portletSession = getSession();
        return (portletSession == null)
               ? null : portletSession.getAttribute(key.toString(), PortletSession.PORTLET_SCOPE);
    }
View Full Code Here

        _portletRequest.getPortletSession(true).setAttribute(key, value, PortletSession.PORTLET_SCOPE);
    }

    protected void removeAttribute(String key)
    {
        PortletSession portletSession = getSession();
        if (portletSession != null)
        {
            portletSession.removeAttribute(key, PortletSession.PORTLET_SCOPE);
        }
    }
View Full Code Here

        }
    }

    protected Enumeration getAttributeNames()
    {
        PortletSession portletSession = getSession();
        return (portletSession == null)
               ? NullEnumeration.instance()
               : portletSession.getAttributeNames(PortletSession.PORTLET_SCOPE);
    }
View Full Code Here

TOP

Related Classes of javax.portlet.PortletSession

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.