Package org.apache.jetspeed.factory

Examples of org.apache.jetspeed.factory.PortletFactory


                try
                {
                    PortletRegistry registry = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletRegistry();
                    PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
                    PortletDefinition def = app.getPortlet(paNodeBean.getName());
                    PortletFactory factory = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletFactory();
                    factory.reloadResourceBundles(def);
                }
                catch (Exception e)
                {
                    logger.error("Failed to reload the resource bundle of application.", e);
                    StringResourceModel resModel = new StringResourceModel("pam.details.action.status.resource.bundle.reloadFailure", this, null, new Object [] { paNodeBean.getApplicationName() + "::" + paNodeBean.getName(), e.getMessage() } );
View Full Code Here


               
                try
                {
                    PortletRegistry registry = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletRegistry();
                    PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
                    PortletFactory factory = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletFactory();
                    factory.reloadResourceBundles(app);
                }
                catch (Exception e)
                {
                    logger.error("Failed to reload the resource bundle of application.", e);
                    StringResourceModel resModel = new StringResourceModel("pam.details.action.status.resource.bundle.reloadFailure", this, null, new Object [] { paNodeBean.getApplicationName(), e.getMessage() } );
View Full Code Here

    private void refreshCustomConfigModePortletInstance()
    {
        try
        {
            PortletRegistry registry = (PortletRegistry) Jetspeed.getComponentManager().getComponent("portletRegistry");
            PortletFactory portletFactory = (PortletFactory) Jetspeed.getComponentManager().getComponent("portletFactory");
            ServletContext portalAppContext = ((ServletConfig) Jetspeed.getComponentManager().getComponent("ServletConfig")).getServletContext();
           
            PortletDefinitionComposite portletDef = (PortletDefinitionComposite) registry.getPortletDefinitionByUniqueName(this.customConfigModePortletUniqueName);
            MutablePortletApplication portletApp = (MutablePortletApplication) portletDef.getPortletApplicationDefinition();
            WebApplicationDefinition webAppDef = portletApp.getWebApplicationDefinition();
            String portletAppName = webAppDef.getContextRoot();
            ServletContext portletAppContext = portalAppContext.getContext(portletAppName);
           
            setPortletObjectProxied(true);
            this.customConfigModePortletInstance = portletFactory.getPortletInstance(portletAppContext, portletDef);
        }
        catch (Exception e)
        {
        }
        finally
View Full Code Here

        accessor.createPortletWindow((PortletEntity)entityMock.proxy(), "111");
        accessor.createPortletWindow((PortletEntity)entityMock.proxy(), "222");
        accessor.createPortletWindow((PortletEntity)entityMock.proxy(), "333");
       
        // register mocked PortletApplication in PortletFactory so the PortletWindowAccessor check for it won't break the tests
        PortletFactory portletFactory = (PortletFactory)engine.getComponentManager().getComponent("portletFactory");
        portletFactory.registerPortletApplication((PortletApplication)portletApplicationMock.proxy(),Thread.currentThread().getContextClassLoader());
       
        codec = (NavigationalStateCodec) engine.getComponentManager().getComponent("NavigationalStateCodec");
        portalContext = (PortalContext) engine.getComponentManager().getComponent("PortalContext")
        cache = (JetspeedContentCache) engine.getComponentManager().getComponent("portletContentCache");
    }
View Full Code Here

        accessor.createPortletWindow((PortletEntity)entityMock.proxy(), "111");
        accessor.createPortletWindow((PortletEntity)entityMock.proxy(), "222");
        accessor.createPortletWindow((PortletEntity)entityMock.proxy(), "333");
       
        // register mocked PortletApplication in PortletFactory so the PortletWindowAccessor check for it won't break the tests
        PortletFactory portletFactory = (PortletFactory)engine.getComponentManager().getComponent("portletFactory");
        portletFactory.registerPortletApplication((PortletApplication)portletApplicationMock.proxy(),Thread.currentThread().getContextClassLoader());
       
        codec = (NavigationalStateCodec) engine.getComponentManager().getComponent("NavigationalStateCodec");
        portalContext = (PortalContext) engine.getComponentManager().getComponent("PortalContext")
        cache = (JetspeedContentCache) engine.getComponentManager().getComponent("portletContentCache");
    }
View Full Code Here

        accessor.createPortletWindow((PortletEntity)entityMock.proxy(), "111");
        accessor.createPortletWindow((PortletEntity)entityMock.proxy(), "222");
        accessor.createPortletWindow((PortletEntity)entityMock.proxy(), "333");
       
        // register mocked PortletApplication in PortletFactory so the PortletWindowAccessor check for it won't break the tests
        PortletFactory portletFactory = (PortletFactory)engine.getComponentManager().getComponent("portletFactory");
        portletFactory.registerPortletApplication((PortletApplication)portletApplicationMock.proxy(),Thread.currentThread().getContextClassLoader());
       
        codec = (NavigationalStateCodec) engine.getComponentManager().getComponent("NavigationalStateCodec");
        portalContext = (PortalContext) engine.getComponentManager().getComponent("PortalContext")
        cache = (JetspeedCache) engine.getComponentManager().getComponent("portletContentCache");
    }
