Author: ate
Date: Thu Oct 16 18:04:24 2008
New Revision: 705440

URL: http://svn.apache.org/viewvc?rev=705440&view=rev
Log:
Intermediate update for http://issues.apache.org/jira/browse/JS2-871 - Upgrade 
Pluto container to version 2.0
- replacing old style ContentType and ContentTpeSet and implementations with 
new Supports object model

Added:
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportsImpl.java
   (contents, props changed)
      - copied, changed from r705403, 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContentTypeImpl.java
Removed:
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContentTypeImpl.java
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContentTypeSetImpl.java
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/portlet/ContentTypeComposite.java
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/common/portlet/ContentTypeSetComposite.java
Modified:
    
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/util/descriptor/PortletApplicationDescriptor.java
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/JETSPEED-INF/ojb/registry_repository.xml
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FragmentPortletDefinition.java
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestRegistryCache.java
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletDefinition.java
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/PortletObjectProxy.java
    
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml

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=705440&r1=705439&r2=705440&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 16 18:04:24 2008
@@ -49,8 +49,8 @@
 import org.apache.jetspeed.pipeline.valve.ValveContext;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.security.SecurityAccessController;
-import org.apache.pluto.om.portlet.ContentTypeSet;
 import org.apache.jetspeed.container.PortletWindow;
+import org.apache.pluto.om.portlet.Supports;
 
 /**
  * Assigns decorations and page actions to all of the portlet Fragments within
@@ -351,18 +351,18 @@
         
         PortletMode currentMode = 
requestContext.getPortalURL().getNavigationalState().getMode(window);
         WindowState currentState = 
requestContext.getPortalURL().getNavigationalState().getState(window);
-        ContentTypeSet content = portlet.getContentTypeSet();
+        List<Supports> supports = portlet.getSupports();
         
         if ( fragment.equals(requestContext.getPage().getRootFragment()) )
         {
             fragmentSupportsActions = true;
-            actions = getPageModes(requestContext, window, content, 
currentMode, currentState, pageActionAccess, decoration, isAjaxRequest);
+            actions = getPageModes(requestContext, window, supports, 
currentMode, currentState, pageActionAccess, decoration, isAjaxRequest);
         }
         else if ( !Fragment.LAYOUT.equals(fragment.getType()) )
         {
             fragmentSupportsActions = true;
             String fragmentId = fragment.getId();
-            PortletApplication pa = 
(PortletApplication)window.getPortletEntity().getPortletDefinition().getPortletApplicationDefinition();
+            PortletApplication pa = 
(PortletApplication)window.getPortletEntity().getPortletDefinition().getApplication();
 
             String portletName = portlet.getUniqueName();
 
@@ -402,7 +402,7 @@
                         }
                         if ( ! equalsCurrentMode || isAjaxRequest )
                         {
-                            if ( (content.supportsPortletMode(customMode) || 
isAutoSwitchableCustomMode(content, customMode))
+                            if ( (supportsPortletMode(supports,customMode) || 
isAutoSwitchableCustomMode(supports, customMode))
                                  && (!PortletMode.EDIT.equals(customMode) || 
pageActionAccess.isEditAllowed())
                                  && 
pageActionAccess.checkPortletMode(fragmentId, portletName, mappedMode)
                                  )
@@ -445,6 +445,23 @@
         return fragmentSupportsActions;
     }
     
+    protected boolean supportsPortletMode(List<Supports> supports, PortletMode 
mode)
+    {
+        if(mode.equals(PortletMode.VIEW))
+        {
+            return true;
+        }
+        String pm = mode.toString();
+        for (Supports s : supports)
+        {
+            if (s.getPortletModes().contains(pm))
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+    
     /**
      * Builds a list of portlet modes that can be executed on the current
      * <code>fragment</code> excluding the portlet's current mode.
@@ -459,7 +476,7 @@
      * @return <code>java.util.List</code> of modes excluding the current one.
      * @throws PortletEntityNotStoredException 
      */
