You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by at...@apache.org on 2008/10/21 18:25:07 UTC

svn commit: r706677 [3/3] - in /portals/pluto/branches/2.0-spi-refactoring: pluto-container-api/src/main/java/org/apache/pluto/om/ pluto-container-api/src/main/java/org/apache/pluto/om/portlet/ pluto-container/src/main/java/org/apache/pluto/core/ pluto...

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/DisplayNameType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/DisplayNameType.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/DisplayNameType.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/DisplayNameType.java Tue Oct 21 09:25:05 2008
@@ -16,19 +16,14 @@
  */
 package org.apache.pluto.descriptors.portlet10;
 
-import java.util.Locale;
-
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlValue;
 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
-import org.apache.pluto.om.portlet.DisplayName;
-
 /**
  * The display-name type contains a short name that is intended to be displayed by tools. It is used by display-name
  * elements. The display name need not be unique. Example: ...
@@ -56,67 +51,11 @@
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "display-nameType", propOrder = { "value" })
-public class DisplayNameType implements DisplayName
+public class DisplayNameType
 {
     @XmlValue
     @XmlJavaTypeAdapter(value = CollapsedStringAdapter.class)
-    protected String value;
+    String value;
     @XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace")
-    protected String lang = null;
-    @XmlTransient
-    protected Locale locale;
-
-    public String getDisplayName()
-    {
-        return value;
-    }
-
-    public void setDisplayName(String value)
-    {
-        this.value = value;
-    }
-
-    public String getLang()
-    {
-        return lang == null ? Locale.ENGLISH.toString() : lang;
-    }
-
-    public void setLang(String value)
-    {
-        lang = value;
-    }
-
-    public Locale getLocale()
-    {
-        return locale == null ? deriveLocale() : locale;
-    }
-    
-    protected Locale deriveLocale()
-    {
-        Locale locale = null;
-        String lang = this.getLang();
-        if (lang != null)
-        {
-            String country = "";
-            String variant = "";
-            String[] localeArray = lang.split("[-|_]");
-            for (int i = 0; i < localeArray.length; i++)
-            {
-                if (i == 0)
-                {
-                    lang = localeArray[i];
-                }
-                else if (i == 1)
-                {
-                    country = localeArray[i];
-                }
-                else if (i == 2)
-                {
-                    variant = localeArray[i];
-                }
-            }
-            locale = new Locale(lang, country, variant);
-        }
-        return this.locale = locale;
-    }
+    String lang = null;
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/InitParamType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/InitParamType.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/InitParamType.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/InitParamType.java Tue Oct 21 09:25:05 2008
@@ -17,7 +17,6 @@
 package org.apache.pluto.descriptors.portlet10;
 
 import java.util.List;
-import java.util.Locale;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -26,10 +25,6 @@
 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
-import org.apache.pluto.om.ElementFactoryList;
-import org.apache.pluto.om.portlet.Description;
-import org.apache.pluto.om.portlet.InitParam;
-
 /**
  * The init-param element contains a name/value pair as an initialization param of the portlet Used in:portlet <p>Java
  * class for init-paramType complex type. <p>The following schema fragment specifies the expected content contained
@@ -54,72 +49,14 @@
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "init-paramType", propOrder = { "description", "name", "value" })
-public class InitParamType implements InitParam
+public class InitParamType
 {
-    @XmlElement(name = "description", type=DescriptionType.class)
-    protected List<Description> description;
+    @XmlElement(name = "description")
+    List<DescriptionType> description;
     @XmlElement(required = true)
     @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
-    protected String name;
+    String name;
     @XmlElement(required = true)
     @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
-    protected String value;
-
-    public Description getDescription(Locale locale)
-    {
-        for (Description d : getDescriptions())
-        {
-            if (d.getLocale().equals(locale))
-            {
-                return d;
-            }
-        }
-        return null;
-    }
-    
-    public ElementFactoryList<Description> getDescriptions()
-    {
-        if (description == null || !(description instanceof ElementFactoryList))
-        {
-            ElementFactoryList<Description> lf = 
-                new ElementFactoryList<Description>( new ElementFactoryList.Factory<Description>()
-                {
-                    public Class<? extends Description> getElementClass()
-                    {
-                        return DescriptionType.class;
-                    }
-
-                    public Description newElement()
-                    {
-                        return new DescriptionType();
-                    }
-                }); 
-            if (description != null)
-            {
-                lf.addAll(description);
-            }
-            description = lf;
-        }
-        return (ElementFactoryList<Description>)description;
-    }
-
-    public String getParamName()
-    {
-        return name;
-    }
-
-    public void setParamName(String value)
-    {
-        name = value;
-    }
-
-    public String getParamValue()
-    {
-        return value;
-    }
-
-    public void setParamValue(String value)
-    {
-        this.value = value;
-    }
+    String value;
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletAppType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletAppType.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletAppType.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletAppType.java Tue Oct 21 09:25:05 2008
@@ -16,6 +16,7 @@
  */
 package org.apache.pluto.descriptors.portlet10;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.bind.annotation.XmlAccessType;
@@ -23,21 +24,21 @@
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
-import org.apache.pluto.om.ElementFactoryList;
-import org.apache.pluto.om.portlet.ContainerRuntimeOption;
 import org.apache.pluto.om.portlet.CustomPortletMode;
 import org.apache.pluto.om.portlet.CustomWindowState;
-import org.apache.pluto.om.portlet.EventDefinition;
-import org.apache.pluto.om.portlet.Filter;
-import org.apache.pluto.om.portlet.FilterMapping;
-import org.apache.pluto.om.portlet.Listener;
+import org.apache.pluto.om.portlet.Description;
+import org.apache.pluto.om.portlet.DisplayName;
+import org.apache.pluto.om.portlet.InitParam;
 import org.apache.pluto.om.portlet.PortletDefinition;
 import org.apache.pluto.om.portlet.PortletApplicationDefinition;
-import org.apache.pluto.om.portlet.PublicRenderParameter;
+import org.apache.pluto.om.portlet.PortletInfo;
+import org.apache.pluto.om.portlet.Preference;
+import org.apache.pluto.om.portlet.Preferences;
 import org.apache.pluto.om.portlet.SecurityConstraint;
