Package javax.portlet

Examples of javax.portlet.PortletContext


    {
        super.init(config);
       
        configPage = config.getInitParameter("ConfigPage");
       
        PortletContext context = getPortletContext();
       
        pageManager = (PageManager) context.getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
       
        if (pageManager == null)
        {
            throw new PortletException("Could not get instance of pageManager component");
        }
       
        pageLayoutComponent = (PageLayoutComponent) context.getAttribute(CommonPortletServices.CPS_PAGE_LAYOUT_COMPONENT);
       
        if (pageLayoutComponent == null)
        {
            throw new PortletException("Could not get instance of pageLayoutComponent");
        }
View Full Code Here


            }
        }
       
        if (previewPage != null)
        {
            PortletContext context = getPortletContext();
            PortletRequestDispatcher rd = context.getRequestDispatcher(previewPage);
            rd.include(request, response);
        }
       
        return;
    }
View Full Code Here

    /* (non-Javadoc)
     * @see javax.portlet.GenericPortlet#doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
     */
    protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
    {
        PortletContext context = getPortletContext();

        Locale locale = request.getLocale();
        if (locale == null)
        {
            locale = Locale.getDefault();
        }
        request.setAttribute("currentLocale", locale.toString());

        PortletRequestDispatcher rd = context.getRequestDispatcher("/WEB-INF/view/locale-list.jsp");
        rd.include(request, response);
    }
View Full Code Here

     * @see org.apache.portals.bridges.velocity.GenericVelocityPortlet#init(javax.portlet.PortletConfig)
     */
    public void init(PortletConfig config) throws PortletException
    {
        super.init(config);
        PortletContext context = getPortletContext();
        trackingManager = (PortletTrackingManager)context.getAttribute(CommonPortletServices.CPS_PORTLET_TRACKING_MANAGER);
    }
View Full Code Here

    static final Logger logger = LoggerFactory.getLogger(StatisticsPortlet.class);

    public void init(PortletConfig config) throws PortletException
    {
        super.init(config);
        PortletContext context = getPortletContext();
        statistics = (PortalStatistics) context
                .getAttribute(CommonPortletServices.CPS_PORTAL_STATISTICS);
        if (statistics == null)
                throw new PortletException(
                        "Could not get instance of portal statistics component");
    }
View Full Code Here

        return getPortletContext().getMimeType(resourceName);
    }

    @Override
    public File getBaseDirectory() {
        PortletContext context = getPortletContext();
        String resultPath = context.getRealPath("/");
        if (resultPath != null) {
            return new File(resultPath);
        } else {
            try {
                final URL url = context.getResource("/");
                return new File(url.getFile());
            } catch (final Exception e) {
                // FIXME: Handle exception
                getLogger()
                        .log(Level.INFO,
View Full Code Here

    @Override
    public InputStream getThemeResourceAsStream(UI uI, String themeName,
            String resource) {
        VaadinPortletSession session = (VaadinPortletSession) uI.getSession();
        PortletContext portletContext = session.getPortletSession()
                .getPortletContext();
        return portletContext.getResourceAsStream("/"
                + VaadinPortlet.THEME_DIR_PATH + '/' + themeName + "/"
                + resource);
    }
View Full Code Here

        }
    }

    public void init(PortletConfig portletConfig) throws PortletException {
        super.init(portletConfig);
        PortletContext pc = portletConfig.getPortletContext();
        normalView = pc
                .getRequestDispatcher("/WEB-INF/view/securityrealmmanager/se/users/normal.jsp");
        addNormalView = pc
                .getRequestDispatcher("/WEB-INF/view/securityrealmmanager/se/users/addnormal.jsp");
        maximizedView = pc
                .getRequestDispatcher("/WEB-INF/view/securityrealmmanager/se/users/maximized.jsp");
        addMaximizedView = pc
                .getRequestDispatcher("/WEB-INF/view/securityrealmmanager/se/users/addmaximized.jsp");
        helpView = pc
                .getRequestDispatcher("/WEB-INF/view/securityrealmmanager/se/users/help.jsp");
        errorView = pc
                .getRequestDispatcher("/WEB-INF/view/securityrealmmanager/derby/groups/error.jsp");
    }
View Full Code Here

        helpView.include(renderRequest, renderResponse);
    }

    public void init(PortletConfig portletConfig) throws PortletException {
        super.init(portletConfig);
        PortletContext pc = portletConfig.getPortletContext();
        normalView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/normal.jsp");
        maximizedView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/maximized.jsp");
        helpView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/help.jsp");
        editHttpView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/editHTTP.jsp");
        editHttpsView = pc.getRequestDispatcher("/WEB-INF/view/webmanager/connector/editHTTPS.jsp");
    }
View Full Code Here

        Integer stop;
        String text;
    }

    public void init(PortletConfig portletConfig) throws PortletException {
        PortletContext pc = portletConfig.getPortletContext();
        normalView = pc
                .getRequestDispatcher("/WEB-INF/view/derbylogmanager/view.jsp");
        helpView = pc
                .getRequestDispatcher("/WEB-INF/view/derbylogmanager/help.jsp");
        super.init(portletConfig);
    }
View Full Code Here

TOP

Related Classes of javax.portlet.PortletContext

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.