portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r1576431 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/ components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/ components/jetspeed-page-m...
Date Tue, 11 Mar 2014 17:18:41 GMT
Author: rwatler
Date: Tue Mar 11 17:18:40 2014
New Revision: 1576431

URL: http://svn.apache.org/r1576431
Log:
JS2-874: generics API refactoring - add MenuDefinitionElement base interface

Added:
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuDefinitionElement.java
Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/BaseMenuDefinitionImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/MenuDefinitionImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/impl/StandardMenuDefinitionImpl.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuDefinition.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuExcludeDefinition.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuIncludeDefinition.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuOptionsDefinition.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuSeparatorDefinition.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/BaseMenuDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/BaseMenuDefinitionImpl.java?rev=1576431&r1=1576430&r2=1576431&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/BaseMenuDefinitionImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/BaseMenuDefinitionImpl.java
Tue Mar 11 17:18:40 2014
@@ -16,11 +16,12 @@
  */
 package org.apache.jetspeed.om.folder.impl;
 
-import java.util.List;
-
 import org.apache.jetspeed.om.folder.MenuDefinition;
+import org.apache.jetspeed.om.folder.MenuDefinitionElement;
 import org.apache.jetspeed.page.impl.DatabasePageManagerUtils;
 
+import java.util.List;
+
 /**
  * BaseMenuDefinitionImpl
  * 
@@ -221,17 +222,17 @@ public abstract class BaseMenuDefinition
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.folder.MenuDefinition#getMenuElements()
      */
-    public abstract List getMenuElements();
+    public abstract List<MenuDefinitionElement> getMenuElements();
 
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.folder.MenuDefinition#setMenuElements(java.util.List)
      */