+import org.apache.pluto.om.portlet.SecurityRoleRef;
+import org.apache.pluto.om.portlet.Supports;
 import org.apache.pluto.om.portlet.UserAttribute;
 
 /**
@@ -68,288 +69,272 @@
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "portlet-appType", propOrder = { "portlet", "customPortletMode", "customWindowState", "userAttribute",
                                                 "securityConstraint" })
-public class PortletAppType implements PortletApplicationDefinition
+public class PortletAppType
 {
-    @XmlElement(name = "portlet", type = PortletType.class)
-    protected List<PortletDefinition> portlet;
-    @XmlElement(name = "custom-portlet-mode", type = CustomPortletModeType.class)
-    protected List<CustomPortletMode> customPortletMode;
-    @XmlElement(name = "custom-window-state", type = CustomWindowStateType.class)
-    protected List<CustomWindowState> customWindowState;
-    @XmlElement(name = "user-attribute", type = UserAttributeType.class)
-    protected List<UserAttribute> userAttribute;
-    @XmlElement(name = "security-constraint", type = SecurityConstraintType.class)
-    protected List<SecurityConstraint> securityConstraint;
+    @XmlElement(name = "portlet")
+    List<PortletType> portlet;
+    @XmlElement(name = "custom-portlet-mode")
+    List<CustomPortletModeType> customPortletMode;
+    @XmlElement(name = "custom-window-state")
+    List<CustomWindowStateType> customWindowState;
+    @XmlElement(name = "user-attribute")
+    List<UserAttributeType> userAttribute;
+    @XmlElement(name = "security-constraint")
+    List<SecurityConstraintType> securityConstraint;
     @XmlAttribute(required = true)
-    protected String version;
-    @XmlTransient
-    protected String name;
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName(String name)
+    String version = PortletApplicationDefinition.JSR_168_VERSION;
+    
+    public PortletAppType()
     {
-        this.name = name;
     }
-
-    public PortletDefinition getPortlet(String portletName)
+    
+    public PortletAppType(PortletApplicationDefinition app)
     {
-        for (PortletDefinition pd : getPortlets())
+        // downgrade
+        for (PortletDefinition pd : app.getPortlets())
         {
-            if (pd.getPortletName().equals(portletName))
+            if (portlet == null)
             {
-                return pd;
+                portlet = new ArrayList<PortletType>();
             }
+            PortletType pt = new PortletType();
+            downgradePortlet(pd, pt);
+            portlet.add(pt);            
         }
-        return null;
-    }
-
-    public ElementFactoryList<PortletDefinition> getPortlets()
-    {
-        if (portlet == null || !(portlet instanceof ElementFactoryList))
+        for (CustomPortletMode cpm : app.getCustomPortletModes())
         {
-            ElementFactoryList<PortletDefinition> lf = new ElementFactoryList<PortletDefinition>(new ElementFactoryList.Factory<PortletDefinition>()
+            if (customPortletMode == null)
+            {
+                customPortletMode = new ArrayList<CustomPortletModeType>();
+            }
+            CustomPortletModeType cpmt = new CustomPortletModeType();
+            cpmt.portletMode = cpm.getPortletMode();
+            for (Description d : cpm.getDescriptions())
             {
-                public Class<? extends PortletDefinition> getElementClass()
+                if (cpmt.description == null)
                 {
-                    return PortletType.class;
+                    cpmt.description = new ArrayList<DescriptionType>();
                 }
-
-                public PortletDefinition newElement()
+                DescriptionType dt = new DescriptionType();
+                dt.lang = d.getLang();
+                dt.value = d.getDescription();
+                cpmt.description.add(dt);
+            }
+        }
+        for (CustomWindowState cws : app.getCustomWindowStates())
+        {
+            if (customWindowState == null)
+            {
+                customWindowState = new ArrayList<CustomWindowStateType>();
+            }
+            CustomWindowStateType cwst = new CustomWindowStateType();
+            cwst.windowState = cws.getWindowState();
+            for (Description d : cws.getDescriptions())
+            {
+                if (cwst.description == null)
                 {
-                    return new PortletType();
+                    cwst.description = new ArrayList<DescriptionType>();
                 }
-            });
-            if (portlet != null)
-            {
-                lf.addAll(portlet);
+                DescriptionType dt = new DescriptionType();
+                dt.lang = d.getLang();
+                dt.value = d.getDescription();
+                cwst.description.add(dt);
             }
-            portlet = lf;
         }
-        return (ElementFactoryList<PortletDefinition>) portlet;
     }
-
-    public CustomPortletMode getCustomPortletMode(String name)
+    
+    public PortletApplicationDefinition upgrade()
     {
-        for (CustomPortletMode cpm : getCustomPortletModes())
+        PortletApplicationDefinition app = new org.apache.pluto.descriptors.portlet.PortletAppType();
+        if (portlet != null)
         {
-            if (cpm.getPortletMode().equalsIgnoreCase(name))
+            for (PortletType src : portlet)
             {
-                return cpm;
+                PortletDefinition target = app.addPortlet(src.portletName);
+                upgradePortlet(src, target);
             }
         }
-        return null;
-    }
-    
-    public ElementFactoryList<CustomPortletMode> getCustomPortletModes()
-    {
-        if (customPortletMode == null || !(customPortletMode instanceof ElementFactoryList))
+        if (customPortletMode != null)
         {
-            ElementFactoryList<CustomPortletMode> lf = 
-                new ElementFactoryList<CustomPortletMode>( new ElementFactoryList.Factory<CustomPortletMode>()
+            for (CustomPortletModeType src : customPortletMode)
+            {
+                CustomPortletMode target = app.addCustomPortletMode(src.portletMode);
+                if (src.description != null)
                 {
-                    public Class<? extends CustomPortletMode> getElementClass()
+                    for (DescriptionType d : src.description)
                     {
-                        return CustomPortletModeType.class;
+                        Description desc = target.addDescription(d.lang);
+                        desc.setDescription(d.value);
                     }
-
-                    public CustomPortletMode newElement()
+                }
+            }
+        }
+        if (customWindowState != null)
+        {
+            for (CustomWindowStateType src : customWindowState)
+            {
+                CustomWindowState target = app.addCustomWindowState(src.windowState);
+                if (src.description != null)
+                {
+                    for (DescriptionType d : src.description)
                     {
-                        return new CustomPortletModeType();
+                        Description desc = target.addDescription(d.lang);
+                        desc.setDescription(d.value);
                     }
-                }); 
-            if (customPortletMode != null)
-            {
-                lf.addAll(customPortletMode);
+                }
             }
-            customPortletMode = lf;
         }
-        return (ElementFactoryList<CustomPortletMode>)customPortletMode;
-    }
-
-    public CustomWindowState getCustomWindowState(String name)
-    {
-        for (CustomWindowState cws : getCustomWindowStates())
+        if (userAttribute != null)
         {
-            if (cws.getWindowState().equalsIgnoreCase(name))
+            for (UserAttributeType src : userAttribute)
             {
-                return cws;
+                UserAttribute target = app.addUserAttribute(src.name);
+                if (src.description != null)
+                {
+                    for (DescriptionType d : src.description)
+                    {
+                        Description desc = target.addDescription(d.lang);
+                        desc.setDescription(d.value);
+                    }
+                }
             }
         }
-        return null;
-    }
-    
-    public ElementFactoryList<CustomWindowState> getCustomWindowStates()
-    {
-        if (customWindowState == null || !(customWindowState instanceof ElementFactoryList))
+        if (securityConstraint != null)
         {
-            ElementFactoryList<CustomWindowState> lf = 
-                new ElementFactoryList<CustomWindowState>( new ElementFactoryList.Factory<CustomWindowState>()
+            for (SecurityConstraintType src : securityConstraint)
+            {
+                SecurityConstraint target = app.addSecurityConstraint(src.userDataConstraint.transportGuarantee);
+                if (src.displayName != null)
                 {
-                    public Class<? extends CustomWindowState> getElementClass()
+                    for (DisplayNameType d : src.displayName)
                     {
-                        return CustomWindowStateType.class;
+                        DisplayName dname = target.addDisplayName(d.lang);
+                        dname.setDisplayName(d.value);
                     }
-
-                    public CustomWindowState newElement()
+                }
+                if (src.portletCollection != null && src.portletCollection.portletName != null)
+                {
+                    for (String pname : src.portletCollection.portletName)
                     {
-                        return new CustomWindowStateType();
+                        target.addPortletName(pname);
                     }
-                }); 
-            if (customWindowState != null)
-            {
-                lf.addAll(customWindowState);
+                }
             }
-            customWindowState = lf;
         }
-        return (ElementFactoryList<CustomWindowState>)customWindowState;
+        return app;
     }
-
-    public UserAttribute getUserAttribute(String name)
+    
+    private void downgradePortlet(PortletDefinition src, PortletType target)
     {
-        for (UserAttribute ua : getUserAttributes())
+        // TODO
+    }
+    
+    private void upgradePortlet(PortletType src, PortletDefinition target)
+    {
+        if (src.description != null)
         {
-            if (ua.getName().equals(name))
+            for (DescriptionType d : src.description)
             {
-                return ua;
+                Description desc = target.addDescription(d.lang);
+                desc.setDescription(d.value);
             }
         }
-        return null;
-    }
-    
-    public ElementFactoryList<UserAttribute> getUserAttributes()
-    {
-        if (userAttribute == null || !(userAttribute instanceof ElementFactoryList))
+        if (src.displayName != null)
+        {
+            for (DisplayNameType d : src.displayName)
+            {
+                DisplayName dname = target.addDisplayName(d.lang);
+                dname.setDisplayName(d.value);
+            }
+        }
+        target.setPortletClass(src.portletClass);
+        if (src.expirationCache != null)
         {
-            ElementFactoryList<UserAttribute> lf = 
-                new ElementFactoryList<UserAttribute>( new ElementFactoryList.Factory<UserAttribute>()
+            target.setExpirationCache(src.expirationCache.intValue());
+        }
+        if (src.initParam != null)
+        {
+            for (InitParamType p : src.initParam)
+            {
+                InitParam param = target.addInitParam(p.name);
+                param.setParamValue(p.value);
+                if (p.description != null)
                 {
-                    public Class<? extends UserAttribute> getElementClass()
+                    for (DescriptionType d : p.description)
                     {
-                        return UserAttributeType.class;
+                        Description desc = param.addDescription(d.lang);
+                        desc.setDescription(d.value);
                     }
-
-                    public UserAttribute newElement()
+                }
+            }
+        }
+        if (src.supports != null)
+        {
+            for (SupportsType st : src.supports)
+            {
+                Supports s = target.addSupports(st.mimeType);
+                if (st.portletMode != null)
+                {
+                    for (String mode : st.portletMode)
                     {
-                        return new UserAttributeType();
+                        s.addPortletMode(mode);
                     }
-                }); 
-            if (userAttribute != null)
+                }
+            }
+        }
+        if (src.supportedLocale != null)
+        {
+            for (String lang : src.supportedLocale)
             {
-                lf.addAll(userAttribute);
+                target.addSupportedLocale(lang);
             }
-            userAttribute = lf;
         }
-        return (ElementFactoryList<UserAttribute>)userAttribute;
-    }
-
-    public ElementFactoryList<SecurityConstraint> getSecurityConstraints()
-    {
-        if (securityConstraint == null || !(securityConstraint instanceof ElementFactoryList))
+        target.setResourceBundle(src.resourceBundle);
+        if (src.portletInfo != null)
         {
-            ElementFactoryList<SecurityConstraint> lf = 
-                new ElementFactoryList<SecurityConstraint>( new ElementFactoryList.Factory<SecurityConstraint>()
+            PortletInfo pi = target.getPortletInfo();
+            pi.setTitle(src.portletInfo.title);
+            pi.setShortTitle(src.portletInfo.shortTitle);
+            pi.setKeywords(src.portletInfo.keywords);
+        }
+        if (src.portletPreferences != null)
+        {
+            Preferences prefs = target.getPortletPreferences();
+            prefs.setPreferencesValidator(src.portletPreferences.preferencesValidator);
+            if (src.portletPreferences.preference != null)
+            {
+                for (PreferenceType p : src.portletPreferences.preference)
                 {
-                    public Class<? extends SecurityConstraint> getElementClass()
+                    Preference pref = prefs.addPreference(p.name);
+                    if (p.value != null)
                     {
-                        return SecurityConstraintType.class;
+                        for (String value : p.value)
+                        {
+                            pref.addValue(value);
+                        }
                     }
-
-                    public SecurityConstraint newElement()
+                    if (p.readOnly != null)
                     {
-                        return new SecurityConstraintType();
+                        pref.setReadOnly(p.readOnly.booleanValue());
                     }
-                }); 
-            if (securityConstraint != null)
+                }
+            }
+        }
+        if (src.securityRoleRef != null)
+        {
+            for (SecurityRoleRefType rrt : src.securityRoleRef)
             {
-                lf.addAll(securityConstraint);
+                SecurityRoleRef srr = target.addSecurityRoleRef(rrt.roleName);
+                srr.setRoleLink(rrt.roleLink);
+                if (rrt.description != null)
+                {
+                    for (DescriptionType d : rrt.description)
+                    {
+                        Description desc = srr.addDescription(d.lang);
+                        desc.setDescription(d.value);
+                    }
+                }
             }
-            securityConstraint = lf;
         }
-        return (ElementFactoryList<SecurityConstraint>)securityConstraint;
-    }
-
-    public String getResourceBundle()
-    {
-        return null;
-    }
-
-    public void setResourceBundle(String value)
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public Filter getFilter(String name)
-    {
-        throw new UnsupportedOperationException();
-    }
-    
-    public ElementFactoryList<Filter> getFilters()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public FilterMapping getFilterMapping(String name)
-    {
-        throw new UnsupportedOperationException();
-    }
-    
-    public ElementFactoryList<FilterMapping> getFilterMappings()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public String getDefaultNamespace()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public void setDefaultNamespace(String value)
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public ElementFactoryList<EventDefinition> getEventDefinitions()
-    {
-        throw new UnsupportedOperationException();
-    }
-    
-    public PublicRenderParameter getPublicRenderParameter(String identifier)
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public ElementFactoryList<PublicRenderParameter> getPublicRenderParameters()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public ElementFactoryList<Listener> getListeners()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public ContainerRuntimeOption getContainerRuntimeOption(String name)
-    {
-        throw new UnsupportedOperationException();
-    }
-    
-    
-    public ElementFactoryList<ContainerRuntimeOption> getContainerRuntimeOptions()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public String getVersion()
-    {
-        return version;
-    }
-
-    public void setVersion(String value)
-    {
-        version = value;
     }
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletCollectionType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletCollectionType.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletCollectionType.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletCollectionType.java Tue Oct 21 09:25:05 2008
@@ -16,7 +16,6 @@
  */
 package org.apache.pluto.descriptors.portlet10;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.bind.annotation.XmlAccessType;
