Package org.apache.jetspeed.serializer.objects

Examples of org.apache.jetspeed.serializer.objects.JSApplication


      return;
    }
    Iterator it = applications.iterator();
    while (it.hasNext())
    {
      JSApplication app = (JSApplication)it.next();
      MutablePortletApplication portletApp = registry.getPortletApplication(app.getName());
      if (portletApp != null)
      {
        importPA(app,portletApp);
      }
    }
View Full Code Here


            return;
        }
        Iterator it = applications.iterator();
        while (it.hasNext())
        {
            JSApplication app = (JSApplication) it.next();
            PortletApplication portletApp = registry.getPortletApplication(app.getName());
            if (portletApp != null)
            {
                importPA(app, portletApp, settings, log);
            }
        }
View Full Code Here

            try
            {
                PortletApplication pa = (PortletApplication) list.next();
                // PortletApplicationDefinition pa =
                // (PortletApplicationDefinition)list.next();
                JSApplication app = exportPA(pa, settings, log);
                if (app != null)
                {
                    snapshot.getApplications().add(app);
                }
            }
View Full Code Here

        }
    }

    private JSApplication exportPA(PortletApplication pa, Map settings, Logger log) throws SerializerException
    {
        JSApplication jsApplication = null;
        /**
         * while more PAs for each portletDef list:entityMan:getPortletEntity(pd)
         */
        Iterator pi = pa.getPortlets().iterator();
        PortletDefinition pd = null;
        JSPortlets portlets = new JSPortlets();
        while (pi.hasNext())
        {
            try
            {
                pd = (PortletDefinition) pi.next();
                JSPortlet p = exportPD(pd, settings, log);
                if (p != null)
                {
                    log.debug("--processed PA " + pa.getName() + " with pd=" + pd.getPortletName());
                    portlets.add(p);
                }
                else
                    log.debug("--processed PA " + pa.getName() + " with NULL pd=" + pd.getPortletName());
            }
            catch (Exception e)
            {
                throw new SerializerException(SerializerException.CREATE_SERIALIZED_OBJECT_FAILED.create(new String[] { "PortletDefinition", e.getMessage() }),
                                              e);
            }
        }
        if (!portlets.isEmpty())
        {
            jsApplication = new JSApplication();
            log.debug("--exporting PA " + pa.getName());
            // jsApplication.setID(pa.getName().toString());
            jsApplication.setName(pa.getName());
            jsApplication.setPortlets(portlets);
        }
        return jsApplication;
    }
View Full Code Here

    if (!applications.isEmpty())
    {
            Iterator it = applications.iterator();
            while (it.hasNext())
            {
                JSApplication app = (JSApplication) it.next();
                PortletApplication portletApp = registry.getPortletApplication(app.getName());
            if ((portletApp != null) || importAll)
                {
                    importPA(app, portletApp, settings, log);
                }
            }
View Full Code Here

            try
            {
                PortletApplication pa = (PortletApplication) list.next();
                // PortletApplicationDefinition pa =
                // (PortletApplicationDefinition)list.next();
                JSApplication app = exportPA(pa, settings, log);
                if (app != null)
                {
                    snapshot.getApplications().add(app);
                }
            }
View Full Code Here

        }
    }

    private JSApplication exportPA(PortletApplication pa, Map settings, Logger log) throws SerializerException
    {
        JSApplication jsApplication = null;
        /**
         * while more PAs for each portletDef list:entityMan:getPortletEntity(pd)
         */
        Iterator pi = pa.getPortlets().iterator();
        PortletDefinition pd = null;
        JSPortlets portlets = new JSPortlets();
        while (pi.hasNext())
        {
            try
            {
                pd = (PortletDefinition) pi.next();
                JSPortlet p = exportPD(pd, settings, log);
                if (p != null)
                {
                    log.debug("--processed PA " + pa.getName() + " with pd=" + pd.getPortletName());
                    portlets.add(p);
                }
                else
                    log.debug("--processed PA " + pa.getName() + " with NULL pd=" + pd.getPortletName());
            }
            catch (Exception e)
            {
                throw new SerializerException(SerializerException.CREATE_SERIALIZED_OBJECT_FAILED.create(new String[] { "PortletDefinition", e.getMessage() }),
                                              e);
            }
        }
        if (!portlets.isEmpty())
        {
            jsApplication = new JSApplication();
            log.debug("--exporting PA " + pa.getName());
            // jsApplication.setID(pa.getName().toString());
            jsApplication.setName(pa.getName());
            jsApplication.setPortlets(portlets);
        }
        return jsApplication;
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.serializer.objects.JSApplication

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.