portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r707522 - in /portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade: components/jetspeed-portal/src/main/java/org/apache/jetspeed/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/ components/jetspeed...
Date Fri, 24 Oct 2008 01:25:12 GMT
Author: ate
Date: Thu Oct 23 18:25:11 2008
New Revision: 707522

URL: http://svn.apache.org/viewvc?rev=707522&view=rev
Log:
JS2-871 - Upgrade Pluto container to version 2.0
See:  http://issues.apache.org/jira/browse/JS2-871
- another batch of small new API usage alignments 

Modified:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecorationValve.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPageAction.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/PortletPlacementContextImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/rules/PortletRule.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/registration/RegistrationTool.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/ExtendedPortletMetadata.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationDescriptor.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationWar.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletPreferenceRule.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletRule.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/WebApplicationDescriptor.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/servlet/WebApplicationDefinition.java

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/JetspeedPortalContext.java Thu Oct 23 18:25:11 2008
@@ -202,7 +202,7 @@
         PortletRequestContext ctx = PortletRequestContext.getContext();
         if ( ctx != null )
         {
-            PortletApplication pa = ((PortletApplication)ctx.getPortletDefinition().getPortletApplicationDefinition());
+            PortletApplication pa = ((PortletApplication)ctx.getPortletDefinition().getApplication());
             return pa.getSupportedPortletModes();
         }
         return JetspeedActions.getStandardPortletModes();
