portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r707491 - in /portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade: components/jetspeed-search/src/main/java/org/apache/jetspeed/search/handlers/pam/ jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/
Date Thu, 23 Oct 2008 22:49:37 GMT
Author: ate
Date: Thu Oct 23 15:49:37 2008
New Revision: 707491

URL: http://svn.apache.org/viewvc?rev=707491&view=rev
Log:
JS2-871 - Upgrade Pluto container to version 2.0
See:  http://issues.apache.org/jira/browse/JS2-871
- realignment of jetspeed-search component API usage

Modified:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/handlers/pam/PortletDefinitionHandler.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/Language.java

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/handlers/pam/PortletDefinitionHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/handlers/pam/PortletDefinitionHandler.java?rev=707491&r1=707490&r2=707491&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/handlers/pam/PortletDefinitionHandler.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-search/src/main/java/org/apache/jetspeed/search/handlers/pam/PortletDefinitionHandler.java
Thu Oct 23 15:49:37 2008
@@ -28,9 +28,9 @@
 import org.apache.jetspeed.search.BaseParsedObject;
 import org.apache.jetspeed.search.ParsedObject;
 import org.apache.jetspeed.util.JetspeedLocale;
-import org.apache.pluto.om.portlet.Language;
-import org.apache.pluto.om.portlet.Description;
-import org.apache.pluto.om.portlet.DisplayName;
+import org.apache.jetspeed.om.portlet.Language;
+import org.apache.jetspeed.om.portlet.Description;
+import org.apache.jetspeed.om.portlet.DisplayName;
 
 /**
  * @author <a href="mailto: jford@apache.org">Jeremy Ford</a>
@@ -72,7 +72,7 @@
             MultiHashMap fieldMap = new MultiHashMap();
             fieldMap.put(ID, pd.getPortletName());
             
-            PortletApplication pa = (PortletApplication)pd.getPortletApplicationDefinition();
+            PortletApplication pa = (PortletApplication)pd.getApplication();
             fieldMap.put(PORTLET_APPLICATION, pa.getName()); 
             
             Collection mdFields = pd.getMetadata().getFields();
@@ -83,38 +83,26 @@
             }
             
             //Handle descriptions
-            Iterator descIter = pd.getDescriptionSet().iterator();
-            while (descIter.hasNext())
+            for (Description d : pd.getDescriptions())
             {
-                Description desc = (Description) descIter.next();
-                fieldMap.put(ParsedObject.FIELDNAME_DESCRIPTION, desc.getDescription());
+                fieldMap.put(ParsedObject.FIELDNAME_DESCRIPTION, d.getDescription());
             }
             
             //Handle keywords and titles
-            Iterator displayNameIter = pd.getDisplayNameSet().iterator();
-            while (displayNameIter.hasNext())
+            for (DisplayName d : pd.getDisplayNames())
             {
-                DisplayName displayName = (DisplayName) displayNameIter.next();
-                fieldMap.put(ParsedObject.FIELDNAME_TITLE, displayName.getDisplayName());
+                fieldMap.put(ParsedObject.FIELDNAME_TITLE, d.getDisplayName());
             }
             
             HashSet keywordSet = new HashSet();
             
-            Iterator langIter = pd.getLanguageSet().iterator();
-            while (langIter.hasNext())
+            for (Language lang : pd.getLanguages())
             {
-                Language lang = (Language) langIter.next();
                 fieldMap.put(ParsedObject.FIELDNAME_TITLE, lang.getTitle());
                 fieldMap.put(ParsedObject.FIELDNAME_TITLE, lang.getShortTitle());
-                
-                Iterator keywordIter = lang.getKeywords();
-                if (keywordIter != null)
+                for (String keyword : lang.getKeywordList())
                 {
-                    while (keywordIter.hasNext())
-                    {
-                        String keyword = (String) keywordIter.next();
-                        keywordSet.add(keyword);
-                    }
+                    keywordSet.add(keyword);
                 }
             }
             

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/Language.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/Language.java?rev=707491&r1=707490&r2=707491&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/Language.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/Language.java
Thu Oct 23 15:49:37 2008
@@ -29,6 +29,7 @@
 public interface Language extends PortletInfo, Serializable
 {
     Locale getLocale();
-    void setKeywords(List<String> keywords);
+    List<String> getKeywordList();
+    void addKeyword(String keyword);
     ResourceBundle getResourceBundle();
 }



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


Mime
View raw message