-    protected List getPageModes(RequestContext requestContext, PortletWindow 
window, ContentTypeSet content, 
+    protected List getPageModes(RequestContext requestContext, PortletWindow 
window, List<Supports> supports, 
                                 PortletMode mode, WindowState state, 
PageActionAccess pageActionAccess, Decoration decoration,
                                 boolean isAjaxRequest)
     {
@@ -494,7 +511,7 @@
                 
                 
//window.getPortletEntity().getPortletDefinition().getInitParameterSet().get( 
"xxxx" );
                 
-                if (content.supportsPortletMode(PortletMode.HELP))
+                if (supportsPortletMode(supports,PortletMode.HELP))
                 {
                     if ( pageActionAccess.isEditing() )
                     {
@@ -692,7 +709,7 @@
         return this.autoSwitchingForConfigMode;
     }
     
-    private boolean isAutoSwitchableCustomMode(ContentTypeSet content, 
PortletMode customMode)
+    private boolean isAutoSwitchableCustomMode(List<Supports> supports, 
PortletMode customMode)
     {
         if (this.autoSwitchingForConfigMode && 
JetspeedActions.CONFIG_MODE.equals(customMode))
         {
@@ -701,7 +718,7 @@
         
         if (this.autoSwitchingToEditDefaultsModes)
         {
-            if (content.supportsPortletMode(PortletMode.EDIT) && 
JetspeedActions.EDIT_DEFAULTS_MODE.equals(customMode))
+            if (supportsPortletMode(supports,PortletMode.EDIT) && 
JetspeedActions.EDIT_DEFAULTS_MODE.equals(customMode))
             {
                 return true;
             }

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=705440&r1=705439&r2=705440&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 16 18:04:24 2008
@@ -34,7 +34,7 @@
 import org.apache.jetspeed.om.impl.UserAttributeImpl;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
-import org.apache.jetspeed.om.portlet.impl.ContentTypeImpl;
+import org.apache.jetspeed.om.portlet.impl.SupportsImpl;
 import org.apache.jetspeed.om.portlet.impl.CustomPortletModeImpl;
 import org.apache.jetspeed.om.portlet.impl.CustomWindowStateImpl;
 import org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl;
@@ -126,7 +126,7 @@
             
digester.addBeanPropertySetter("portlet-app/portlet/init-param/description", 
"description");
             digester.addSetNext("portlet-app/portlet/init-param/description", 
"addDescription");
 
-            digester.addObjectCreate("portlet-app/portlet/supports", 
ContentTypeImpl.class);
+            digester.addObjectCreate("portlet-app/portlet/supports", 
SupportsImpl.class);
             
digester.addBeanPropertySetter("portlet-app/portlet/supports/mime-type", 
"contentType");
             
digester.addCallMethod("portlet-app/portlet/supports/portlet-mode", 
"addPortletMode", 0);
             digester.addSetNext("portlet-app/portlet/supports", 
"addContentType");

Modified: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/JETSPEED-INF/ojb/registry_repository.xml
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/JETSPEED-INF/ojb/registry_repository.xml?rev=705440&r1=705439&r2=705440&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/JETSPEED-INF/ojb/registry_repository.xml
 (original)
+++ 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/JETSPEED-INF/ojb/registry_repository.xml
 Thu Oct 16 18:04:24 2008
@@ -429,14 +429,13 @@
       </collection-descriptor>
 
       <collection-descriptor
-         name="contentTypes"
-         
element-class-ref="org.apache.jetspeed.om.portlet.impl.ContentTypeImpl"
+         name="supports"
+         element-class-ref="org.apache.jetspeed.om.portlet.impl.SupportsImpl"
          auto-delete="true"
          auto-update = "true"
          auto-retrieve = "true"
          proxy="false"
       >
-
          <inverse-foreignkey field-ref="portletId"/>
       </collection-descriptor>
 
@@ -546,45 +545,40 @@
 
    </class-descriptor>
 
-<!--
-   - C O N T E N T    T Y P E
- -->
-    <class-descriptor
-      class="org.apache.jetspeed.om.common.portlet.ContentTypeComposite"
-
-   >
-      <extent-class 
class-ref="org.apache.jetspeed.om.portlet.impl.ContentTypeImpl" />
-   </class-descriptor>
-
-
-
    <class-descriptor
-      class="org.apache.jetspeed.om.portlet.impl.ContentTypeImpl"
-      table="PORTLET_CONTENT_TYPE"
+      class="org.apache.jetspeed.om.portlet.impl.SupportsImpl"
+      table="PORTLET_SUPPORTS"
    >
      <field-descriptor
          name="contentTypeId"
-         column="CONTENT_TYPE_ID"
+         column="SUPPORTS_ID"
          jdbc-type="BIGINT"
          primarykey="true"
          autoincrement="true"
+         access="anonymous"
       />
       <field-descriptor
          name="portletId"
          column="PORTLET_ID"
          jdbc-type="BIGINT"
-
+         access="anonymous"
       />
       <field-descriptor
-         name="contentType"
-         column="CONTENT_TYPE"
+         name="mimeType"
+         column="MIME_TYPE"
          jdbc-type="VARCHAR"
       />
       <field-descriptor
          name="portletModes"
          column="MODES"
          jdbc-type="VARCHAR"
-         
conversion="org.apache.jetspeed.util.ojb.CSVtoPortletModeFieldConversion"
+         
conversion="org.apache.jetspeed.util.ojb.CSVtoCollectionFieldConversion"
+      />
+      <field-descriptor
+         name="windowStates"
+         column="STATES"
+         jdbc-type="VARCHAR"
+         
conversion="org.apache.jetspeed.util.ojb.CSVtoCollectionFieldConversion"
       />
    </class-descriptor>
 

Modified: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FragmentPortletDefinition.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FragmentPortletDefinition.java?rev=705440&r1=705439&r2=705440&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FragmentPortletDefinition.java
 (original)
+++ 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/FragmentPortletDefinition.java
 Thu Oct 16 18:04:24 2008
@@ -27,14 +27,10 @@
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.om.preference.impl.FragmentPortletPreferenceSet;
-import org.apache.pluto.om.portlet.Language;
-import org.apache.pluto.om.portlet.LanguageSet;
 import org.apache.pluto.om.portlet.ObjectID;
 import org.apache.pluto.om.portlet.ParameterSet;
 import org.apache.pluto.om.portlet.Preference;
 import org.apache.pluto.om.portlet.PreferenceSet;
-import org.apache.pluto.om.portlet.ContentType;
-import org.apache.pluto.om.portlet.ContentTypeSet;
 import org.apache.pluto.om.portlet.Description;
 import org.apache.pluto.om.portlet.DescriptionSet;
 import org.apache.pluto.om.portlet.DisplayName;
@@ -65,16 +61,6 @@
         this.fragment = fragment;
     }
 
-    public void addContentType(ContentType cType)
-    {
-        portletDefinition.addContentType(cType);
-    }
-
-    public void addContentType(String contentType, Collection modes)
-    {
-        portletDefinition.addContentType(contentType, modes);
-    }
-
     public void addDescription(Locale locale, String description)
     {
         portletDefinition.addDescription(locale, description);
@@ -105,11 +91,6 @@
         return portletDefinition.addInitParameter(name, value);
     }
 
-    public void addLanguage(Language lang)
-    {
-        portletDefinition.addLanguage(lang);
-    }
-
     public void addLanguage(String title, String shortTitle, String keywords, 
Locale locale)
     {
         portletDefinition.addLanguage(title, shortTitle, keywords, locale);
@@ -140,11 +121,6 @@
         return portletDefinition.getPortletClass();
     }
 
-    public ContentTypeSet getContentTypeSet()
-    {
-        return portletDefinition.getContentTypeSet();
-    }
-
     public Description getDescription(Locale arg0)
     {
         return portletDefinition.getDescription(arg0);
@@ -195,11 +171,6 @@
         return portletDefinition.getInitSecurityRoleRefSet();
     }
 
-    public LanguageSet getLanguageSet()
-    {
-        return portletDefinition.getLanguageSet();
-    }
-
     public GenericMetadata getMetadata()
     {
         return portletDefinition.getMetadata();
@@ -260,11 +231,6 @@
         portletDefinition.setPortletClass(arg0);
     }
 
-    public void setContentTypeSet(ContentTypeSet contentTypes)
-    {
-        portletDefinition.setContentTypeSet(contentTypes);
-    }
-
     public void setDescriptions(DescriptionSet arg0)
     {
         portletDefinition.setDescriptions(arg0);
@@ -295,11 +261,6 @@
         portletDefinition.setInitSecurityRoleRefSet(securityRefs);
     }
 
-    public void setLanguageSet(LanguageSet languages)
-    {
-        portletDefinition.setLanguageSet(languages);
-    }
-
     public void setMetadata(GenericMetadata metadata)
     {
         portletDefinition.setMetadata(metadata);

Modified: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java?rev=705440&r1=705439&r2=705440&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
 (original)
+++ 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
 Thu Oct 16 18:04:24 2008
@@ -62,12 +62,11 @@
 import org.apache.ojb.broker.PersistenceBrokerAware;
 import org.apache.ojb.broker.PersistenceBrokerException;
 import org.apache.jetspeed.om.portlet.Language;
+import org.apache.pluto.om.ElementFactoryList;
 import org.apache.pluto.om.portlet.Parameter;
 import org.apache.pluto.om.portlet.ParameterSet;
 import org.apache.pluto.om.portlet.Preference;
 import org.apache.pluto.om.portlet.PreferenceSet;
-import org.apache.pluto.om.portlet.ContentType;
-import org.apache.pluto.om.portlet.ContentTypeSet;
 import org.apache.pluto.om.portlet.Description;
 import org.apache.pluto.om.portlet.DescriptionSet;
 import org.apache.pluto.om.portlet.DisplayName;
@@ -75,6 +74,7 @@
 import org.apache.pluto.om.portlet.PortletApplicationDefinition;
 import org.apache.pluto.om.portlet.SecurityRoleRef;
 import org.apache.pluto.om.portlet.SecurityRoleRefSet;
+import org.apache.pluto.om.portlet.Supports;
 import org.apache.pluto.om.servlet.ServletDefinition;
 
 /**
@@ -113,8 +113,7 @@
     private String resourceBundle;
     private ArrayList supportedLocales;
 
-    private Collection contentTypes;
-    private ContentTypeSetImpl ctListWrapper = new ContentTypeSetImpl();
+    private List<Supports> supports;
     protected List portletEntities;
 
     /** PortletApplicationDefinition this PortletDefinition belongs to */
@@ -336,13 +335,43 @@
         this.preferenceSet = (PreferenceSetComposite) preferences;
     }
 
-    /**
-     * @see org.apache.pluto.om.portlet.PortletDefinition#getContentTypeSet()
-     */
-    public ContentTypeSet getContentTypeSet()
+    
+    public Supports getSupports(String mimeType)
     {
-        ctListWrapper.setInnerCollection(contentTypes);
-        return ctListWrapper;
+        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 SupportsImpl.class;
+                    }
+
+                    public Supports newElement()
+                    {
+                        return new SupportsImpl();
+                    }
+                }); 
+            if (supports != null)
+            {
+                lf.addAll(supports);
+            }
+            supports = lf;
+        }
+        return (ElementFactoryList<Supports>)supports;
     }
 
     /**
@@ -412,14 +441,6 @@
     }
 
     /**
-     * @see 
org.apache.jetspeed.om.common.portlet.PortletDefinition#setContentTypeSet(org.apache.pluto.om.portlet.ContentTypeSet)
-     */
-    public void setContentTypeSet( ContentTypeSet contentTypes )
-    {
-        this.contentTypes = ((ContentTypeSetImpl) 
contentTypes).getInnerCollection();
-    }
-
-    /**
      * @see 
org.apache.jetspeed.om.common.portlet.PortletDefinition#setInitParameterSet(org.apache.pluto.om.common.ParameterSet)
      */
     public void setInitParameterSet( ParameterSet parameters )