View Full Code Here

                try
                {
                    PortletRegistry registry = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletRegistry();
                    PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
                    PortletDefinition def = PortletApplicationUtils.getPortletOrClone(app, paNodeBean.getName());
                    PortletFactory factory = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletFactory();
                    factory.reloadResourceBundles(def);
                }
                catch (Exception e)
                {
                    logger.error("Failed to reload the resource bundle of application.", e);
                    StringResourceModel resModel = new StringResourceModel("pam.details.action.status.resource.bundle.reloadFailure", this, null, new Object [] { paNodeBean.getApplicationName() + "::" + paNodeBean.getName(), e.getMessage() } );
View Full Code Here

               
                try
                {
                    PortletRegistry registry = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletRegistry();
                    PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
                    PortletFactory factory = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletFactory();
                    factory.reloadResourceBundles(app);
                }
                catch (Exception e)
                {
                    logger.error("Failed to reload the resource bundle of application.", e);
                    StringResourceModel resModel = new StringResourceModel("pam.details.action.status.resource.bundle.reloadFailure", this, null, new Object [] { paNodeBean.getApplicationName(), e.getMessage() } );
View Full Code Here

    }
      
    private void refreshCustomConfigModePortletInstance() throws PortletException
    {
        PortletRegistry registry = (PortletRegistry) Jetspeed.getComponentManager().getComponent("portletRegistry");
        PortletFactory portletFactory = (PortletFactory) Jetspeed.getComponentManager().getComponent("portletFactory");
        ServletContext portalAppContext = ((ServletConfig) Jetspeed.getComponentManager().getComponent("ServletConfig")).getServletContext();
       
        PortletDefinition portletDef = registry.getPortletDefinitionByUniqueName(this.customConfigModePortletUniqueName, true);
        PortletApplication portletApp = portletDef.getApplication();
        ServletContext portletAppContext = portalAppContext.getContext(portletApp.getContextPath());
       
        this.customConfigModePortletInstance = portletFactory.getPortletInstance(portletAppContext, portletDef, false);
    }
View Full Code Here

    }
      
    private PortletInstance getPortletInstance(String portletUniqueName) throws PortletException
    {
        PortletRegistry registry = (PortletRegistry) Jetspeed.getComponentManager().getComponent("portletRegistry");
        PortletFactory portletFactory = (PortletFactory) Jetspeed.getComponentManager().getComponent("portletFactory");
        ServletContext portalAppContext = ((ServletConfig) Jetspeed.getComponentManager().getComponent("ServletConfig")).getServletContext();
       
        PortletDefinition portletDef = registry.getPortletDefinitionByUniqueName(portletUniqueName, true);
        PortletApplication portletApp = portletDef.getApplication();
        ServletContext portletAppContext = portalAppContext.getContext(portletApp.getContextPath());
       
        return portletFactory.getPortletInstance(portletAppContext, portletDef, false);
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.factory.PortletFactory

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.