Package org.apache.pluto.om.portlet

Examples of org.apache.pluto.om.portlet.PortletApplicationDefinition


                {
                    entityID = entity.getId().toString();
                }
                PortletApplicationEntity portletAppEntity = portletWindow.getPortletEntity()
                        .getPortletApplicationEntity();
                PortletApplicationDefinition portletAppDef = entity.getPortletDefinition()
                        .getPortletApplicationDefinition();

                if (null != portletAppDef)
                {
                    value = context.getUserInfoMap(portletAppDef.getId());
                    if (log.isDebugEnabled() && (null != value))
                        log.debug(PortletRequest.USER_INFO + " map size: " + ((Map) value).size());
                }
                else
                {
View Full Code Here


                PortletEntity entity = portletWindow.getPortletEntity();
                if (entity != null)
                {
                    entityID = entity.getId().toString();
                }
                PortletApplicationDefinition portletAppDef = entity.getPortletDefinition()
                        .getPortletApplicationDefinition();

                if (null != portletAppDef)
                {
                    value = context.getUserInfoMap(portletAppDef.getId());
                    if (log.isDebugEnabled() && (null != value))
                        log.debug(PortletRequest.USER_INFO + " map size: " + ((Map) value).size());
                }
                else
                {
View Full Code Here

        assertNotNull(this.registry);
    }

    public void testEntities() throws Exception
    {
        PortletApplicationDefinition pa = registry.getPortletApplication(TEST_APP);
        assertNotNull("Portlet Application", pa);
        System.out.println("pa = " + pa.getId());
        PortletDefinitionList portlets = pa.getPortletDefinitionList(); // .get(JetspeedObjectID.createFromString(TEST_PORTLET));
        Iterator pi = portlets.iterator();
        PortletDefinitionComposite pd = null;
        while (pi.hasNext())
        {
            pd = (PortletDefinitionComposite) pi.next();
View Full Code Here

        if (entity != null)
        {
            entityAccess.removePortletEntity(entity);
        }

        PortletApplicationDefinition pa = registry.getPortletApplication(TEST_APP);
        System.out.println("pa == " + pa);
        if (pa != null)
        {
            registry.removeApplication(pa);
        }
View Full Code Here

    {

        Iterator iterator = registry.iterator();
        while (iterator.hasNext())
        {
            PortletApplicationDefinition papp = (PortletApplicationDefinition)iterator.next();

            // fill portletsKeyObjectId
            Iterator portlets = papp.getPortletDefinitionList().iterator();
            while (portlets.hasNext())
            {
                PortletDefinition portlet = (PortletDefinition)portlets.next();

                portletsKeyObjectId.put(portlet.getId(), portlet);
View Full Code Here

     * @see org.apache.pluto.portalImpl.om.common.Support#preBuild(Object)
     */
    public void preBuild(Object parameter) throws Exception
    {
        Vector structure = (Vector)parameter;
        PortletApplicationDefinition portletApplication = (PortletApplicationDefinition)structure.get(0);
        Map servletMap = (Map)structure.get(1);

        Iterator iterator = this.iterator();
        while (iterator.hasNext()) {
            PortletDefinition portlet = (PortletDefinition)iterator.next();
View Full Code Here

        List contexts = loadDefinitionList(context, DEFAULT_CONTEXTS);
        registry = new PortletApplicationDefinitionListImpl();
        for (Iterator i = contexts.iterator(); i.hasNext();) {
            String contextRoot = (String) i.next();
            PortletApplicationDefinition portletApp = loadApplicationDefinition(context, contextRoot);
            registry.add(portletApp);
        }

        definitions = new HashMap();
        for (Iterator i = registry.iterator(); i.hasNext();) {
            PortletApplicationDefinition application = (PortletApplicationDefinition) i.next();

            for (Iterator j = application.getPortletDefinitionList().iterator(); j.hasNext();) {
                PortletDefinition portlet = (PortletDefinition) j.next();
                definitions.put(portlet.getId(), portlet);
            }
        }
    }
View Full Code Here

                    if ( (displayName != null) && (displayName.equals(appName)) )
                      found = true;
                }
                if (!found) {
                    for (Iterator iter = definitionList.iterator(); !found && iter.hasNext();) {
                        PortletApplicationDefinition portletApp = (PortletApplicationDefinition)iter.next();
                        if (portletApp.getId().toString().equals(appName)) {
                            //PortletApplicationEntityListCtrl appEntityListCtrl = (PortletApplicationEntityListCtrl)ControllerObjectAccess.get(entityList);
                            PortletApplicationEntityListCtrl appEntityListCtrl = (PortletApplicationEntityListCtrl)entityList;
                            appEntity = appEntityListCtrl.add(portletApp.getId().toString());
                            log("added Portlet Application " + appName + " to PortletEntityRegistry");
                            found = true;
                        }
                    }
                }
                if ( !found ) {
                    log("Portlet Application "+appName+" not found!");
                    throw new ServletException("Portlet Application "+appName+" not found!");
                }
                portletIt = appEntity.getPortletEntityList().iterator();
                PortletEntity portlet = null;
                // search for portlet
                found = false;
                while ( portletIt.hasNext() && ! found ) {
                    portlet = (PortletEntity) portletIt.next();
                    PortletDefinition tmpPortletDef = portlet.getPortletDefinition();
                    if ( tmpPortletDef == null ) {
                      log("ERROR: Portlet definition of portlet enity (id="+portlet.getId()+") not found!");
                      log("       Portlet may not be defined in portlet.xml!");
                      throw new ServletException("Portlet definition of portlet enity (id="+portlet.getId()+") not found!");
                  }
                    String tmpPortletName = tmpPortletDef.getName();
                    //delete all existing preferences for this portlet entity
                    if (tmpPortletName != null && tmpPortletName.equals(portletName)) {
                        for (Iterator iter = portlet.getPreferenceSet().iterator(); iter.hasNext();) {
                            iter.next();
                            iter.remove();
                        }
                        found = true;
                    }
                }
                if (!found) {
                    for (Iterator appIter = definitionList.iterator(); !found && appIter.hasNext();) {
                        PortletApplicationDefinition appDef = (PortletApplicationDefinition)appIter.next();
                        if (appDef.getId().toString().equals(appName)) {
                            for (Iterator portletIter = appDef.getPortletDefinitionList().iterator(); !found && portletIter.hasNext();) {
                                PortletDefinition portletDef = (PortletDefinition)portletIter.next();
                                if (portletDef.getId().toString().equals(appName + "." + portletName)) {
                                    //PortletEntityListCtrl entityListCtrl = (PortletEntityListCtrl)ControllerObjectAccess.get(appEntity.getPortletEntityList());
                                    PortletEntityListCtrl entityListCtrl = (PortletEntityListCtrl)appEntity.getPortletEntityList();
                                    portlet = entityListCtrl.add(appEntity, portletDef.getId().toString());
View Full Code Here

        return portlets;
    }

    public PortletApplicationDefinition getPortletApplicationDefinition()
    {
        PortletApplicationDefinition definition =
            PortletDefinitionRegistry.getPortletApplicationDefinitionList()
                .get(org.apache.pluto.portalImpl.util.ObjectID.createFromString(definitionId));
        if(definition == null) {
            throw new ConfigurationException("Unable to find portlet application definition. "+
                    "Ensure that all portlets definied within the portlet registry are correct" +
View Full Code Here

    }

    public void postLoad(Object parameter) throws Exception
    {
        Vector structure = (Vector)parameter;
        PortletApplicationDefinition portletApplication = (PortletApplicationDefinition)structure.get(0);
        String contextString = (String)structure.get(1);

        ((Support)portletApplication).postLoad(this);

        ((Support)servlets).postLoad(this);
View Full Code Here

TOP

Related Classes of org.apache.pluto.om.portlet.PortletApplicationDefinition

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.