@@ -523,27 +544,6 @@
     }
 
     /**
-     * @see 
org.apache.jetspeed.om.common.portlet.PortletDefinition#addContentType(org.apache.pluto.om.portlet.ContentType)
-     */
-    public void addContentType( ContentType cType )
-    {
-        ctListWrapper.setInnerCollection(contentTypes);
-        ctListWrapper.addContentType(cType);
-    }
-    
-    /**
-     * @see 
org.apache.jetspeed.om.portlet.PortletDefinition#addContentType(java.lang.String,
 java.lang.String[])
-     */
-    public void addContentType(String contentType, Collection modes)
-    {
-        ContentTypeImpl ct = new ContentTypeImpl();
-        ct.setContentType(contentType);
-        ct.setPortletModes(modes);
-        
-        addContentType(ct);
-    }
-
-    /**
      * @see 
org.apache.jetspeed.om.portlet.PortletDefinition#addPreference(java.lang.String,
      *      java.util.Collection)
      */

Copied: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportsImpl.java
 (from r705403, 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContentTypeImpl.java)
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportsImpl.java?p2=portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportsImpl.java&p1=portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContentTypeImpl.java&r1=705403&r2=705440&rev=705440&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/ContentTypeImpl.java
 (original)
+++ 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportsImpl.java
 Thu Oct 16 18:04:24 2008