@@ -51,14 +50,5 @@
 {
     @XmlElement(name = "portlet-name", required = true)
     @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
-    protected List<String> portletName;
-
-    public List<String> getPortletNames()
-    {
-        if (portletName == null)
-        {
-            portletName = new ArrayList<String>();
-        }
-        return portletName;
-    }
+    List<String> portletName;
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletInfoType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletInfoType.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletInfoType.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletInfoType.java Tue Oct 21 09:25:05 2008
@@ -23,8 +23,6 @@
 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
-import org.apache.pluto.om.portlet.PortletInfo;
-
 /**
  * <p>Java class for portlet-infoType complex type. <p>The following schema fragment specifies the expected content
  * contained within this class.
@@ -48,45 +46,15 @@
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "portlet-infoType", propOrder = { "title", "shortTitle", "keywords" })
-public class PortletInfoType implements PortletInfo
+public class PortletInfoType
 {
     @XmlElement(name = "title")
     @XmlJavaTypeAdapter(value = CollapsedStringAdapter.class)
-    protected String title;
+    String title;
     @XmlElement(name = "short-title")
     @XmlJavaTypeAdapter(value = CollapsedStringAdapter.class)
-    protected String shortTitle;
+    String shortTitle;
     @XmlElement(name = "keywords")
     @XmlJavaTypeAdapter(value = CollapsedStringAdapter.class)
-    protected String keywords;
-
-    public String getTitle()
-    {
-        return title;
-    }
-
-    public void setTitle(String value)
-    {
-        title = value;
-    }
-
-    public String getShortTitle()
-    {
-        return shortTitle;
-    }
-
-    public void setShortTitle(String value)
-    {
-        shortTitle = value;
-    }
-
-    public String getKeywords()
-    {
-        return keywords;
-    }
-
-    public void setKeywords(String value)
-    {
-        keywords = value;
-    }
+    String keywords;
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletPreferencesType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletPreferencesType.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletPreferencesType.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletPreferencesType.java Tue Oct 21 09:25:05 2008
@@ -23,10 +23,6 @@
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
 
-import org.apache.pluto.om.ElementFactoryList;
-import org.apache.pluto.om.portlet.Preference;
-import org.apache.pluto.om.portlet.Preferences;
-
 /**
  * Portlet persistent preference store. Used in: portlet <p>Java class for portlet-preferencesType complex type. <p>The
  * following schema fragment specifies the expected content contained within this class.
@@ -49,58 +45,10 @@
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "portlet-preferencesType", propOrder = { "preference", "preferencesValidator" })
-public class PortletPreferencesType implements Preferences
+public class PortletPreferencesType
 {
-    @XmlElement(name = "preference", type=PreferenceType.class)
-    protected List<Preference> preference;
+    @XmlElement(name = "preference")
+    List<PreferenceType> preference;
     @XmlElement(name = "preferences-validator")
-    protected String preferencesValidator;
-
-    public Preference getPortletPreference(String name)
-    {
-        for (Preference p : getPortletPreferences())
-        {
-            if (p.getName().equals(name))
-            {
-                return p;
-            }
-        }
-        return null;
-    }
-    
-    public ElementFactoryList<Preference> getPortletPreferences()
-    {
-        if (preference == null || !(preference instanceof ElementFactoryList))
-        {
-            ElementFactoryList<Preference> lf = 
-                new ElementFactoryList<Preference>( new ElementFactoryList.Factory<Preference>()
-                {
-                    public Class<? extends Preference> getElementClass()
-                    {
-                        return PreferenceType.class;
-                    }
-
-                    public Preference newElement()
-                    {
-                        return new PreferenceType();
-                    }
-                }); 
-            if (preference != null)
-            {
-                lf.addAll(preference);
-            }
-            preference = lf;
-        }
-        return (ElementFactoryList<Preference>)preference;
-    }
-
-    public String getPreferencesValidator()
-    {
-        return preferencesValidator;
-    }
-
-    public void setPreferencesValidator(String value)
-    {
-        preferencesValidator = value;
-    }
+    String preferencesValidator;
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletType.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletType.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PortletType.java Tue Oct 21 09:25:05 2008
@@ -16,32 +16,15 @@
  */
 package org.apache.pluto.descriptors.portlet10;
 
-import java.util.ArrayList;
 import java.util.List;
-import java.util.Locale;
 
-import javax.xml.bind.Unmarshaller;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
-import org.apache.pluto.om.ElementFactoryList;
-import org.apache.pluto.om.portlet.ContainerRuntimeOption;
-import org.apache.pluto.om.portlet.Description;
-import org.apache.pluto.om.portlet.DisplayName;
-import org.apache.pluto.om.portlet.EventDefinitionReference;
-import org.apache.pluto.om.portlet.InitParam;
-import org.apache.pluto.om.portlet.PortletDefinition;
-import org.apache.pluto.om.portlet.PortletApplicationDefinition;
-import org.apache.pluto.om.portlet.PortletInfo;
-import org.apache.pluto.om.portlet.Preferences;
-import org.apache.pluto.om.portlet.SecurityRoleRef;
-import org.apache.pluto.om.portlet.Supports;
-
 /**
  * The portlet element contains the declarative data of a portlet. Used in: portlet-app <p>Java class for portletType
  * complex type. <p>The following schema fragment specifies the expected content contained within this class.
@@ -81,365 +64,34 @@
 @XmlType(name = "portletType", propOrder = { "description", "portletName", "displayName", "portletClass", "initParam",
                                             "expirationCache", "supports", "supportedLocale", "resourceBundle",
                                             "portletInfo", "portletPreferences", "securityRoleRef" })
-public class PortletType implements PortletDefinition
+public class PortletType
 {
-    @XmlElement(name = "description", type = DescriptionType.class)
-    protected List<Description> description;
+    @XmlElement(name = "description")
+    List<DescriptionType> description;
     @XmlElement(name = "portlet-name", required = true)
     @XmlJavaTypeAdapter(value = CollapsedStringAdapter.class)
-    protected String portletName;
-    @XmlElement(name = "display-name", type = DisplayNameType.class)
-    protected List<DisplayName> displayName;
+    String portletName;
+    @XmlElement(name = "display-name")
+    List<DisplayNameType> displayName;
     @XmlElement(name = "portlet-class", required = true)
     @XmlJavaTypeAdapter(value = CollapsedStringAdapter.class)
-    protected String portletClass;
-    @XmlElement(name = "init-param", type = InitParamType.class)
-    protected List<InitParam> initParam;
+    String portletClass;
+    @XmlElement(name = "init-param")
+    List<InitParamType> initParam;
     @XmlElement(name = "expiration-cache")
-    protected Integer expirationCache;
-    @XmlElement(required = true, type = SupportsType.class)
-    protected List<Supports> supports;
+    Integer expirationCache;
+    @XmlElement(required = true)
+    List<SupportsType> supports;
     @XmlElement(name = "supported-locale")
     @XmlJavaTypeAdapter(value = CollapsedStringAdapter.class)
-    protected List<String> supportedLocale;
+    List<String> supportedLocale;
     @XmlElement(name = "resource-bundle")
     @XmlJavaTypeAdapter(value = CollapsedStringAdapter.class)
-    protected String resourceBundle;
+    String resourceBundle;
     @XmlElement(name = "portlet-info")
-    protected PortletInfoType portletInfo;
+    PortletInfoType portletInfo;
     @XmlElement(name = "portlet-preferences")
-    protected PortletPreferencesType portletPreferences;
-    @XmlElement(name = "security-role-ref", type = SecurityRoleRefType.class)
-    protected List<SecurityRoleRef> securityRoleRef;
-    @XmlTransient
-    private PortletApplicationDefinition application;
-
-    public PortletType()
-    {
-    }
-
-    public PortletType(PortletApplicationDefinition application)
-    {
-        this.application = application;
-    }
-
-    public PortletApplicationDefinition getApplication()
-    {
-        return application;
-    }
-
-    public void setApplication(PortletApplicationDefinition app)
-    {
-        this.application = app;
-    }
-
-    public Description getDescription(Locale locale)
-    {
-        for (Description d : getDescriptions())
-        {
-            if (d.getLocale().equals(locale))
-            {
-                return d;
-            }
-        }
-        return null;
-    }
-    
-    public ElementFactoryList<Description> getDescriptions()
-    {
-        if (description == null || !(description instanceof ElementFactoryList))
-        {
-            ElementFactoryList<Description> lf = new ElementFactoryList<Description>(new ElementFactoryList.Factory<Description>()
-            {
-                public Class<? extends Description> getElementClass()
-                {
-                    return DescriptionType.class;
-                }
-
-                public Description newElement()
-                {
-                    return new DescriptionType();
-                }
-            });
-            if (description != null)
-            {
-                lf.addAll(description);
-            }
-            description = lf;
-        }
-        return (ElementFactoryList<Description>) description;
-    }
-
-    public String getPortletName()
-    {
-        return portletName;
-    }
-
-    public void setPortletName(String value)
-    {
-        portletName = value;
-    }
-
-    public DisplayName getDisplayName(Locale locale)
-    {
-        for (DisplayName d : getDisplayNames())
-        {
-            if (d.getLocale().equals(locale))
-            {
-                return d;
-            }
-        }
-        return null;
-    }
-    
-    public ElementFactoryList<DisplayName> getDisplayNames()
-    {
-        if (displayName == null || !(displayName instanceof ElementFactoryList))
-        {
-            ElementFactoryList<DisplayName> lf = new ElementFactoryList<DisplayName>(new ElementFactoryList.Factory<DisplayName>()
-            {
-                public Class<? extends DisplayName> getElementClass()
-                {
-                    return DisplayNameType.class;
-                }
-
-                public DisplayName newElement()
-                {
-                    return new DisplayNameType();
-                }
-            });
-            if (displayName != null)
-            {
-                lf.addAll(displayName);
-            }
-            displayName = lf;
-        }
-        return (ElementFactoryList<DisplayName>) displayName;
-    }
-
-    public String getPortletClass()
-    {
-        return portletClass;
-    }
-
-    public void setPortletClass(String value)
-    {
-        portletClass = value;
-    }
-
-    public InitParam getInitParam(String name)
-    {
-        for (InitParam param : getInitParams())
-        {
-            if (param.getParamName().equals(name))
-            {
-                return param;
-            }
-        }
-        return null;
-    }
-
-    public ElementFactoryList<InitParam> getInitParams()
-    {
-        if (initParam == null || !(initParam instanceof ElementFactoryList))
-        {
-            ElementFactoryList<InitParam> lf = new ElementFactoryList<InitParam>(new ElementFactoryList.Factory<InitParam>()
-            {
-                public Class<? extends InitParam> getElementClass()
-                {
-                    return InitParamType.class;
-                }
-
-                public InitParam newElement()
-                {
-                    return new InitParamType();
-                }
-            });
-            if (initParam != null)
-            {
-                lf.addAll(initParam);
-            }
-            initParam = lf;
-        }
-        return (ElementFactoryList<InitParam>) initParam;
-    }
-
-    public int getExpirationCache()
-    {
-        return expirationCache != null ? expirationCache.intValue() : 0;
-    }
-
-    public void setExpirationCache(int value)
-    {
-        expirationCache = new Integer(value);
-    }
-
-    public String getCacheScope()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public void setCacheScope(String cacheScope)
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public Supports getSupports(String mimeType)
-    {
-        for (Supports s : getSupports())
-        {
-            if (s.getMimeType().equals(mimeType))
-            {
-                return s;
-            }
-        }
-        return null;
-    }
-    
-    public ElementFactoryList<Supports> getSupports()
-    {
-        if (supports == null || !(supports instanceof ElementFactoryList))
-        {
-            ElementFactoryList<Supports> lf = new ElementFactoryList<Supports>(new ElementFactoryList.Factory<Supports>()
-            {
-                public Class<? extends Supports> getElementClass()
-                {
-                    return SupportsType.class;
-                }
-
-                public Supports newElement()
-                {
-                    return new SupportsType();
-                }
-            });
-            if (supports != null)
-            {
-                lf.addAll(supports);
-            }
-            supports = lf;
-        }
-        return (ElementFactoryList<Supports>) supports;
-    }
-
-    public List<String> getSupportedLocales()
-    {
-        if (supportedLocale == null)
-        {
-            supportedLocale = new ArrayList<String>();
-        }
-        return supportedLocale;
-    }
-
-    public String getResourceBundle()
-    {
-        return resourceBundle;
-    }
-
-    public void setResourceBundle(String value)
-    {
-        resourceBundle = value;
-    }
-
-    public PortletInfo getPortletInfo()
-    {
-        return getPortletInfo(false);
-    }
-
-    public PortletInfo getPortletInfo(boolean create)
-    {
-        if (create && portletInfo == null)
-        {
-            portletInfo = new PortletInfoType();
-        }
-        return portletInfo;
-    }
-
-    public Preferences getPortletPreferences()
-    {
-        return getPortletPreferences(false);
-    }
-
-    public Preferences getPortletPreferences(boolean create)
-    {
-        if (create && portletPreferences == null)
-        {
-            portletPreferences = new PortletPreferencesType();
-        }
-        return portletPreferences;
-    }
-
-    public SecurityRoleRef getSecurityRoleRef(String roleName)
-    {
-        for (SecurityRoleRef ref : getSecurityRoleRefs())
-        {
-            if (ref.getRoleName().equals(roleName))
-            {
-                return ref;
-            }
-        }
-        return null;
-    }
-
-    public ElementFactoryList<SecurityRoleRef> getSecurityRoleRefs()
-    {
-        if (securityRoleRef == null || !(securityRoleRef instanceof ElementFactoryList))
-        {
-            ElementFactoryList<SecurityRoleRef> lf = new ElementFactoryList<SecurityRoleRef>(
-                                                                                   new ElementFactoryList.Factory<SecurityRoleRef>()
-                                                                                   {
-                                                                                       public Class<? extends SecurityRoleRef> getElementClass()
-                                                                                       {
-                                                                                           return SecurityRoleRefType.class;
-                                                                                       }
-
-                                                                                       public SecurityRoleRef newElement()
-                                                                                       {
-                                                                                           return new SecurityRoleRefType();
-                                                                                       }
-                                                                                   });
-            if (securityRoleRef != null)
-            {
-                lf.addAll(securityRoleRef);
-            }
-            securityRoleRef = lf;
-        }
-        return (ElementFactoryList<SecurityRoleRef>) securityRoleRef;
-    }
-
-    public ElementFactoryList<EventDefinitionReference> getSupportedProcessingEvents()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public ElementFactoryList<EventDefinitionReference> getSupportedPublishingEvents()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public List<String> getSupportedPublicRenderParameters()
-    {
-        throw new UnsupportedOperationException();
-    }
-    
-    public ContainerRuntimeOption getContainerRuntimeOption(String name)
-    {
-        for (ContainerRuntimeOption cro : getContainerRuntimeOptions())
-        {
-            if (cro.getName().equals(name))
-            {
-                return cro;
-            }
-        }
-        return null;
-    }
-
-    public ElementFactoryList<ContainerRuntimeOption> getContainerRuntimeOptions()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public void afterUnmarshal(Unmarshaller u, Object parent)
-    {
-        application = (PortletApplicationDefinition) parent;
-    }
+    PortletPreferencesType portletPreferences;
+    @XmlElement(name = "security-role-ref")
+    List<SecurityRoleRefType> securityRoleRef;
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PreferenceType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PreferenceType.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PreferenceType.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/PreferenceType.java Tue Oct 21 09:25:05 2008
@@ -16,7 +16,6 @@
  */
 package org.apache.pluto.descriptors.portlet10;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.bind.annotation.XmlAccessType;
@@ -26,8 +25,6 @@
 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
-import org.apache.pluto.om.portlet.Preference;
-
 /**
  * Persistent preference values that may be used for customization and personalization by the portlet. Used in:
  * portlet-preferences <p>Java class for preferenceType complex type. <p>The following schema fragment specifies the
@@ -52,42 +49,13 @@
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "preferenceType", propOrder = { "name", "value", "readOnly" })
-public class PreferenceType implements Preference
+public class PreferenceType
 {
     @XmlElement(required = true)
     @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
-    protected String name;
+    String name;
     @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
-    protected List<String> value;
+    List<String> value;
     @XmlElement(name = "read-only")
-    protected Boolean readOnly;
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName(String value)
-    {
-        name = value;
-    }
-
-    public List<String> getValues()
-    {
-        if (value == null)
-        {
-            value = new ArrayList<String>();
-        }
-        return value;
-    }
-
-    public boolean isReadOnly()
-    {
-        return readOnly != null ? readOnly.booleanValue() : false;
-    }
-
-    public void setReadOnly(boolean value)
-    {
-        readOnly = value ? Boolean.TRUE : Boolean.FALSE;
-    }
+    Boolean readOnly;
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityConstraintType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityConstraintType.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityConstraintType.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityConstraintType.java Tue Oct 21 09:25:05 2008
@@ -17,18 +17,12 @@
 package org.apache.pluto.descriptors.portlet10;
 
 import java.util.List;
-import java.util.Locale;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;
 
-import org.apache.pluto.om.ElementFactoryList;
-import org.apache.pluto.om.portlet.DisplayName;
-import org.apache.pluto.om.portlet.SecurityConstraint;
-import org.apache.pluto.om.portlet.UserDataConstraint;
-
 /**
  * The security-constraintType is used to associate intended security constraints with one or more portlets. Used in:
  * portlet-app <p>Java class for security-constraintType complex type. <p>The following schema fragment specifies the
@@ -53,68 +47,12 @@
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "security-constraintType", propOrder = { "displayName", "portletCollection", "userDataConstraint" })
-public class SecurityConstraintType implements SecurityConstraint
+public class SecurityConstraintType
 {
-    @XmlElement(name = "display-name", type=DisplayNameType.class)
-    protected List<DisplayName> displayName;
+    @XmlElement(name = "display-name")
+    List<DisplayNameType> displayName;
     @XmlElement(name = "portlet-collection", required = true)
-    protected PortletCollectionType portletCollection;
+    PortletCollectionType portletCollection;
     @XmlElement(name = "user-data-constraint", required = true)
-    protected UserDataConstraintType userDataConstraint;
-
-    public DisplayName getDisplayName(Locale locale)
-    {
-        for (DisplayName d : getDisplayNames())
-        {
-            if (d.getLocale().equals(locale))
-            {
-                return d;
-            }
-        }
-        return null;
-    }
-    
-    public ElementFactoryList<DisplayName> getDisplayNames()
-    {
-        if (displayName == null || !(displayName instanceof ElementFactoryList))
-        {
-            ElementFactoryList<DisplayName> lf = 
-                new ElementFactoryList<DisplayName>( new ElementFactoryList.Factory<DisplayName>()
-                {
-                    public Class<? extends DisplayName> getElementClass()
-                    {
-                        return DisplayNameType.class;
-                    }
-
-                    public DisplayName newElement()
-                    {
-                        return new DisplayNameType();
-                    }
-                }); 
-            if (displayName != null)
-            {
-                lf.addAll(displayName);
-            }
-            displayName = lf;
-        }
-        return (ElementFactoryList<DisplayName>)displayName;
-    }
-
-    public List<String> getPortletNames()
-    {
-        if (portletCollection == null)
-        {
-            portletCollection = new PortletCollectionType();
-        }
-        return portletCollection.getPortletNames();
-    }
-
-    public UserDataConstraint getUserDataConstraint()
-    {
-        if (userDataConstraint == null)
-        {
-            userDataConstraint = new UserDataConstraintType();
-        }
-        return userDataConstraint;
-    }
+    UserDataConstraintType userDataConstraint;
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityRoleRefType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityRoleRefType.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityRoleRefType.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/SecurityRoleRefType.java Tue Oct 21 09:25:05 2008
@@ -17,7 +17,6 @@
 package org.apache.pluto.descriptors.portlet10;
 
 import java.util.List;
-import java.util.Locale;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -26,10 +25,6 @@
 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
-import org.apache.pluto.om.ElementFactoryList;
-import org.apache.pluto.om.portlet.Description;
-import org.apache.pluto.om.portlet.SecurityRoleRef;
-
 /**
  * The security-role-ref element contains the declaration of a security role reference in the code of the web
  * application. The declaration consists of an optional description, the security role name used in the code, and an
@@ -58,72 +53,14 @@
 */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "security-role-refType", propOrder = { "description", "roleName", "roleLink" })