-    public void setMenuElements(List elements)
+    public void setMenuElements(List<MenuDefinitionElement> elements)
     {
         // set menu elements by replacing
         // existing entries with new elements if
         // new collection is specified
-        List menuElements = getMenuElements();
+        List<MenuDefinitionElement> menuElements = getMenuElements();
         if (elements != menuElements)
         {
             // replace all menu elements

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionImpl.java?rev=1576431&r1=1576430&r2=1576431&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/impl/FolderMenuDefinitionImpl.java
Tue Mar 11 17:18:40 2014
@@ -16,12 +16,13 @@
  */
 package org.apache.jetspeed.om.folder.impl;
 
-import java.util.Collection;
-import java.util.List;
-
 import org.apache.jetspeed.om.folder.MenuDefinition;
+import org.apache.jetspeed.om.folder.MenuDefinitionElement;
 import org.apache.jetspeed.om.page.PageMetadataImpl;
 
+import java.util.Collection;
+import java.util.List;
+
 /**
  * FolderMenuDefinitionImpl
  * 
@@ -47,7 +48,7 @@ public class FolderMenuDefinitionImpl ex
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.folder.MenuDefinition#getMenuElements()
      */
-    public List getMenuElements()
+    public List<MenuDefinitionElement> getMenuElements()
     {
         // return mutable menu element list
         // by using list wrapper to manage

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/MenuDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/MenuDefinitionImpl.java?rev=1576431&r1=1576430&r2=1576431&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/MenuDefinitionImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/folder/psml/MenuDefinitionImpl.java
Tue Mar 11 17:18:40 2014
@@ -16,13 +16,14 @@
  */
 package org.apache.jetspeed.om.folder.psml;
 
+import org.apache.commons.lang.StringUtils;
+import org.apache.jetspeed.om.folder.MenuDefinition;
+import org.apache.jetspeed.om.folder.MenuDefinitionElement;
+
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.commons.lang.StringUtils;
-import org.apache.jetspeed.om.folder.MenuDefinition;
-
 /**
  * This class implements the MenuDefinition
  * interface in a persistent object form for use by
@@ -308,7 +309,7 @@ public class MenuDefinitionImpl extends 
      *
      * @return element list
      */
-    public List getMenuElements()
+    public List<MenuDefinitionElement> getMenuElements()
     {
         return menuElements;
     }
@@ -318,7 +319,7 @@ public class MenuDefinitionImpl extends 
      *
      * @param elements element list
      */
-    public void setMenuElements(List elements)
+    public void setMenuElements(List<MenuDefinitionElement> elements)
     {
         menuElements = elements;
     }
@@ -421,7 +422,6 @@ public class MenuDefinitionImpl extends 
         }
         else
         {
-            
             MenuDefinition definition = (MenuDefinition) obj;
             if (!StringUtils.equals(definition.getName(),name) || !StringUtils.equals(definition.getOptions(),options)
|| definition.getDepth() != depth ||
                 definition.isPaths() != paths || definition.isRegexp() != regexp || !StringUtils.equals(definition.getProfile(),profile)
||

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionImpl.java?rev=1576431&r1=1576430&r2=1576431&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionImpl.java
Tue Mar 11 17:18:40 2014
@@ -16,13 +16,14 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
-import java.util.Collection;
-import java.util.List;
-
 import org.apache.jetspeed.om.folder.MenuDefinition;
+import org.apache.jetspeed.om.folder.MenuDefinitionElement;
 import org.apache.jetspeed.om.folder.impl.BaseMenuDefinitionImpl;
 import org.apache.jetspeed.om.page.PageMetadataImpl;
 
+import java.util.Collection;
+import java.util.List;
+
 /**
  * PageMenuDefinitionImpl
  * 
@@ -48,7 +49,7 @@ public class PageMenuDefinitionImpl exte
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.folder.MenuDefinition#getMenuElements()
      */
-    public List getMenuElements()
+    public List<MenuDefinitionElement> getMenuElements()
     {
         // return mutable menu element list
         // by using list wrapper to manage

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/impl/StandardMenuDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/impl/StandardMenuDefinitionImpl.java?rev=1576431&r1=1576430&r2=1576431&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/impl/StandardMenuDefinitionImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/impl/StandardMenuDefinitionImpl.java
Tue Mar 11 17:18:40 2014
@@ -16,12 +16,13 @@
  */
 package org.apache.jetspeed.om.folder.impl;
 
-import java.util.List;
-import java.util.Locale;
-
 import org.apache.jetspeed.om.folder.MenuDefinition;
+import org.apache.jetspeed.om.folder.MenuDefinitionElement;
 import org.apache.jetspeed.om.portlet.GenericMetadata;
 
+import java.util.List;
+import java.util.Locale;
+
 /**
  * This abstract class implements the menu definition interface
  * in a default manner to allow derived classes to easily describe
@@ -73,7 +74,7 @@ public abstract class StandardMenuDefini
     /**
      * setOptions - set comma separated menu options if not specified as elements
      *
-     * @param option option paths specification
+     * @param options option paths specification
      */
     public void setOptions(String options)
     {
@@ -308,7 +309,7 @@ public abstract class StandardMenuDefini
      *
      * @return element list
      */
-    public List getMenuElements()
+    public List<MenuDefinitionElement> getMenuElements()
     {
         return null;
     }
@@ -318,7 +319,7 @@ public abstract class StandardMenuDefini
      *
      * @param elements element list
      */
-    public void setMenuElements(List elements)
+    public void setMenuElements(List<MenuDefinitionElement> elements)
     {
         throw new RuntimeException("StandardMenuDefinitionImpl instance immutable");
     }

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuDefinition.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuDefinition.java?rev=1576431&r1=1576430&r2=1576431&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuDefinition.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuDefinition.java
Tue Mar 11 17:18:40 2014
@@ -18,7 +18,6 @@ package org.apache.jetspeed.om.folder;
 
 import org.apache.jetspeed.om.portlet.GenericMetadata;
 
-import java.io.Serializable;
 import java.util.List;
 import java.util.Locale;
 
@@ -30,7 +29,7 @@ import java.util.Locale;
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-public interface MenuDefinition extends Serializable
+public interface MenuDefinition extends MenuDefinitionElement
 {
     /**
      * ANY_PROFILE_LOCATOR - wildcard value for profile locator names
@@ -207,12 +206,12 @@ public interface MenuDefinition extends 
      *
      * @return element list
      */
-    List getMenuElements();
+    List<MenuDefinitionElement> getMenuElements();
 
     /**
      * setMenuElements - set ordered list of menu options
      *
      * @param elements element list
      */
-    void setMenuElements(List elements);
+    void setMenuElements(List<MenuDefinitionElement> elements);
 }

Added: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuDefinitionElement.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuDefinitionElement.java?rev=1576431&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuDefinitionElement.java
(added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuDefinitionElement.java
Tue Mar 11 17:18:40 2014
@@ -0,0 +1,13 @@
+package org.apache.jetspeed.om.folder;
+
+import java.io.Serializable;
+
+/**
+ * This marker interface identifies interfaces and objects used
+ * to define portal site menus.
+ *
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id$
+ */
+public interface MenuDefinitionElement extends Serializable {
+}

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuExcludeDefinition.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuExcludeDefinition.java?rev=1576431&r1=1576430&r2=1576431&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuExcludeDefinition.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuExcludeDefinition.java
Tue Mar 11 17:18:40 2014
@@ -16,8 +16,6 @@
  */
 package org.apache.jetspeed.om.folder;
 
-import java.io.Serializable;
-
 /**
  * This interface describes the object used to define
  * portal site menu excluded menu options.
@@ -25,7 +23,7 @@ import java.io.Serializable;
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-public interface MenuExcludeDefinition extends Serializable
+public interface MenuExcludeDefinition extends MenuDefinitionElement
 {
     /**
      * getName - get menu name with options to exclude

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuIncludeDefinition.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuIncludeDefinition.java?rev=1576431&r1=1576430&r2=1576431&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuIncludeDefinition.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuIncludeDefinition.java
Tue Mar 11 17:18:40 2014
@@ -16,8 +16,6 @@
  */
 package org.apache.jetspeed.om.folder;
 
-import java.io.Serializable;
-
 /**
  * This interface describes the object used to define
  * portal site menu included menus.
@@ -25,7 +23,7 @@ import java.io.Serializable;
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-public interface MenuIncludeDefinition extends Serializable
+public interface MenuIncludeDefinition extends MenuDefinitionElement
 {
     /**
      * getName - get menu name to nest or with options to include

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuOptionsDefinition.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuOptionsDefinition.java?rev=1576431&r1=1576430&r2=1576431&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuOptionsDefinition.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuOptionsDefinition.java
Tue Mar 11 17:18:40 2014
@@ -16,8 +16,6 @@
  */
 package org.apache.jetspeed.om.folder;
 
-import java.io.Serializable;
-
 /**
  * This interface describes the object used to define
  * portal site menu options.
@@ -25,7 +23,7 @@ import java.io.Serializable;
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-public interface MenuOptionsDefinition extends Serializable
+public interface MenuOptionsDefinition extends MenuDefinitionElement
 {
     /**
      * ANY_PROFILE_LOCATOR - wildcard value for profile locator names

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuSeparatorDefinition.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuSeparatorDefinition.java?rev=1576431&r1=1576430&r2=1576431&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuSeparatorDefinition.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/folder/MenuSeparatorDefinition.java
Tue Mar 11 17:18:40 2014
@@ -16,11 +16,10 @@
  */
 package org.apache.jetspeed.om.folder;
 
-import java.io.Serializable;
-import java.util.Locale;
-
 import org.apache.jetspeed.om.portlet.GenericMetadata;
 
+import java.util.Locale;
+
 /**
  * This interface describes the object used to define
  * portal site menu separators.
@@ -28,7 +27,7 @@ import org.apache.jetspeed.om.portlet.Ge
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-public interface MenuSeparatorDefinition extends Serializable
+public interface MenuSeparatorDefinition extends MenuDefinitionElement
 {
     /**
      * getSkin - get skin name for separator



---------------------------------------------------------------------
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