@@ -17,69 +17,25 @@
 package org.apache.jetspeed.om.portlet.impl;
 
 import java.io.Serializable;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
+import java.util.ArrayList;
+import java.util.List;
 
-import javax.portlet.PortletMode;
-
-import org.apache.jetspeed.om.common.portlet.ContentTypeComposite;
 import org.apache.jetspeed.util.HashCodeBuilder;
-import org.apache.pluto.om.portlet.ContentType;
+import org.apache.pluto.om.portlet.Supports;
 
 /**
- * 
- * ContentTypeImpl
- * 
- * @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
  * @version $Id$
- *
  */
-public class ContentTypeImpl implements ContentTypeComposite, Serializable
+public class SupportsImpl implements Supports, Serializable
 {
-
-    private String contentType;
-    protected Collection portletModes;
-    /**
-     *  field that represents a FK relationship to the parent portlet.
-     * Required by some O/R tools like OJB.
-     */
-    protected long portletId;
-
-    protected long contentTypeId;
-
-    public ContentTypeImpl()
-    {
-        portletModes = new HashSet();
-    }
-
-    /**
-     * @see org.apache.pluto.om.portlet.ContentType#getContentType()
-     */
-    public String getContentType()
-    {
-        return contentType;
-    }
-
-    /**
-     * @see org.apache.pluto.om.portlet.ContentType#getPortletModes()
-     */
-    public Iterator getPortletModes()
-    {
-        return portletModes.iterator();
-    }
-
-    public Collection getPortletModesCollection()
+    private static final long serialVersionUID = 3053050293118297163L;
+    
+    private String mimeType;
+    protected List<String> portletModes = new ArrayList<String>();
+    protected List<String> windowStates = new ArrayList<String>();
+    
+    public SupportsImpl()
     {
-        return portletModes;
-    }
-
-    /**
-     * @see 
org.apache.pluto.om.portlet.ContentTypeCtrl#setContentType(java.lang.String)
-     */
-    public void setContentType(String contentType)
-    {
-        this.contentType = contentType;
     }
 
     /**
@@ -87,12 +43,10 @@
      */
     public boolean equals(Object obj)
     {
-        if (obj != null && obj instanceof ContentType)
+        if (obj != null && obj instanceof Supports)
         {
-            ContentType cType = (ContentType) obj;
-            return this.getContentType().equals(cType.getContentType());
+            return mimeType.equals(((Supports)obj).getMimeType());
         }
-
         return false;
     }
 
@@ -102,39 +56,27 @@
     public int hashCode()
     {
         HashCodeBuilder hasher = new HashCodeBuilder(27, 87);
-        hasher.append(contentType);
+        hasher.append(mimeType);
         return hasher.toHashCode();
     }
 
-    /* (non-Javadoc)
-     * @see 
org.apache.jetspeed.om.common.portlet.ContentTypeComposite#addPortletMode(javax.portlet.PortletMode)
-     */
-    public void addPortletMode(PortletMode mode)
+    public String getMimeType()
     {
-        portletModes.add(mode);
-
+        return mimeType;
     }
 
-    public void addPortletMode(String mode)
+    public List<String> getPortletModes()
     {
-        portletModes.add(new PortletMode(mode));
-
+        return portletModes;
     }
 
-    /**
-     * @see 
org.apache.jetspeed.om.common.portlet.ContentTypeComposite#setModes(java.util.Collection)
-     */
-    public void setPortletModes(Collection modes)
+    public List<String> getWindowStates()
     {
-        portletModes = modes;
+        return windowStates;
     }
 
-    /* (non-Javadoc)
-     * @see 
org.apache.jetspeed.om.common.portlet.ContentTypeComposite#supportsPortletMode(javax.portlet.PortletMode)
-     */
-    public boolean supportsPortletMode(PortletMode mode)
+    public void setMimeType(String mimeType)
     {
-        return portletModes.contains(mode);
+        this.mimeType = mimeType;
     }
-
 }