-public class SecurityRoleRefType implements SecurityRoleRef
+public class SecurityRoleRefType
 {
-    @XmlElement(name = "description", type=DescriptionType.class)
-    protected List<Description> description;
+    @XmlElement(name = "description")
+    List<DescriptionType> description;
     @XmlElement(name = "role-name", required = true)
     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
-    protected String roleName;
+    String roleName;
     @XmlElement(name = "role-link")
     @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
-    protected String roleLink;
-
-    public Description getDescription(Locale locale)
-    {
-        for (Description d : getDescriptions())
-        {
-            if (d.getLocale().equals(locale))
-            {
-                return d;
-            }
-        }
-        return null;
-    }
-    
-    public ElementFactoryList<Description> getDescriptions()
-    {
-        if (description == null || !(description instanceof ElementFactoryList))
-        {
-            ElementFactoryList<Description> lf = 
-                new ElementFactoryList<Description>( new ElementFactoryList.Factory<Description>()
-                {
-                    public Class<? extends Description> getElementClass()
-                    {
-                        return DescriptionType.class;
-                    }
-
-                    public Description newElement()
-                    {
-                        return new DescriptionType();
-                    }
-                }); 
-            if (description != null)
-            {
-                lf.addAll(description);
-            }
-            description = lf;
-        }
-        return (ElementFactoryList<Description>)description;
-    }
-
-    public String getRoleName()
-    {
-        return roleName;
-    }
-
-    public void setRoleName(String value)
-    {
-        roleName = value;
-    }
-
-    public String getRoleLink()
-    {
-        return roleLink;
-    }
-
-    public void setRoleLink(String value)
-    {
-        roleLink = value;
-    }
+    String roleLink;
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/SupportsType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/SupportsType.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/SupportsType.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/SupportsType.java Tue Oct 21 09:25:05 2008
@@ -16,7 +16,6 @@
  */
 package org.apache.pluto.descriptors.portlet10;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.bind.annotation.XmlAccessType;
@@ -26,8 +25,6 @@
 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
-import org.apache.pluto.om.portlet.Supports;
-
 /**
  * Supports indicates the portlet modes a portlet supports for a specific content type. All portlets must support the
  * view mode. Used in: portlet <p>Java class for supportsType complex type. <p>The following schema fragment specifies
@@ -51,36 +48,12 @@
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "supportsType", propOrder = { "mimeType", "portletMode" })
-public class SupportsType implements Supports
+public class SupportsType
 {
     @XmlElement(name = "mime-type", required = true)
     @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
-    protected String mimeType;
+    String mimeType;
     @XmlElement(name = "portlet-mode")
     @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
-    protected List<String> portletMode;
-
-    public String getMimeType()
-    {
-        return mimeType;
-    }
-
-    public void setMimeType(String value)
-    {
-        mimeType = value;
-    }
-
-    public List<String> getPortletModes()
-    {
-        if (portletMode == null)
-        {
-            portletMode = new ArrayList<String>();
-        }
-        return portletMode;
-    }
-
-    public List<String> getWindowStates()
-    {
-        throw new UnsupportedOperationException();
-    }
+    List<String> portletMode;
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/UserAttributeType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/UserAttributeType.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/UserAttributeType.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/UserAttributeType.java Tue Oct 21 09:25:05 2008
@@ -17,7 +17,6 @@
 package org.apache.pluto.descriptors.portlet10;
 
 import java.util.List;
-import java.util.Locale;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -26,10 +25,6 @@
 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
-import org.apache.pluto.om.ElementFactoryList;
-import org.apache.pluto.om.portlet.Description;
-import org.apache.pluto.om.portlet.UserAttribute;
-
 /**
  * User attribute defines a user specific attribute that the portlet application needs. The portlet within this
  * application can access this attribute via the request parameter USER_INFO map. Used in: portlet-app <p>Java class
@@ -54,59 +49,11 @@
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "user-attributeType", propOrder = { "description", "name" })
-public class UserAttributeType implements UserAttribute
+public class UserAttributeType
 {
-    @XmlElement(name = "description", type=DescriptionType.class)
-    protected List<Description> description;
+    @XmlElement(name = "description")
+    List<DescriptionType> description;
     @XmlElement(required = true)
     @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
-    protected String name;
-
-    public Description getDescription(Locale locale)
-    {
-        for (Description d : getDescriptions())
-        {
-            if (d.getLocale().equals(locale))
-            {
-                return d;
-            }
-        }
-        return null;
-    }
-    
-    public ElementFactoryList<Description> getDescriptions()
-    {
-        if (description == null || !(description instanceof ElementFactoryList))
-        {
-            ElementFactoryList<Description> lf = 
-                new ElementFactoryList<Description>( new ElementFactoryList.Factory<Description>()
-                {
-                    public Class<? extends Description> getElementClass()
-                    {
-                        return DescriptionType.class;
-                    }
-
-                    public Description newElement()
-                    {
-                        return new DescriptionType();
-                    }
-                }); 
-            if (description != null)
-            {
-                lf.addAll(description);
-            }
-            description = lf;
-        }
-        return (ElementFactoryList<Description>)description;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName(String value)
-    {
-        name = value;
-    }
+    String name;
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/UserDataConstraintType.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/UserDataConstraintType.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/UserDataConstraintType.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/portlet10/UserDataConstraintType.java Tue Oct 21 09:25:05 2008
@@ -17,7 +17,6 @@
 package org.apache.pluto.descriptors.portlet10;
 
 import java.util.List;
-import java.util.Locale;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -26,10 +25,6 @@
 import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
-import org.apache.pluto.om.ElementFactoryList;
-import org.apache.pluto.om.portlet.Description;
-import org.apache.pluto.om.portlet.UserDataConstraint;
-
 /**
  * The user-data-constraintType is used to indicate how data communicated between the client and portlet should be
  * protected. Used in: security-constraint <p>Java class for user-data-constraintType complex type. <p>The following
@@ -53,59 +48,11 @@
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "user-data-constraintType", propOrder = { "description", "transportGuarantee" })
-public class UserDataConstraintType implements UserDataConstraint
+public class UserDataConstraintType
 {
-    @XmlElement(name = "description", type=DescriptionType.class)
-    protected List<Description> description;
+    @XmlElement(name = "description")
+    List<DescriptionType> description;
     @XmlElement(name = "transport-guarantee", required = true)
     @XmlJavaTypeAdapter(value=CollapsedStringAdapter.class)
-    protected String transportGuarantee;
-
-    public Description getDescription(Locale locale)
-    {
-        for (Description d : getDescriptions())
-        {
-            if (d.getLocale().equals(locale))
-            {
-                return d;
-            }
-        }
-        return null;
-    }
-    
-    public ElementFactoryList<Description> getDescriptions()
-    {
-        if (description == null || !(description instanceof ElementFactoryList))
-        {
-            ElementFactoryList<Description> lf = 
-                new ElementFactoryList<Description>( new ElementFactoryList.Factory<Description>()
-                {
-                    public Class<? extends Description> getElementClass()
-                    {
-                        return DescriptionType.class;
-                    }
-
-                    public Description newElement()
-                    {
-                        return new DescriptionType();
-                    }
-                }); 
-            if (description != null)
-            {
-                lf.addAll(description);
-            }
-            description = lf;
-        }
-        return (ElementFactoryList<Description>)description;
-    }
-
-    public String getTransportGuarantee()
-    {
-        return transportGuarantee;
-    }
-
-    public void setTransportGuarantee(String value)
-    {
-        transportGuarantee = value;
-    }
+    String transportGuarantee;
 }

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/services/jaxb/PortletAppDescriptorService.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/services/jaxb/PortletAppDescriptorService.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/services/jaxb/PortletAppDescriptorService.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/services/jaxb/PortletAppDescriptorService.java Tue Oct 21 09:25:05 2008
@@ -33,6 +33,8 @@
  */
 public interface PortletAppDescriptorService {
 
+    PortletApplicationDefinition createPortletApplicationDefinition();
+    
     /**
      * Retrieve the PortletApp deployment descriptor
      * (portlet.xml).

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/services/jaxb/PortletAppDescriptorServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/services/jaxb/PortletAppDescriptorServiceImpl.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/services/jaxb/PortletAppDescriptorServiceImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/descriptors/services/jaxb/PortletAppDescriptorServiceImpl.java Tue Oct 21 09:25:05 2008
@@ -10,6 +10,7 @@
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 
+import org.apache.pluto.descriptors.portlet.PortletAppType;
 import org.apache.pluto.descriptors.services.jaxb.PortletAppDescriptorService;
 import org.apache.pluto.om.portlet.PortletApplicationDefinition;
 
@@ -20,6 +21,11 @@
 
 public class PortletAppDescriptorServiceImpl implements PortletAppDescriptorService{
 	
+    public PortletApplicationDefinition createPortletApplicationDefinition()
+    {
+        return new PortletAppType();
+    }
+    
 	/**
      * Read the Web Application Deployment Descriptor.
      *
@@ -29,16 +35,16 @@
     
     @SuppressWarnings("unchecked")
     public PortletApplicationDefinition read(InputStream in) throws IOException {
-    	JAXBElement<PortletApplicationDefinition> portletApp = null;
+    	JAXBElement app = null;
     	try {
     		JAXBContext jc = JAXBContext.newInstance( 
     				"org.apache.pluto.descriptors.portlet10" + ":" +
-    				"org.apache.pluto.descriptors.portlet20", PortletAppDescriptorServiceImpl.class.getClassLoader());
+    				"org.apache.pluto.descriptors.portlet", PortletAppDescriptorServiceImpl.class.getClassLoader());
 
     		Unmarshaller u = jc.createUnmarshaller();
     		u.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
 
-    		portletApp = (JAXBElement<PortletApplicationDefinition>) u.unmarshal(in);	            
+    		app = (JAXBElement) u.unmarshal(in);	            
     	}catch (JAXBException jaxbEx){
     		jaxbEx.printStackTrace();
     		throw new IOException(jaxbEx.getMessage());
@@ -46,30 +52,36 @@
     	catch(Exception me) {
     		throw new IOException(me.getLocalizedMessage());
     	}
-
-    	return portletApp.getValue();
+    	if (app.getValue() instanceof org.apache.pluto.descriptors.portlet10.PortletAppType)
+    	{
+    	    return ((org.apache.pluto.descriptors.portlet10.PortletAppType)app.getValue()).upgrade();
+    	}    	
+    	return (PortletApplicationDefinition)app.getValue();
     }
     
     /**
      * Write the deployment descriptor.
-     * @param portlet
+     * @param app
      * @throws java.io.IOException
      */
-    public void write(PortletApplicationDefinition portlet, OutputStream out) throws IOException {
+    public void write(PortletApplicationDefinition app, OutputStream out) throws IOException {
         try {
             JAXBContext jc = null;
-            if (portlet.getVersion().equals("1.0"))
-            {
-                jc = JAXBContext.newInstance("org.apache.pluto.descriptors.portlet10");
+            Object desc = null;
+            if (PortletApplicationDefinition.JSR_168_VERSION.equals(app.getVersion()))
+            {                
+                jc = JAXBContext.newInstance("org.apache.pluto.descriptors.portlet10");                
+                desc = new org.apache.pluto.descriptors.portlet10.PortletAppType(app);
             }
             else
             {
-                jc = JAXBContext.newInstance("org.apache.pluto.descriptors.portlet20");
+                jc = JAXBContext.newInstance("org.apache.pluto.descriptors.portlet");
+                desc = app;
             }
             Marshaller m = jc.createMarshaller();
             m.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
             m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE);
-            m.marshal(portlet,out);
+            m.marshal(desc,out);
         }catch (JAXBException jaxbEx){
             jaxbEx.printStackTrace();
             throw new IOException(jaxbEx.getMessage());

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletConfigImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletConfigImpl.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletConfigImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletConfigImpl.java Tue Oct 21 09:25:05 2008
@@ -100,7 +100,7 @@
             throw new IllegalArgumentException("Parameter name == null");
         }
 
-        Iterator<InitParam> parms = portletDD.getInitParams().iterator();
+        Iterator<? extends InitParam> parms = portletDD.getInitParams().iterator();
         while(parms.hasNext()) {
             InitParam param = parms.next();
             if (param.getParamName().equals(name)) {

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/test/java/org/apache/pluto/descriptors/services/jaxb/JaxBDescriptorServiceImplTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/test/java/org/apache/pluto/descriptors/services/jaxb/JaxBDescriptorServiceImplTest.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/test/java/org/apache/pluto/descriptors/services/jaxb/JaxBDescriptorServiceImplTest.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/test/java/org/apache/pluto/descriptors/services/jaxb/JaxBDescriptorServiceImplTest.java Tue Oct 21 09:25:05 2008
@@ -394,7 +394,7 @@
         InputStream inputStream = new ByteArrayInputStream(portlet168NoCache.toString().getBytes());
         PortletApplicationDefinition portletDD = jaxb.read( inputStream );
 
-        assertEquals( "1.0", portletDD.getVersion() );
+        assertEquals( "2.0", portletDD.getVersion() );
         assertEquals( 1, portletDD.getPortlets().size() );
 
         PortletDefinition pd = (PortletDefinition) portletDD.getPortlets().get( 0 );

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-container/src/test/java/org/apache/pluto/internal/impl/ResourceBundleFactoryTest.java Tue Oct 21 09:25:05 2008
@@ -22,7 +22,7 @@
 
 import junit.framework.Assert;
 
-import org.apache.pluto.descriptors.portlet20.PortletType;
+import org.apache.pluto.descriptors.portlet.PortletType;
 import org.apache.pluto.om.portlet.PortletDefinition;
 import org.apache.pluto.om.portlet.PortletInfo;
 import org.apache.pluto.util.PlutoTestCase;
@@ -40,7 +40,7 @@
 
         validDD = new PortletType();
 
-        PortletInfo info = validDD.getPortletInfo(true);
+        PortletInfo info = validDD.getPortletInfo();
         info.setTitle("Info Title");
         info.setShortTitle("Info Short Title");
         info.setKeywords("Info Keywords");

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java Tue Oct 21 09:25:05 2008
@@ -274,10 +274,10 @@
 			PortletApplicationDefinition portletAppDD = null;
 			try {
 				portletAppDD = portletRegistry.getPortletApplication(applicationName);
-				List<PortletDefinition> portletDDs = portletAppDD.getPortlets();
+				List<? extends PortletDefinition> portletDDs = portletAppDD.getPortlets();
 				List<QName> aliases = getAllAliases(eventName, portletAppDD);
 				for (PortletDefinition portletDD : portletDDs) {
-					List<EventDefinitionReference> processingEvents = portletDD.getSupportedProcessingEvents();
+					List<? extends EventDefinitionReference> processingEvents = portletDD.getSupportedProcessingEvents();
 					if (isEventSupported(processingEvents, eventName, portletAppDD.getDefaultNamespace())) {
                         if (portletDD.getPortletName().equals(portlet.getPortletName())) {
                                                           resultSet.add(portlet.getId());
@@ -331,7 +331,7 @@
 		return resultList;
 	}
 	
-	private boolean isEventSupported(List<EventDefinitionReference> supportedEvents, QName eventName, String defaultNamespace)
+	private boolean isEventSupported(List<? extends EventDefinitionReference> supportedEvents, QName eventName, String defaultNamespace)
 	{
 	    if (supportedEvents != null)
 	    {
@@ -523,7 +523,7 @@
 					.getAttribute(AttributeKeys.PORTLET_CONTAINER))
 					.getOptionalContainerServices().getPortletRegistryService();
 		}
-		List<EventDefinitionReference> events = null;
+		List<? extends EventDefinitionReference> events = null;
 		try {
 			events = portletRegistry.getPortlet(applicationName,
 					portletName).getSupportedPublishingEvents();
@@ -549,7 +549,7 @@
 	private boolean isValueInstanceOfDefinedClass(QName qname,
 			Serializable value) {
         PortletApplicationDefinition app = portletWindow.getPortletEntity().getPortletDefinition().getApplication();
-        List<EventDefinition> events = app.getEventDefinitions();
+        List<? extends EventDefinition> events = app.getEventDefinitions();
         if (events != null) {
             
             

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/FilterConfigImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/FilterConfigImpl.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/FilterConfigImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/FilterConfigImpl.java Tue Oct 21 09:25:05 2008
@@ -33,9 +33,9 @@
 public class FilterConfigImpl implements FilterConfig {
 
 	private String filterName = null;
-	private List<InitParam> initParameters = null;
+	private List<? extends InitParam> initParameters = null;
 	private PortletContext portletContext = null;
-	public FilterConfigImpl(String filterName, List<InitParam> initParameters, PortletContext portletContext){
+	public FilterConfigImpl(String filterName, List<? extends InitParam> initParameters, PortletContext portletContext){
 		this.filterName = filterName;
 		this.initParameters = initParameters;
 		this.portletContext = portletContext;

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/FilterManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/FilterManagerImpl.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/FilterManagerImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/FilterManagerImpl.java Tue Oct 21 09:25:05 2008
@@ -57,12 +57,12 @@
 	}
 	
 	private void initFilterChain(){
-		List<FilterMapping> filterMappingList = portletApp.getFilterMappings();
+		List<? extends FilterMapping> filterMappingList = portletApp.getFilterMappings();
 		if (filterMappingList!= null){
 			for (FilterMapping filterMapping : filterMappingList) {
 				if (isFilter(filterMapping, portletName)){
 					//the filter is specified for the portlet, check the filter for the lifecycle
-					List<Filter> filterList = portletApp.getFilters();
+					List<? extends Filter> filterList = portletApp.getFilters();
 					for (Filter filter : filterList) {
 						//search for the filter in the filter
 						if (filter.getFilterName().equals(filterMapping.getFilterName())){

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLListenerImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLListenerImpl.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLListenerImpl.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLListenerImpl.java Tue Oct 21 09:25:05 2008
@@ -46,7 +46,7 @@
 			LOG.error(message, new IllegalArgumentException(message));
 		}
 		//this list is needed for the classnames
-		List<Listener> portletURLFilterList = portletApp.getListeners();
+		List<? extends Listener> portletURLFilterList = portletApp.getListeners();
 		//Iterate over the classnames and for each entry in the list the filter..URL is called.
 		if (portletURLFilterList != null){
 			for (Listener listener : portletURLFilterList) {

Modified: portals/pluto/branches/2.0-spi-refactoring/pluto-util/src/test/java/org/apache/pluto/util/assemble/ear/ComplexEarAssemblerTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/2.0-spi-refactoring/pluto-util/src/test/java/org/apache/pluto/util/assemble/ear/ComplexEarAssemblerTest.java?rev=706677&r1=706676&r2=706677&view=diff
==============================================================================
--- portals/pluto/branches/2.0-spi-refactoring/pluto-util/src/test/java/org/apache/pluto/util/assemble/ear/ComplexEarAssemblerTest.java (original)
+++ portals/pluto/branches/2.0-spi-refactoring/pluto-util/src/test/java/org/apache/pluto/util/assemble/ear/ComplexEarAssemblerTest.java Tue Oct 21 09:25:05 2008
@@ -137,7 +137,7 @@
                     assertTrue( "WAR archive did not contain any servlet mappings", webXmlRewriter.hasServletMappings() );
                     assertTrue( "WAR archive did not contain any portlets", portletApp.getPortlets().size() > 0 );
                     
-                    for ( Iterator<PortletDefinition> iter = portletApp.getPortlets().iterator(); iter.hasNext(); ) {
+                    for ( Iterator<? extends PortletDefinition> iter = portletApp.getPortlets().iterator(); iter.hasNext(); ) {
                         PortletDefinition portlet = iter.next();
                         if (! testPortlets.contains( portlet.getPortletName() ) ) {
                             fail( "Unexpected test portlet name encountered: [" + portlet.getPortletName() + "]" );