Examples of PortletContext


Examples of javax.portlet.PortletContext

        searchView.include(renderRequest, renderRespose);
    }

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

Examples of javax.portlet.PortletContext

        CurrentInstance.clearAll();
        super.init(config);
        Properties initParameters = new Properties();

        // Read default parameters from the context
        final PortletContext context = config.getPortletContext();
        for (final Enumeration<String> e = context.getInitParameterNames(); e
                .hasMoreElements();) {
            final String name = e.nextElement();
            initParameters.setProperty(name, context.getInitParameter(name));
        }

        // Override with application settings from portlet.xml
        for (final Enumeration<String> e = config.getInitParameterNames(); e
                .hasMoreElements();) {
View Full Code Here

Examples of javax.portlet.PortletContext

    private PortalAdministration admin;

    public void init(PortletConfig config) throws PortletException
    {
        super.init(config);
        PortletContext context = getPortletContext();
        spacesService = (Spaces) context.getAttribute(CommonPortletServices.CPS_SPACES_SERVICE);
        if (spacesService == null)
                throw new PortletException(
                        "Could not get instance of portal spaces service component");
        admin = (PortalAdministration) getPortletContext().getAttribute(
                CommonPortletServices.CPS_PORTAL_ADMINISTRATION);
View Full Code Here

Examples of javax.portlet.PortletContext

   
    public void init(PortletConfig config) throws PortletException
    {
        super.init(config);
       
        PortletContext context = getPortletContext();
       
        pageLayoutComponent = (PageLayoutComponent) context.getAttribute(CommonPortletServices.CPS_PAGE_LAYOUT_COMPONENT);
       
        if (pageLayoutComponent == null)
        {
            throw new PortletException("Failed to find the Page Layout Component on portlet initialization");
        }       
       
        decorationFactory = (DecorationFactory)context.getAttribute(CommonPortletServices.CPS_DECORATION_FACTORY);
       
        if (decorationFactory == null)
        {
            throw new PortletException("Failed to find the Decoration Factory on portlet initialization");
        }       
View Full Code Here

Examples of javax.portlet.PortletContext

  protected String yuiScriptPath = "/javascript/yui/build/yui/yui-min.js";

  public void init(PortletConfig config) throws PortletException {
    super.init(config);

    PortletContext context = getPortletContext();

    userManager = (UserManager) context.getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT);

    if (userManager == null) {
      throw new PortletException("Failed to find the User Manager Component on portlet initialization");
    }
View Full Code Here

Examples of javax.portlet.PortletContext

    protected String yuiScriptPath = "/javascript/yui/build/yui/yui-min.js";
   
    public void init(PortletConfig config) throws PortletException
    {
        super.init(config);
        PortletContext context = getPortletContext();
        spacesService = (Spaces) context.getAttribute(CommonPortletServices.CPS_SPACES_SERVICE);
        if (spacesService == null)
        {
                throw new PortletException(
                        "Could not get instance of portal spaces service component");
        }
View Full Code Here

Examples of javax.portlet.PortletContext

   
    @Override
    public void init(PortletConfig config) throws PortletException
    {
        super.init(config);
        PortletContext context = getPortletContext();
        spacesService = (Spaces) context.getAttribute(CommonPortletServices.CPS_SPACES_SERVICE);
        if (spacesService == null)
                throw new PortletException(
                        "Could not get instance of portal spaces service component");
        admin = (PortalAdministration) getPortletContext().getAttribute(
                CommonPortletServices.CPS_PORTAL_ADMINISTRATION);
        if (null == admin) { throw new PortletException(
                "Failed to find the Portal Administration on portlet initialization"); }
        pageManager = (PageManager)context.getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
        if (null == pageManager)
        {
            throw new PortletException("Failed to find the Page Manager on portlet initialization");
        }
        try
View Full Code Here

Examples of javax.portlet.PortletContext

   
    public void init(PortletConfig config) throws PortletException
    {
        super.init(config);
       
        PortletContext context = getPortletContext();
       
        spacesService = (Spaces) context.getAttribute(CommonPortletServices.CPS_SPACES_SERVICE);
        if (spacesService == null)
        {
            throw new PortletException("Could not get instance of portal spaces service component");
        }
       
        admin = (PortalAdministration) context.getAttribute(CommonPortletServices.CPS_PORTAL_ADMINISTRATION);
        if (admin == null)
        {
            throw new PortletException("Failed to find the Portal Administration on portlet initialization");
        }
       
        pageManager = (PageManager)context.getAttribute(CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
        if (pageManager == null)
        {
            throw new PortletException("Failed to find the Page Manager on portlet initialization");
        }
       
        userManager = (UserManager) context.getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT);
        if (null == userManager)
        {
            throw new PortletException("Failed to find the user manager on portlet initialization");
        }               
       
        decorationFactory = (DecorationFactory)context.getAttribute(CommonPortletServices.CPS_DECORATION_FACTORY);
        if (null == decorationFactory)
        {
            throw new PortletException("Failed to find the Decoration Factory on portlet initialization");
        }               
    }
View Full Code Here

Examples of javax.portlet.PortletContext

   
   
    public void init(PortletConfig config) throws PortletException
    {
        super.init(config);
        PortletContext context = getPortletContext();
        pm = (PermissionManager) context
                .getAttribute(CommonPortletServices.CPS_PERMISSION_MANAGER);
        if (pm == null)
                throw new PortletException(
                        "Could not get instance of portal permission manager component");
        rm = (RoleManager) context
                .getAttribute(CommonPortletServices.CPS_ROLE_MANAGER_COMPONENT);
        if (rm == null)
            throw new PortletException(
                "Could not get instance of portal role manager component");       
    }
View Full Code Here

Examples of javax.portlet.PortletContext

   
    public void init(PortletConfig config)
    throws PortletException
    {
        super.init(config);
        PortletContext context = getPortletContext();               
        registry = (PortletRegistry)context.getAttribute(CommonPortletServices.CPS_REGISTRY_COMPONENT);
        if (null == registry)
        {
            throw new PortletException("Failed to find the Portlet Registry on portlet initialization");
        }       
        searchEngine = (SearchEngine)context.getAttribute(CommonPortletServices.CPS_SEARCH_COMPONENT);
        if (null == searchEngine)
        {
            throw new PortletException("Failed to find the Search Engine on portlet initialization");
        }
        securityAccessController = (SecurityAccessController)context.getAttribute(CommonPortletServices.CPS_SECURITY_ACCESS_CONTROLLER);
        if (null == securityAccessController)
        {
            throw new PortletException("Failed to find the Security Access Controller on portlet initialization");
        }
        profiler = (Profiler)context.getAttribute(CommonPortletServices.CPS_PROFILER_COMPONENT);
        if (null == profiler)
        {
            throw new PortletException("Failed to find the Profiler on portlet initialization");
        }       
        pageLayoutComponent = (PageLayoutComponent)context.getAttribute(CommonPortletServices.CPS_PAGE_LAYOUT_COMPONENT);
        if (null == pageLayoutComponent)
        {
            throw new PortletException("Failed to find the PageLayoutComponent on portlet initialization");
        }       
        preferenceService = (PortletPreferencesProvider)context.getAttribute(CommonPortletServices.CPS_PORTLET_PREFERENCES_PROVIDER);
        if (null == preferenceService)
        {
            throw new PortletException("Failed to find the Prefs Service on portlet initialization");
        }
        rand = new Random( 19580427 );
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.