Propchange: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportsImpl.java
------------------------------------------------------------------------------
    cvs2svn:cvs-rev = 1.2

Propchange: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportsImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/SupportsImpl.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java?rev=705440&r1=705439&r2=705440&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
 (original)
+++ 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
 Thu Oct 16 18:04:24 2008
@@ -32,7 +32,6 @@
 import org.apache.jetspeed.om.common.JetspeedServiceReference;
 import org.apache.jetspeed.om.common.UserAttribute;
 import org.apache.jetspeed.om.common.UserAttributeRef;
-import org.apache.jetspeed.om.common.portlet.ContentTypeComposite;
 import org.apache.jetspeed.om.common.preference.PreferenceComposite;
 import org.apache.jetspeed.om.impl.DublinCoreImpl;
 import org.apache.jetspeed.om.impl.JetspeedServiceReferenceImpl;
@@ -40,7 +39,7 @@
 import org.apache.jetspeed.om.impl.UserAttributeRefImpl;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
-import org.apache.jetspeed.om.portlet.impl.ContentTypeImpl;
+import org.apache.jetspeed.om.portlet.impl.SupportsImpl;
 import org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl;
 import org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl;
 import org.apache.jetspeed.om.servlet.impl.WebApplicationDefinitionImpl;
@@ -203,9 +202,9 @@
         
portlet.addLanguage(portletRegistry.createLanguage(Locale.getDefault(), 
"Portlet 1", "Portlet 1",
                 "This is Portlet 1", null));
 
-        ContentTypeComposite html = new ContentTypeImpl();
+        ContentTypeComposite html = new SupportsImpl();
         html.setContentType("html/text");
-        ContentTypeComposite wml = new ContentTypeImpl();
+        ContentTypeComposite wml = new SupportsImpl();
         html.addPortletMode(new PortletMode(MODE_EDIT));
         html.addPortletMode(new PortletMode(MODE_VIEW));
         html.addPortletMode(new PortletMode(MODE_HELP));

Modified: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestRegistryCache.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestRegistryCache.java?rev=705440&r1=705439&r2=705440&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestRegistryCache.java
 (original)
+++ 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestRegistryCache.java
 Thu Oct 16 18:04:24 2008