@@ -226,7 +226,7 @@
         PortletRequestContext ctx = PortletRequestContext.getContext();
         if ( ctx != null )
         {
-            PortletApplication pa = ((PortletApplication)ctx.getPortletDefinition().getPortletApplicationDefinition());
+            PortletApplication pa = ((PortletApplication)ctx.getPortletDefinition().getApplication());
             return pa.getSupportedWindowStates();
         }
         return JetspeedActions.getStandardWindowStates();

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java Thu Oct 23 18:25:11 2008
@@ -75,7 +75,7 @@
         {
             if (!JetspeedActions.getStandardWindowStates().contains(windowState))
             {
-                PortletApplication pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getPortletApplicationDefinition();
+                PortletApplication pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getApplication();
                 windowState = pa.getMappedWindowState(windowState);
             }
             String windowId = window.getId().toString();
@@ -103,7 +103,7 @@
         {
             if (!JetspeedActions.getStandardPortletModes().contains(portletMode))
             {
-                PortletApplication pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getPortletApplicationDefinition();
+                PortletApplication pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getApplication();
                 portletMode = pa.getMappedPortletMode(portletMode);
             }
             String windowId = window.getId().toString();
@@ -145,7 +145,7 @@
         WindowState state = getMappedState(window.getId().toString());
         if (state != null && !JetspeedActions.getStandardWindowStates().contains(state))
         {
-            PortletApplication pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getPortletApplicationDefinition();
+            PortletApplication pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getApplication();
             state = pa.getCustomWindowState(state);
         }
         return state;
@@ -180,7 +180,7 @@
         PortletMode mode = getMappedMode(window.getId().toString());
         if (mode != null && !JetspeedActions.getStandardPortletModes().contains(mode))
         {
-            PortletApplication pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getPortletApplicationDefinition();
+            PortletApplication pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getApplication();
             mode = pa.getCustomPortletMode(mode);
         }
         return mode;
@@ -240,14 +240,14 @@
             PortletApplication pa = null;
             if (mode != null && !JetspeedActions.getStandardPortletModes().contains(mode))
             {
-                pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getPortletApplicationDefinition();
+                pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getApplication();
                 mode = pa.getMappedPortletMode(mode);
             }
             if (state != null && !JetspeedActions.getStandardWindowStates().contains(state))
             {
                 if ( pa == null )
                 {
-                    pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getPortletApplicationDefinition();
+                    pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getApplication();
                 }
                 state = pa.getMappedWindowState(state);
             }
@@ -264,14 +264,14 @@
             PortletApplication pa = null;
             if (mode != null && !JetspeedActions.getStandardPortletModes().contains(mode))
             {
-                pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getPortletApplicationDefinition();
+                pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getApplication();
                 mode = pa.getMappedPortletMode(mode);
             }
             if (state != null && !JetspeedActions.getStandardWindowStates().contains(state))
             {
                 if ( pa == null )
                 {
-                    pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getPortletApplicationDefinition();
+                    pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getApplication();
                 }
                 state = pa.getMappedWindowState(state);
             }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecorationValve.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecorationValve.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecorationValve.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/DecorationValve.java Thu Oct 23 18:25:11 2008
@@ -50,7 +50,7 @@
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.security.SecurityAccessController;
 import org.apache.jetspeed.container.PortletWindow;
-import org.apache.pluto.om.portlet.Supports;
+import org.apache.jetspeed.om.portlet.Supports;
 
 /**
  * Assigns decorations and page actions to all of the portlet Fragments within

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPageAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPageAction.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPageAction.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPageAction.java Thu Oct 23 18:25:11 2008
@@ -38,9 +38,8 @@
 import org.apache.jetspeed.portalsite.PortalSiteRequestContext;
 import org.apache.jetspeed.profiler.impl.ProfilerValveImpl;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.pluto.om.portlet.Parameter;
-import org.apache.pluto.om.portlet.ParameterSet;
-import org.apache.pluto.om.portlet.PortletDefinition;
+import org.apache.jetspeed.om.portlet.InitParam;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
 
 /**
  * Get Page retrieves a page from the Page Manager store and PSML format
@@ -254,9 +253,8 @@
                 
                 if ( portletDef != null && portletIcons != null )
                 {
-                    ParameterSet paramSet = portletDef.getInitParameterSet();
-                    Parameter iconParam = paramSet.get( "portlet-icon" );
-                    String iconParamVal = ( iconParam == null ) ? null : iconParam.getValue();
+                    InitParam iconParam = portletDef.getInitParam("portlet-icon");
+                    String iconParamVal = ( iconParam == null ) ? null : iconParam.getParamValue();
                     if ( iconParamVal != null && iconParamVal.length() > 0 )
                     {
                         portletIcons.put( frag.getId(), iconParamVal );

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java Thu Oct 23 18:25:11 2008
@@ -32,6 +32,7 @@
 import org.apache.jetspeed.ajax.AjaxBuilder;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
 import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
+import org.apache.jetspeed.om.portlet.InitParam;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.page.PageManager;
@@ -39,7 +40,6 @@
 import org.apache.jetspeed.search.ParsedObject;
 import org.apache.jetspeed.search.SearchEngine;
 import org.apache.jetspeed.security.SecurityAccessController;
-import org.apache.pluto.om.portlet.Parameter;
 
 /**
  * Get Portlets retrieves the portlet list available to the current subject
@@ -146,14 +146,14 @@
             String uniqueName = pa.getName() + "::" + portlet.getPortletName();
             if (securityAccessController.checkPortletAccess(portlet, JetspeedActions.MASK_VIEW))
             {
-                Parameter param = portlet.getInitParameterSet().get(PORTLET_ICON);
+                InitParam param = portlet.getInitParam(PORTLET_ICON);
                 String image;
                 if (param != null)
                 {
                     //String relativeImagePath = param.getValue();
                     //String context = muta.getWebApplicationDefinition().getContextRoot();
                     // Have to use a supported icon in jetspeed, otherwise image can be out of skew
-                    image = "images/portlets/" + param.getValue();
+                    image = "images/portlets/" + param.getParamValue();
                 }
                 else
                 {                                        

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/PortletPlacementContextImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/PortletPlacementContextImpl.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/PortletPlacementContextImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/PortletPlacementContextImpl.java Thu Oct 23 18:25:11 2008
@@ -30,9 +30,8 @@
 import org.apache.jetspeed.layout.PortletPlacementContext;
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.page.Page;
-import org.apache.pluto.om.portlet.Parameter;
-import org.apache.pluto.om.portlet.ParameterSet;
-import org.apache.pluto.om.portlet.PortletDefinition;
+import org.apache.jetspeed.om.portlet.InitParam;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
 
 
 /**
@@ -806,7 +805,6 @@
     		String sizesVal = layoutFragment.getProperty( "sizes" );
     		String layoutName = layoutFragment.getName();
     		layoutName = ( (layoutName != null && layoutName.length() > 0) ? layoutName : (String)null );
-    		ParameterSet paramSet = null;
     		PortletDefinition portletDef = null;
     		if ( sizesVal == null || sizesVal.length() == 0 )
     		{
@@ -816,12 +814,8 @@
     				portletDef = registry.getPortletDefinitionByUniqueName( layoutName );
                     if ( portletDef != null )
                     {
-                    	paramSet = portletDef.getInitParameterSet();
-                    	if ( paramSet != null )
-                    	{
-                    		Parameter sizesParam = paramSet.get( "sizes" );
-                    		sizesVal = ( sizesParam == null ) ? null : sizesParam.getValue();
-                    	}
+                        InitParam sizesParam = portletDef.getInitParam( "sizes" );
+                        sizesVal = ( sizesParam == null ) ? null : sizesParam.getParamValue();
                     }
     			}
     		}
@@ -849,7 +843,7 @@
 				if ( ! suppressErrorLogging && columnCount <= 0 )
 					log.error( "getColumnCountAndSizes invalid columnCount - " + layoutFragment.getId() + " / " + layoutName + " count=" + columnCount + " sizes=" + sizesVal );
 			}
-			else if ( paramSet == null )
+			else if ( portletDef == null || portletDef.getInitParams().isEmpty() )
 			{
 				if ( ! suppressErrorLogging )
 				{
@@ -863,8 +857,8 @@
 			}
 			else
 			{
-				Parameter colsParam = paramSet.get( "columns" );
-				String colsParamVal = ( colsParam == null ) ? null : colsParam.getValue();
+				InitParam colsParam = portletDef.getInitParam( "columns" );
+				String colsParamVal = ( colsParam == null ) ? null : colsParam.getParamValue();
 				if ( colsParamVal != null && colsParamVal.length() > 0 )
 				{
 					try

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java Thu Oct 23 18:25:11 2008
@@ -166,7 +166,7 @@
         while (iter.hasNext())
         {
             pa = (PortletApplication) iter.next();
-            writer.println(pa.getId() + ":" + pa.getName() + ":" + pa.getWebApplicationDefinition().getContextRoot()
+            writer.println(pa.getName() + ":" + pa.getWebApplicationDefinition().getContextRoot()
                            + ":" + (portletFactory.isPortletApplicationRegistered(pa) ? "ACTIVE" : "INACTIVE"));
         }
         return OK;

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java Thu Oct 23 18:25:11 2008
@@ -19,7 +19,6 @@
 import java.security.Principal;
 import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Locale;
 import java.util.Map;
 
@@ -51,7 +50,8 @@
 import org.apache.jetspeed.profiler.impl.ProfilerValveImpl;
 import org.apache.jetspeed.security.SubjectHelper;
 import org.apache.jetspeed.security.User;
-import org.apache.pluto.om.portlet.PortletDefinition;
+import org.apache.jetspeed.util.JetspeedLocale;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
 
 /**
  * Jetspeed Request Context is associated with each portal request. The request
@@ -523,34 +523,33 @@
         // {
         //     return language;
         // }
-        LanguageSet languageSet = portlet.getLanguageSet();
-        Language language = languageSet.get(locale);
+        
+        Language language = portlet.getLanguage(locale);
 
         Enumeration locales = request.getLocales();
         while (locales.hasMoreElements() && language == null)
         {
             Locale aLocale = (Locale) locales.nextElement();
-            language = languageSet.get(aLocale);
+            language = portlet.getLanguage(aLocale);
         }
 
-        Iterator langItr = languageSet.iterator();
-        if (langItr.hasNext() && language == null)
+        if (!portlet.getLanguages().isEmpty())
         {
-            language = (Language) langItr.next();
+            language = portlet.getLanguages().get(0);
         }
         
         if (language == null)
         {
-            language = languageSet.get(languageSet.getDefaultLocale());
+            language = portlet.getLanguage(JetspeedLocale.getDefaultLocale());
         }
 
         if (language == null)
         {
-            MutableLanguage languageCtl = new LanguageImpl();
-            languageCtl.setLocale(locale);
-            languageCtl.setShortTitle(portlet.getPortletName());
-            languageCtl.setTitle(portlet.getPortletName());
-            language = languageCtl;
+            LanguageImpl lang = new LanguageImpl();
+            lang.setLocale(locale);
+            lang.setShortTitle(portlet.getPortletName());
+            lang.setTitle(portlet.getPortletName());
+            language = lang;
         }
 
         // languageMap.put(portlet, language);

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java Thu Oct 23 18:25:11 2008
@@ -32,7 +32,7 @@
 import org.apache.jetspeed.components.portletregistry.RegistryException;
 import org.apache.jetspeed.container.window.PortletWindowAccessor;
 import org.apache.jetspeed.factory.PortletFactory;
-import org.apache.jetspeed.om.common.servlet.MutableWebApplication;
+import org.apache.jetspeed.om.servlet.WebApplicationDefinition;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.search.SearchEngine;
 import org.apache.jetspeed.security.JetspeedPermission;
@@ -44,9 +44,8 @@
 import org.apache.jetspeed.util.FileSystemHelper;
 import org.apache.jetspeed.util.MultiFileChecksumHelper;
 import org.apache.jetspeed.util.descriptor.PortletApplicationWar;
-import org.apache.pluto.om.portlet.SecurityRole;
 import org.apache.jetspeed.container.PortletEntity;
-import org.apache.pluto.om.portlet.PortletDefinition;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
 
 /**
  * PortletApplicationManager
@@ -169,23 +168,6 @@
         startPA(contextName, "/"+contextName, warStruct, paClassLoader, PortletApplication.LOCAL);
 	}
 
-    public void startInternalApplication(String contextName) throws RegistryException
-    {
-        checkStarted();
-        File webinf = new File (appRoot);
-        ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();        
-        DirectoryHelper dir = new DirectoryHelper(webinf);
-        String appName = (contextName.startsWith("/")) ? contextName.substring(1) : contextName;
-        PortletApplication app = registry.getPortletApplicationByIdentifier(appName);
-        if (app != null && app.getApplicationType() == PortletApplication.LOCAL)
-        {
-            app.setApplicationType(org.apache.jetspeed.om.portlet.INTERNAL);
-            registry.updatePortletApplication(app);
-        }
-        startPA(contextName, "/"+contextName, dir, contextClassLoader, org.apache.jetspeed.om.portlet.INTERNAL);
-        // startInternal(contextName, warStruct, paClassLoader, true);        
-    }
-    
 	public void startPortletApplication(String contextName, FileSystemHelper warStruct,
 		ClassLoader paClassLoader)
 		throws RegistryException
@@ -312,45 +294,31 @@
 
 		try
 		{
-			log.info("Loading portlet.xml...." + paName);
-			pa = paWar.createPortletApp(paClassLoader);
-			pa.setApplicationType(paType);
+            // load the web.xml
+            log.info("Loading web.xml...." + paName);
+            WebApplicationDefinition wa = paWar.createWebApp();
+            paWar.validate();
 
-			// load the web.xml
-			log.info("Loading web.xml...." + paName);
-			MutableWebApplication wa = paWar.createWebApp();
-			paWar.validate();
+			log.info("Loading portlet.xml...." + paName);
+			pa = paWar.createPortletApp(paClassLoader, wa, paType);
 
 			if (paType == PortletApplication.LOCAL)
 			{
 				wa.setContextRoot("<portal>");
 			}
-            else if (paType == org.apache.jetspeed.om.portlet.INTERNAL)
-            {
-                // TODO: this is screwing up the PSML as its set all over the place to "jetspeed-layouts", not good
-                wa.setContextRoot("/" + paName);                
-            }
 
-			pa.setWebApplicationDefinition(wa);
-            
             // Make sure existing entities are refreshed with the most
             // recent PortletDefintion.
-            Collection portletDefs = pa.getPortletDefinitions();
-            if(portletDefs != null && portletDefs.size() > 0)
+            for (PortletDefinition pd : pa.getPortlets()))
             {
-                Iterator pdItr = portletDefs.iterator();
-                while(pdItr.hasNext())
+                Collection portletEntites = entityAccess.getPortletEntities(pd);
+                if(portletEntites != null && portletEntites.size() > 0)
                 {
-                    PortletDefinition pd = (PortletDefinition) pdItr.next();
-                    Collection portletEntites = entityAccess.getPortletEntities(pd);
-                    if(portletEntites != null && portletEntites.size() > 0)
+                    Iterator peItr = portletEntites.iterator();
+                    while(peItr.hasNext())
                     {
-                        Iterator peItr = portletEntites.iterator();
-                        while(peItr.hasNext())
-                        {
-                            PortletEntity portletEntity = (PortletEntity) peItr.next();
-                            portletEntity.setPortletDefinition(pd);
-                        }
+                        PortletEntity portletEntity = (PortletEntity) peItr.next();
+                        portletEntity.setPortletDefinition(pd);
                     }
                 }
             }
@@ -381,21 +349,16 @@
             // grant default permissions to portlet application
 			grantDefaultPermissions(paName);
             
-            if ( autoCreateRoles && roleManager != null && pa.getWebApplicationDefinition().getSecurityRoles() != null )
+            if ( autoCreateRoles && roleManager != null && pa.getWebApplicationDefinition().getRoles() != null )
             {
                 try
                 {
-                    Iterator rolesIter = pa.getWebApplicationDefinition().getSecurityRoles().iterator();
-                    SecurityRole sr;
-                    while ( rolesIter.hasNext() )
-                    {
-                        sr = (SecurityRole)rolesIter.next();
-                        if ( !roleManager.roleExists(sr.getRoleName()) )
+                    for (String sr : pa.getWebApplicationDefinition().getRoles())
+                        if ( !roleManager.roleExists(sr) )
                         {
-                            roleManager.addRole(sr.getRoleName());
-                            log.info("AutoCreated role: "+sr.getRoleName()+" from portlet application "+paName+" its web definition");
+                            roleManager.addRole(sr);
+                            log.info("AutoCreated role: "+sr+" from portlet application "+paName+" its web definition");
                         }
-                    }
                 }
                 catch (SecurityException sex)
                 {
@@ -719,13 +682,13 @@
 			if (remove)
 			{
 				searchEngine.remove(pa);
-				searchEngine.remove(pa.getPortletDefinitions());
+				searchEngine.remove(pa.getPortlets());
 				log.info("Un-Registered the portlet application in the search engine... " + pa.getName());
 			}
 			else
 			{
 			    searchEngine.add(pa);
-                searchEngine.add(pa.getPortletDefinitions());
+                searchEngine.add(pa.getPortlets());
                 log.info("Registered the portlet application in the search engine... " + pa.getName());
 			}
 		}
@@ -739,11 +702,8 @@
 		updateSearchEngine(true,pa);
 		log.info("Remove all registry entries defined for portlet application " + pa.getName());
 
-		Iterator portlets = pa.getPortletDefinitions().iterator();
-
-		while (portlets.hasNext())
+		for (PortletDefinition portletDefinition : pa.getPortlets())
 		{
-			PortletDefinition portletDefinition = (PortletDefinition) portlets.next();
 			Iterator		  entities = entityAccess.getPortletEntities(portletDefinition)
 													 .iterator();
 

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/rules/PortletRule.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/rules/PortletRule.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/rules/PortletRule.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/rules/PortletRule.java Thu Oct 23 18:25:11 2008
@@ -20,7 +20,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jetspeed.om.portlet.PortletApplication;
-import org.apache.jetspeed.om.portlet.PortletDefinition;
 
 /**
  * This class helps load the portlet's metadata onto the digester stack
@@ -41,7 +40,6 @@
 
     public void body(String namespace, String name, String text) throws Exception
     {
-        PortletDefinition def = (PortletDefinition) app.getPortletDefinitionByName(text);
-        digester.push(def);
+        digester.push(app.getPortlet(text));
     }                                                        
 }
\ No newline at end of file

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/registration/RegistrationTool.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/registration/RegistrationTool.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/registration/RegistrationTool.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/registration/RegistrationTool.java Thu Oct 23 18:25:11 2008
@@ -22,7 +22,7 @@
 import org.apache.commons.configuration.PropertiesConfiguration;
 import org.apache.jetspeed.components.SpringComponentManager;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
-import org.apache.jetspeed.om.common.servlet.MutableWebApplication;
+import org.apache.jetspeed.om.servlet.WebApplicationDefinition;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.util.descriptor.ExtendedPortletMetadata;
 import org.apache.jetspeed.util.descriptor.PortletApplicationDescriptor;
@@ -106,10 +106,9 @@
     throws Exception
     {
         WebApplicationDescriptor wad = new WebApplicationDescriptor(new FileReader(webappDescriptor), "/" + appName);
-        MutableWebApplication webapp = wad.createWebApplication();
+        WebApplicationDefinition webapp = wad.createWebApplication();
         PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader(appDescriptor), appName);        
-        PortletApplication app = pad.createPortletApplication();                
-        app.setWebApplicationDefinition(webapp);
+        PortletApplication app = pad.createPortletApplication(webapp);                
         ExtendedPortletMetadata extMetaData = new ExtendedPortletMetadata(new FileReader(extendedDescriptor), app);
         extMetaData.load();        
         registry.registerPortletApplication(app);

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java Thu Oct 23 18:25:11 2008
@@ -69,7 +69,7 @@
                         UserAttributeRef currentAttributeRef = (UserAttributeRef) attrRefsIter.next();
                         if (null != currentAttributeRef)
                         {
-                            if ((currentAttribute.getPortletName()).equals(currentAttributeRef.getNameLink()))
+                            if ((currentAttribute.getName()).equals(currentAttributeRef.getNameLink()))
                             {
                                 if (log.isDebugEnabled())
                                     log.debug("Linking user attribute ref: [[name, " + currentAttribute.getPortletName()

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/ExtendedPortletMetadata.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/ExtendedPortletMetadata.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/ExtendedPortletMetadata.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/ExtendedPortletMetadata.java Thu Oct 23 18:25:11 2008
@@ -27,6 +27,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.jetspeed.om.portlet.CustomPortletMode;
 import org.apache.jetspeed.om.portlet.CustomWindowState;
+import org.apache.jetspeed.om.portlet.Description;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.om.portlet.impl.CustomPortletModeImpl;
 import org.apache.jetspeed.om.portlet.impl.CustomWindowStateImpl;
@@ -135,14 +136,17 @@
                 Iterator mappedModesIter = mappedPortletModes.iterator();
                 while ( mappedModesIter.hasNext() )
                 {
-                    CustomPortletModeImpl mappedMode = (CustomPortletModeImpl)mappedModesIter.next();
+                    CustomPortletMode mappedMode = (CustomPortletMode)mappedModesIter.next();
                     if (!mappedMode.getMappedMode().equals(mappedMode.getCustomMode()))
                     {
                         int index = customModes.indexOf(mappedMode);
                         if ( index > -1 )
                         {
                             CustomPortletMode customMode = (CustomPortletMode)customModes.get(index);
-                            mappedMode.setDescription(customMode.getDescription());
+                            for (Description d : customMode.getDescriptions())
+                            {
+                                mappedMode.addDescription(d.getLang()).setDescription(d.getDescription());
+                            }
                             customModes.set(index,mappedMode);
                         }
                     }
@@ -163,7 +167,10 @@
                         if ( index > -1 )
                         {
                             CustomWindowState customState = (CustomWindowState)customStates.get(index);
-                            mappedState.setDescription(customState.getDescription());
+                            for (Description d : customState.getDescriptions())
+                            {
+                                mappedState.addDescription(d.getLang()).setDescription(d.getDescription());
+                            }
                             customStates.set(index,mappedState);
                         }
                     }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationDescriptor.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationDescriptor.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationDescriptor.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationDescriptor.java Thu Oct 23 18:25:11 2008
@@ -38,6 +38,7 @@
 import org.apache.jetspeed.om.portlet.impl.CustomPortletModeImpl;
 import org.apache.jetspeed.om.portlet.impl.CustomWindowStateImpl;
 import org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl;
+import org.apache.jetspeed.om.servlet.WebApplicationDefinition;
 import org.apache.jetspeed.tools.pamanager.PortletApplicationException;
 import org.apache.pluto.om.portlet.SecurityRoleRef;
 import org.apache.pluto.om.portlet.SecurityRoleRefSet;
@@ -68,7 +69,7 @@
         this.appName = appName;
     }
 
-    public PortletApplication createPortletApplication()
+    public PortletApplication createPortletApplication(WebApplicationDefinition wa)
     throws PortletApplicationException
     {
         return createPortletApplication(this.getClass().getClassLoader());
@@ -81,7 +82,7 @@
      * @return PortletApplication newly created PortletApplication with
      * all values of the portlet application descriptor mapped into it.
      */
-    public PortletApplication createPortletApplication(ClassLoader classLoader)
+    public PortletApplication createPortletApplication(ClassLoader classLoader, WebApplicationDefinition wa)
         throws PortletApplicationException
     {
         try

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationWar.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationWar.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationWar.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletApplicationWar.java Thu Oct 23 18:25:11 2008
@@ -44,6 +44,7 @@
 import org.apache.jetspeed.Jetspeed;
 import org.apache.jetspeed.om.common.servlet.MutableWebApplication;
 import org.apache.jetspeed.om.portlet.PortletApplication;
+import org.apache.jetspeed.om.servlet.WebApplicationDefinition;
 import org.apache.jetspeed.tools.deploy.JetspeedWebApplicationRewriter;
 import org.apache.jetspeed.tools.deploy.JetspeedWebApplicationRewriterFactory;
 import org.apache.jetspeed.tools.pamanager.PortletApplicationException;
@@ -184,7 +185,7 @@
      * @throws IOException
      * @see org.apache.jetspeed.util.descriptor.WebApplicationDescriptor
      */
-    public MutableWebApplication createWebApp() throws PortletApplicationException, IOException
+    public WebApplicationDefinition createWebApp() throws PortletApplicationException, IOException
     {
         Reader webXmlReader = getReader(WEB_XML_PATH);
 
@@ -225,7 +226,7 @@
      * @throws IOException
      * @see org.apache.jetspeed.uitl.descriptor.PortletApplicationDescriptor
      */
-    public PortletApplication createPortletApp(ClassLoader classLoader) throws PortletApplicationException, IOException
+    public PortletApplication createPortletApp(ClassLoader classLoader, WebApplicationDefinition wa, int paType) throws PortletApplicationException, IOException
     {
         Reader portletXmlReader = getReader(PORTLET_XML_PATH);
         

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletPreferenceRule.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletPreferenceRule.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletPreferenceRule.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletPreferenceRule.java Thu Oct 23 18:25:11 2008
@@ -20,10 +20,8 @@
 import java.util.List;
 
 import org.apache.commons.digester.Rule;
-import org.apache.jetspeed.om.common.preference.PreferenceComposite;
-import org.apache.jetspeed.om.common.preference.PreferenceSetComposite;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
-import org.apache.pluto.om.portlet.PortletApplicationDefinition;
+import org.apache.jetspeed.om.portlet.Preference;
 import org.xml.sax.Attributes;
 
 /**
@@ -54,7 +52,6 @@
     {
         Object peeked = digester.peek();
         portlet = (PortletDefinition) peeked;
-        portlet.setPortletApplicationDefinition((PortletApplicationDefinition) digester.getRoot());
         
         // reset properties to default values
         // as the same instance of this rule can be used multiple times
@@ -76,8 +73,15 @@
      */
     public void end( String arg0, String arg1 ) throws Exception
     {       
-        PreferenceComposite pref = (PreferenceComposite)((PreferenceSetComposite)portlet.getPreferenceSet()).add(name,values);
-        pref.setReadOnly(Boolean.toString(readOnly));
+        Preference p = portlet.getPortletPreferences().addPreference(name);
+        if (values != null)
+        {
+            for (String val : values)
+            {
+                p.addValue(val);
+            }
+        }
+        p.setReadOnly(readOnly);
         digester.pop();
     }
     

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletRule.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletRule.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletRule.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/PortletRule.java Thu Oct 23 18:25:11 2008
@@ -18,7 +18,6 @@
 
 import org.apache.commons.digester.Rule;
 import org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl;
-import org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl;
 import org.xml.sax.Attributes;
 
 /**
@@ -40,10 +39,9 @@
      */
     public void begin( String arg0, String arg1, Attributes arg2 ) throws Exception
     {
-        PortletDefinitionImpl portlet = new PortletDefinitionImpl();
         PortletApplicationDefinitionImpl app = (PortletApplicationDefinitionImpl) digester.getRoot();
-        app.addPortletDefinition(portlet);
-        digester.push(portlet);
+        digester.push(app.addPortletDefinition());
+);
     }
     /**
      * <p>

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/WebApplicationDescriptor.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/WebApplicationDescriptor.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/WebApplicationDescriptor.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-portal/src/main/java/org/apache/jetspeed/util/descriptor/WebApplicationDescriptor.java Thu Oct 23 18:25:11 2008
@@ -19,11 +19,9 @@
 import java.io.Reader;
 
 import org.apache.commons.digester.Digester;
-import org.apache.jetspeed.om.common.servlet.MutableWebApplication;
-import org.apache.jetspeed.om.servlet.impl.SecurityRoleImpl;
+import org.apache.jetspeed.om.servlet.WebApplicationDefinition;
 import org.apache.jetspeed.om.servlet.impl.WebApplicationDefinitionImpl;
 import org.apache.jetspeed.tools.pamanager.PortletApplicationException;
-import org.apache.jetspeed.util.JetspeedLocale;
 
 /**
  * Utilities for manipulating the web.xml deployment descriptor
@@ -61,7 +59,7 @@
      *                  The display name of the web application
      * @return The Java object tree representing web.xml
      */
-    public MutableWebApplication createWebApplication() throws PortletApplicationException
+    public WebApplicationDefinition createWebApplication() throws PortletApplicationException
     {
         try
         {
@@ -79,7 +77,7 @@
                     
             digester.addObjectCreate("web-app", WebApplicationDefinitionImpl.class);
 
-            digester.addObjectCreate("web-app/security-role", SecurityRoleImpl.class);
+            digester.addCallMethod("web-app/security-role", "addRole", 0);
             digester.addBeanPropertySetter("web-app/security-role/description", "description");
             digester.addBeanPropertySetter("web-app/security-role/role-name", "roleName");
             digester.addSetNext("web-app/security-role", "addSecurityRole");
@@ -88,7 +86,7 @@
 
             wd.setContextRoot(contextRoot);
             //wd.addDescription(locale, displayName);
-            wd.addDescription(JetspeedLocale.getDefaultLocale(), contextRoot);
+            wd.setDescription(contextRoot);
             return wd;
 
         }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/servlet/WebApplicationDefinition.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/servlet/WebApplicationDefinition.java?rev=707522&r1=707521&r2=707522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/servlet/WebApplicationDefinition.java (original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/servlet/WebApplicationDefinition.java Thu Oct 23 18:25:11 2008
@@ -35,6 +35,7 @@
     void setDescription(String description);
     
     List<String> getRoles();
+    void addRole(String role);
     
     String getContextRoot();
     void setContextRoot(String contextRoot);



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message