@@ -29,14 +29,13 @@
 import org.apache.jetspeed.om.common.JetspeedServiceReference;
 import org.apache.jetspeed.om.common.UserAttribute;
 import org.apache.jetspeed.om.common.UserAttributeRef;
-import org.apache.jetspeed.om.common.portlet.ContentTypeComposite;
 import org.apache.jetspeed.om.common.preference.PreferenceComposite;
 import org.apache.jetspeed.om.impl.JetspeedServiceReferenceImpl;
 import org.apache.jetspeed.om.impl.UserAttributeImpl;
 import org.apache.jetspeed.om.impl.UserAttributeRefImpl;
 import org.apache.jetspeed.om.portlet.PortletApplication;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
-import org.apache.jetspeed.om.portlet.impl.ContentTypeImpl;
+import org.apache.jetspeed.om.portlet.impl.SupportsImpl;
 import org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl;
 import org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl;
 import org.apache.jetspeed.om.servlet.impl.WebApplicationDefinitionImpl;
@@ -151,9 +150,9 @@
         
portlet.addLanguage(portletRegistry.createLanguage(Locale.getDefault(), 
"Portlet 1", "Portlet 1",
                 "This is Portlet 1", null));
 
-        ContentTypeComposite html = new ContentTypeImpl();
+        ContentTypeComposite html = new SupportsImpl();
         html.setContentType("html/text");
-        ContentTypeComposite wml = new ContentTypeImpl();
+        ContentTypeComposite wml = new SupportsImpl();
         html.addPortletMode(new PortletMode("EDIT"));
         html.addPortletMode(new PortletMode("VIEW"));
         html.addPortletMode(new PortletMode("HELP"));

Modified: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java?rev=705440&r1=705439&r2=705440&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java
 (original)
+++ 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java
 Thu Oct 16 18:04:24 2008
@@ -29,14 +29,13 @@
 import org.apache.jetspeed.om.common.JetspeedServiceReference;
 import org.apache.jetspeed.om.common.UserAttribute;
 import org.apache.jetspeed.om.common.UserAttributeRef;
-import org.apache.jetspeed.om.common.portlet.ContentTypeComposite;
 import org.apache.jetspeed.om.common.preference.PreferenceComposite;
 import org.apache.jetspeed.om.impl.DublinCoreImpl;
 import org.apache.jetspeed.om.impl.JetspeedServiceReferenceImpl;
 import org.apache.jetspeed.om.impl.UserAttributeImpl;
 import org.apache.jetspeed.om.impl.UserAttributeRefImpl;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
-import org.apache.jetspeed.om.portlet.impl.ContentTypeImpl;
+import org.apache.jetspeed.om.portlet.impl.SupportsImpl;
 import org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl;
 import org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl;
 import org.apache.jetspeed.om.servlet.impl.WebApplicationDefinitionImpl;
@@ -123,9 +122,9 @@
         portlet.addLanguage(registry.createLanguage(Locale.getDefault(), 
"Portlet 1", "Portlet 1", "This is Portlet 1",
                 null));
 
-        ContentTypeComposite html = new ContentTypeImpl();
+        ContentTypeComposite html = new SupportsImpl();
         html.setContentType("html/text");
-        ContentTypeComposite wml = new ContentTypeImpl();
+        ContentTypeComposite wml = new SupportsImpl();
         html.addPortletMode(new PortletMode(MODE_EDIT));
         html.addPortletMode(new PortletMode(MODE_VIEW));
         html.addPortletMode(new PortletMode(MODE_HELP));

Modified: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java?rev=705440&r1=705439&r2=705440&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java
 (original)
+++ 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java
 Thu Oct 16 18:04:24 2008
@@ -29,14 +29,13 @@
 import org.apache.jetspeed.om.common.JetspeedServiceReference;
 import org.apache.jetspeed.om.common.UserAttribute;
 import org.apache.jetspeed.om.common.UserAttributeRef;
-import org.apache.jetspeed.om.common.portlet.ContentTypeComposite;
 import org.apache.jetspeed.om.common.preference.PreferenceComposite;
 import org.apache.jetspeed.om.impl.DublinCoreImpl;
 import org.apache.jetspeed.om.impl.JetspeedServiceReferenceImpl;
 import org.apache.jetspeed.om.impl.UserAttributeImpl;
 import org.apache.jetspeed.om.impl.UserAttributeRefImpl;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
-import org.apache.jetspeed.om.portlet.impl.ContentTypeImpl;
+import org.apache.jetspeed.om.portlet.impl.SupportsImpl;
 import org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl;
 import org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl;
 import org.apache.jetspeed.om.servlet.impl.WebApplicationDefinitionImpl;
@@ -120,9 +119,9 @@
         portlet.addLanguage(registry.createLanguage(Locale.getDefault(), 
"Portlet 1", "Portlet 1", "This is Portlet 1",
                 null));
 
-        ContentTypeComposite html = new ContentTypeImpl();
+        ContentTypeComposite html = new SupportsImpl();
         html.setContentType("html/text");
-        ContentTypeComposite wml = new ContentTypeImpl();
+        ContentTypeComposite wml = new SupportsImpl();
         html.addPortletMode(new PortletMode(MODE_EDIT));
         html.addPortletMode(new PortletMode(MODE_VIEW));
         html.addPortletMode(new PortletMode(MODE_HELP));

Modified: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletDefinition.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/portlet/PortletDefinition.java?rev=705440&r1=705439&r2=705440&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletDefinition.java
 (original)
+++ 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/PortletDefinition.java
 Thu Oct 16 18:04:24 2008
@@ -24,18 +24,11 @@
 import org.apache.jetspeed.om.common.GenericMetadata;
 import org.apache.jetspeed.om.common.ParameterComposite;
 import org.apache.jetspeed.om.common.preference.PreferenceComposite;
-import org.apache.pluto.om.portlet.DescriptionSet;
 import org.apache.jetspeed.om.portlet.Language;
-import org.apache.pluto.om.portlet.ParameterSet;
 import org.apache.pluto.om.portlet.Preference;
-import org.apache.pluto.om.portlet.PreferenceSet;
-import org.apache.pluto.om.portlet.ContentType;
-import org.apache.pluto.om.portlet.ContentTypeSet;
 import org.apache.pluto.om.portlet.DisplayName;
-import org.apache.pluto.om.portlet.DisplayNameSet;
 import org.apache.pluto.om.portlet.PortletApplicationDefinition;
 import org.apache.pluto.om.portlet.SecurityRoleRef;
-import org.apache.pluto.om.portlet.SecurityRoleRefSet;
 
 /**
  * 
@@ -57,10 +50,6 @@
     
     List<Language> getLanguages();
     
-    void addContentType(ContentType cType);
-    
-    void addContentType(String contentType, Collection modes);
-
     /**
      * The PreferenceSet is a collection user-defineable preferences
      * that this portlet can use to process its logic.
@@ -71,8 +60,6 @@
 
     void setInitParameterSet(ParameterSet parameters);
 
-    void setContentTypeSet(ContentTypeSet contentTypes);
-
     void setInitSecurityRoleRefSet(SecurityRoleRefSet securityRefs);
     
     /**

Modified: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java?rev=705440&r1=705439&r2=705440&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java
 (original)
+++ 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/container/JetspeedPortletConfig.java
 Thu Oct 16 18:04:24 2008
@@ -18,17 +18,18 @@
 
 import java.util.Enumeration;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Locale;
+import java.util.Map;
 import java.util.ResourceBundle;
 
 import javax.portlet.PortletConfig;
 import javax.portlet.PortletContext;
+import javax.xml.namespace.QName;
 
-import org.apache.pluto.om.portlet.Language;
-import org.apache.pluto.om.portlet.LanguageSet;
+import org.apache.jetspeed.om.portlet.Language;
 import org.apache.pluto.om.portlet.InitParam;
-import org.apache.pluto.om.portlet.Portlet;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
+import org.apache.jetspeed.util.JetspeedLocale;
 
 /**
  * Implements the Portlet API Portlet Config class
@@ -42,9 +43,9 @@
     // private static final Log log = 
LogFactory.getLog(JetspeedPortletConfig.class);
     
     private PortletContext portletContext;
-    private Portlet portlet;
+    private PortletDefinition portlet;
 
-    public JetspeedPortletConfig(PortletContext portletContext, Portlet 
portletEntity)
+    public JetspeedPortletConfig(PortletContext portletContext, 
PortletDefinition portletEntity)
     {
         this.portletContext = portletContext;
         this.portlet = portletEntity;
@@ -52,7 +53,7 @@
 
     public String getPortletName()
     {
-        return portlet.getName();
+        return portlet.getPortletName();
     }
 
     public PortletContext getPortletContext()
@@ -62,17 +63,12 @@
 
     public ResourceBundle getResourceBundle(Locale locale)
     {
-        portlet.getSupportedLocales()
-        LanguageSet languageSet = portletDefinition.getLanguageSet();
+        Language lang = portlet.getLanguage(locale);
         
-        Language lang = languageSet.get(locale);
-                                                                               
 
         if (lang == null)
         {
-            Locale defaultLocale = languageSet.getDefaultLocale();
-            lang = languageSet.get(defaultLocale);
+            lang = portlet.getLanguage(JetspeedLocale.getDefaultLocale());
         }
-        
         return lang.getResourceBundle();
     }
 
@@ -115,14 +111,49 @@
         };
     }
 
-    public void setPortletDefinition(Portlet pd)
+    public void setPortletDefinition(PortletDefinition pd)
     {
         this.portlet = pd;        
     }
     
     //  internal portlet config implementation
-    public Portlet getPortletDefinition()
+    public PortletDefinition getPortletDefinition()
     {
         return portlet;
     }
+
+    public Map<String, String[]> getContainerRuntimeOptions()
+    {
+        return null;
+    }
+
+    public String getDefaultNamespace()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Enumeration<QName> getProcessingEventQNames()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Enumeration<String> getPublicRenderParameterNames()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Enumeration<QName> getPublishingEventQNames()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Enumeration<Locale> getSupportedLocales()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }

Modified: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/PortletObjectProxy.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/PortletObjectProxy.java?rev=705440&r1=705439&r2=705440&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/PortletObjectProxy.java
 (original)
+++ 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/PortletObjectProxy.java
 Thu Oct 16 18:04:24 2008
@@ -20,6 +20,7 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.lang.reflect.Modifier;
+import java.util.List;
 
 import java.io.IOException;
 
@@ -33,9 +34,6 @@
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;
 
-import org.apache.pluto.om.portlet.PortletDefinition;
-import org.apache.pluto.om.portlet.ContentTypeSet;
-
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.portlet.SupportsHeaderPhase;
 import org.apache.jetspeed.util.BaseObjectProxy;
@@ -51,6 +49,7 @@
 import org.apache.jetspeed.om.servlet.WebApplicationDefinition;
 import org.apache.jetspeed.factory.PortletFactory;
 import org.apache.jetspeed.factory.PortletInstance;
+import org.apache.pluto.om.portlet.Supports;
 
 /**
  * PortletObjectProxy
@@ -98,10 +97,10 @@
     private PortletInstance customConfigModePortletInstance;
     private boolean genericPortletInvocable;
     private Method portletDoEditMethod;
-    private ContentTypeSet portletContentTypeSet;
     private boolean autoSwitchEditDefaultsModeToEditMode;
     private boolean autoSwitchConfigMode;
     private String customConfigModePortletUniqueName;
+    private List<Supports> supports;
     
     public static Object createProxy(Object proxiedObject, boolean 
autoSwitchEditDefaultsModeToEditMode, boolean autoSwitchConfigMode, String 
customConfigModePortletUniqueName)
     {
@@ -277,22 +276,30 @@
     
     private boolean isSupportingEditDefaultsMode(GenericPortlet portlet)
     {
-        if (this.portletContentTypeSet == null)
+        if (supports == null)
         {
             try
             {
                 JetspeedPortletConfig config = (JetspeedPortletConfig) 
portlet.getPortletConfig();
                 PortletDefinition portletDef = config.getPortletDefinition();
-                this.portletContentTypeSet = portletDef.getContentTypeSet();
+                this.supports = portletDef.getSupports();
             }
             catch (Exception e)
             {
             }
         }
         
-        if (this.portletContentTypeSet != null)
+        if (supports != null)
         {
-            return 
this.portletContentTypeSet.supportsPortletMode(JetspeedActions.EDIT_DEFAULTS_MODE);
+            String pm = JetspeedActions.EDIT_DEFAULTS_MODE.toString();
+            for (Supports s : supports)
+            {
+                if (s.getPortletModes().contains(pm))
+                {
+                    return true;
+                }
+            }
+            return false;
         }
         
         return false;

Modified: 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml?rev=705440&r1=705439&r2=705440&view=diff
==============================================================================
--- 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml
 (original)
+++ 
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-portal-resources/src/main/ddl-schema/registry-schema.xml
 Thu Oct 16 18:04:24 2008
@@ -106,13 +106,18 @@
     </table>
     
     <!--
-       Create Content Type Table
+       Create Supports Table
     -->
-    <table name="PORTLET_CONTENT_TYPE">
-        <column name="CONTENT_TYPE_ID" primaryKey="true" required="true" 
type="INTEGER"/>
+    <table name="PORTLET_SUPPORTS">
+        <column name="SUPPORTS_ID" primaryKey="true" required="true" 
type="INTEGER"/>
         <column name="PORTLET_ID" required="true" type="INTEGER"/>
-        <column name="CONTENT_TYPE" required="true" size="30" type="VARCHAR"/>
-        <column name="MODES" type="LONGVARCHAR"/>
+        <column name="MIME_TYPE" required="true" size="30" type="VARCHAR"/>
+        <column name="MODES" type="VARCHAR" size="255"/>
+        <column name="STATES" type="VARCHAR" size="255"/>
+        <unique name="UK_SUPPORTS">
+          <unique-column name="PORTLET_ID"/>
+          <unique-column name="MIME_TYPE"/>
+        </unique>
     </table>
     
     <!--



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to