portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r1577887 [2/5] - 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-...
Date Sat, 15 Mar 2014 15:59:19 GMT
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BaseFragmentElementImpl.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/BaseFragmentElementImpl.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BaseFragmentElementImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BaseFragmentElementImpl.java Sat Mar 15 15:59:17 2014
@@ -54,7 +54,7 @@ public abstract class BaseFragmentElemen
     private float layoutZProperty = -1.0F;
     private float layoutWidthProperty = -1.0F;
     private float layoutHeightProperty = -1.0F;
-    private List preferences;
+    private List<FragmentPreferenceImpl> preferences;
 
     private FragmentPropertyList fragmentProperties;
     private FragmentPreferenceList fragmentPreferences;
@@ -72,7 +72,7 @@ public abstract class BaseFragmentElemen
      *
      * @return persistent collection
      */
-    List accessPreferences()
+    List<FragmentPreferenceImpl> accessPreferences()
     {
         // create initial collection if necessary
         if (preferences == null)
@@ -135,16 +135,13 @@ public abstract class BaseFragmentElemen
      * @param name fragment name to retrieve.
      * @return list of matched fragments
      */
-    List getFragmentsByName(String name)
+    List<BaseFragmentElement> getFragmentsByName(String name)
     {
-        List matchedFragments = null;
+        List<BaseFragmentElement> matchedFragments = null;
         // check for match
         if ((getName() != null) && getName().equals(name))
         {
-            if (matchedFragments == null)
-            {
-                matchedFragments = new ArrayList();
-            }
+            matchedFragments = new ArrayList<BaseFragmentElement>();
             matchedFragments.add(this);
         }
         return matchedFragments;
@@ -159,16 +156,13 @@ public abstract class BaseFragmentElemen
      * @param interfaceFilter fragment interface to retrieve or null for all.
      * @return list of matched fragments
      */
-    List getFragmentsByInterface(Class interfaceFilter)
+    List<BaseFragmentElement> getFragmentsByInterface(Class interfaceFilter)
     {
-        List matchedFragments = null;
+        List<BaseFragmentElement> matchedFragments = null;
         // check for match
         if ((interfaceFilter == null) || interfaceFilter.isInstance(this))
         {
-            if (matchedFragments == null)
-            {
-                matchedFragments = new ArrayList();
-            }
+            matchedFragments = new ArrayList<BaseFragmentElement>();
             matchedFragments.add(this);
         }
         return matchedFragments;
@@ -807,7 +801,7 @@ public abstract class BaseFragmentElemen
         List<FragmentProperty> fragmentProperties = getProperties();
         if (properties != fragmentProperties)
         {
-            // replace all preferences
+            // replace all properties
             fragmentProperties.clear();
             if (properties != null)
             {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BaseFragmentsElementImpl.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/BaseFragmentsElementImpl.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BaseFragmentsElementImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BaseFragmentsElementImpl.java Sat Mar 15 15:59:17 2014
@@ -21,6 +21,7 @@ import org.apache.jetspeed.om.page.BaseF
 import org.apache.jetspeed.om.page.BaseFragmentValidationListener;
 import org.apache.jetspeed.om.page.BaseFragmentsElement;
 import org.apache.jetspeed.om.page.PageMetadataImpl;
+import org.apache.jetspeed.om.portlet.LocalizedField;
 import org.apache.jetspeed.page.document.impl.DocumentImpl;
 import org.apache.jetspeed.page.impl.DatabasePageManagerUtils;
 
@@ -37,7 +38,7 @@ import java.util.List;
 public abstract class BaseFragmentsElementImpl extends DocumentImpl implements BaseFragmentsElement
 {
     private String ojbConcreteClass = getClass().getName();
-    private Collection fragment;
+    private Collection<BaseFragmentElement> fragment;
 
     /**
      * Default constructor to specify security constraints
@@ -50,7 +51,7 @@ public abstract class BaseFragmentsEleme
     /* (non-Javadoc)
      * @see org.apache.jetspeed.page.document.impl.NodeImpl#newPageMetadata(java.util.Collection)
      */
-    public PageMetadataImpl newPageMetadata(Collection fields)
+    public PageMetadataImpl newPageMetadata(Collection<LocalizedField> fields)
     {
         PageMetadataImpl pageMetadata = new PageMetadataImpl(PageMetadataLocalizedFieldImpl.class);
         pageMetadata.setFields(fields);
@@ -179,7 +180,7 @@ public abstract class BaseFragmentsEleme
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.page.Page#getFragmentsByName(java.lang.String)
      */
-    public List getFragmentsByName(String name)
+    public List<BaseFragmentElement> getFragmentsByName(String name)
     {
         // get fragments by name and filter by access
         BaseFragmentElementImpl rootFragment = (BaseFragmentElementImpl)getRootFragment();

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BasePageElementImpl.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/BasePageElementImpl.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BasePageElementImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BasePageElementImpl.java Sat Mar 15 15:59:17 2014
@@ -38,7 +38,7 @@ public abstract class BasePageElementImp
     private String skin;
     private String defaultLayoutDecorator;
     private String defaultPortletDecorator;
-    private List menus;
+    private List<PageMenuDefinitionImpl> menus;
 
     private PageMenuDefinitionList menuDefinitions;
 
@@ -49,7 +49,7 @@ public abstract class BasePageElementImp
      *
      * @return persistent collection
      */
-    List accessMenus()
+    List<PageMenuDefinitionImpl> accessMenus()
     {
         // create initial collection if necessary
         if (menus == null)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FilteredFragmentList.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/FilteredFragmentList.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FilteredFragmentList.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FilteredFragmentList.java Sat Mar 15 15:59:17 2014
@@ -16,6 +16,8 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
+import org.apache.jetspeed.om.page.BaseFragmentElement;
+
 import java.util.AbstractList;
 import java.util.List;
 import java.util.ListIterator;
@@ -26,12 +28,12 @@ import java.util.ListIterator;
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-class FilteredFragmentList extends AbstractList
+class FilteredFragmentList extends AbstractList<BaseFragmentElement>
 {
     private FragmentImpl fragment;
-    private List filteredList;
+    private List<BaseFragmentElement> filteredList;
 
-    FilteredFragmentList(FragmentImpl fragment, List filteredList)
+    FilteredFragmentList(FragmentImpl fragment, List<BaseFragmentElement> filteredList)
     {
         super();
         this.fragment = fragment;
@@ -41,23 +43,23 @@ class FilteredFragmentList extends Abstr
     /* (non-Javadoc)
      * @see java.util.List#add(int,java.lang.Object)
      */
-    public void add(int index, Object element)
+    public void add(int index, BaseFragmentElement element)
     {
         // implement for modifiable AbstractList
         filteredList.add(index, element);
         // add object to persistent list
-        fragment.accessFragments().add(element);
+        fragment.accessFragments().add((BaseFragmentElementImpl)element);
         // maintain base fragments implementation reference
-        if ((fragment.getBaseFragmentsElement() != null) && (element instanceof FragmentImpl))
+        if (fragment.getBaseFragmentsElement() != null)
         {
-            ((FragmentImpl)element).setBaseFragmentsElement(fragment.getBaseFragmentsElement());
+            ((BaseFragmentElementImpl)element).setBaseFragmentsElement(fragment.getBaseFragmentsElement());
         }
     }
 
     /* (non-Javadoc)
      * @see java.util.List#get(int)
      */
-    public Object get(int index)
+    public BaseFragmentElement get(int index)
     {
         // implement for modifiable AbstractList
         return filteredList.get(index);
@@ -66,14 +68,14 @@ class FilteredFragmentList extends Abstr
     /* (non-Javadoc)
      * @see java.util.List#remove(int)
      */
-    public Object remove(int index)
+    public BaseFragmentElement remove(int index)
     {
         // implement for modifiable AbstractList
-        Object o = filteredList.remove(index);
+        BaseFragmentElement o = filteredList.remove(index);
         // remove removed object from persistent list
         if (o != null)
         {
-            ListIterator iter = fragment.accessFragments().listIterator();
+            ListIterator<BaseFragmentElementImpl> iter = fragment.accessFragments().listIterator();
             while (iter.hasNext())
             {
                 if (iter.next() == o)
@@ -89,27 +91,27 @@ class FilteredFragmentList extends Abstr
     /* (non-Javadoc)
      * @see java.util.List#set(int,java.lang.Object)
      */
-    public Object set(int index, Object element)
+    public BaseFragmentElement set(int index, BaseFragmentElement element)
     {
         // implement for modifiable AbstractList
-        Object o = filteredList.set(index, element);
+        BaseFragmentElement o = filteredList.set(index, element);
         // replace replaced object in persistent list
         if (o != null)
         {
-            ListIterator iter = fragment.accessFragments().listIterator();
+            ListIterator<BaseFragmentElementImpl> iter = fragment.accessFragments().listIterator();
             while (iter.hasNext())
             {
                 if (iter.next() == o)
                 {
-                    iter.set(element);
+                    iter.set((BaseFragmentElementImpl)element);
                     break;
                 }
             }
         }
         // maintain base fragments implementation reference
-        if ((fragment.getBaseFragmentsElement() != null) && (element instanceof FragmentImpl))
+        if (fragment.getBaseFragmentsElement() != null)
         {
-            ((FragmentImpl)element).setBaseFragmentsElement(fragment.getBaseFragmentsElement());
+            ((BaseFragmentElementImpl)element).setBaseFragmentsElement(fragment.getBaseFragmentsElement());
         }
         return o;
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentImpl.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/FragmentImpl.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentImpl.java Sat Mar 15 15:59:17 2014
@@ -35,7 +35,7 @@ import java.util.List;
  */
 public class FragmentImpl extends BaseFragmentElementImpl implements Fragment
 {
-    private List fragments;
+    private List<BaseFragmentElementImpl> fragments;
     private String type;
 
     private FragmentList fragmentsList;
@@ -47,7 +47,7 @@ public class FragmentImpl extends BaseFr
      *
      * @return persistent collection
      */
-    List accessFragments()
+    List<BaseFragmentElementImpl> accessFragments()
     {
         // create initial collection if necessary
         if (fragments == null)
@@ -148,17 +148,17 @@ public class FragmentImpl extends BaseFr
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.page.impl.BaseFragmentElementImpl#getFragmentsByName(java.lang.String)
      */
-    List getFragmentsByName(String name)
+    List<BaseFragmentElement> getFragmentsByName(String name)
     {
         // check for match
-        List matchedFragments = super.getFragmentsByName(name);
+        List<BaseFragmentElement> matchedFragments = super.getFragmentsByName(name);
         // match named children
         if (fragments != null)
         {
             Iterator fragmentsIter = fragments.iterator();
             while (fragmentsIter.hasNext())
             {
-                List matchedChildFragments = ((BaseFragmentElementImpl)fragmentsIter.next()).getFragmentsByName(name);
+                List<BaseFragmentElement> matchedChildFragments = ((BaseFragmentElementImpl)fragmentsIter.next()).getFragmentsByName(name);
                 if (matchedChildFragments != null)
                 {
                     if (matchedFragments == null)
@@ -178,17 +178,17 @@ public class FragmentImpl extends BaseFr
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.page.impl.BaseFragmentElementImpl#getFragmentsByInterface(java.lang.Class)
      */
-    List getFragmentsByInterface(Class interfaceFilter)
+    List<BaseFragmentElement> getFragmentsByInterface(Class interfaceFilter)
     {
         // check for match
-        List matchedFragments = super.getFragmentsByInterface(interfaceFilter);
+        List<BaseFragmentElement> matchedFragments = super.getFragmentsByInterface(interfaceFilter);
         // match children
         if (fragments != null)
         {
             Iterator fragmentsIter = fragments.iterator();
             while (fragmentsIter.hasNext())
             {
-                List matchedChildFragments = ((BaseFragmentElementImpl)fragmentsIter.next()).getFragmentsByInterface(interfaceFilter);
+                List<BaseFragmentElement> matchedChildFragments = ((BaseFragmentElementImpl)fragmentsIter.next()).getFragmentsByInterface(interfaceFilter);
                 if (matchedChildFragments != null)
                 {
                     if (matchedFragments == null)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentList.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/FragmentList.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentList.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentList.java Sat Mar 15 15:59:17 2014
@@ -16,6 +16,8 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
+import org.apache.jetspeed.om.page.BaseFragmentElement;
+
 import java.util.AbstractList;
 
 /**
@@ -24,7 +26,7 @@ import java.util.AbstractList;
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-class FragmentList extends AbstractList
+class FragmentList extends AbstractList<BaseFragmentElement>
 {
     private FragmentImpl fragment;
 
@@ -37,12 +39,12 @@ class FragmentList extends AbstractList
     /* (non-Javadoc)
      * @see java.util.List#add(int,java.lang.Object)
      */
-    public void add(int index, Object element)
+    public void add(int index, BaseFragmentElement element)
     {
         // implement for modifiable AbstractList:
         // add and maintain page implementation reference
-        fragment.accessFragments().add(index, element);
-        if ((fragment.getBaseFragmentsElement() != null) && (element instanceof BaseFragmentElementImpl))
+        fragment.accessFragments().add(index, (BaseFragmentElementImpl)element);
+        if (fragment.getBaseFragmentsElement() != null)
         {
             ((BaseFragmentElementImpl)element).setBaseFragmentsElement(fragment.getBaseFragmentsElement());
         }
@@ -51,7 +53,7 @@ class FragmentList extends AbstractList
     /* (non-Javadoc)
      * @see java.util.List#get(int)
      */
-    public Object get(int index)
+    public BaseFragmentElement get(int index)
     {
         // implement for modifiable AbstractList
         return fragment.accessFragments().get(index);
@@ -60,7 +62,7 @@ class FragmentList extends AbstractList
     /* (non-Javadoc)
      * @see java.util.List#remove(int)
      */
-    public Object remove(int index)
+    public BaseFragmentElement remove(int index)
     {
         // implement for modifiable AbstractList
         return fragment.accessFragments().remove(index);
@@ -69,12 +71,12 @@ class FragmentList extends AbstractList
     /* (non-Javadoc)
      * @see java.util.List#set(int,java.lang.Object)
      */
-    public Object set(int index, Object element)
+    public BaseFragmentElement set(int index, BaseFragmentElement element)
     {
         // implement for modifiable AbstractList:
         // set and maintain page implementation reference
-        Object o = fragment.accessFragments().set(index, element);
-        if ((fragment.getBaseFragmentsElement() != null) && (element instanceof BaseFragmentElementImpl))
+        BaseFragmentElementImpl o = fragment.accessFragments().set(index, (BaseFragmentElementImpl)element);
+        if (fragment.getBaseFragmentsElement() != null)
         {
             ((BaseFragmentElementImpl)element).setBaseFragmentsElement(fragment.getBaseFragmentsElement());
         }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceImpl.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/FragmentPreferenceImpl.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceImpl.java Sat Mar 15 15:59:17 2014
@@ -32,7 +32,7 @@ public class FragmentPreferenceImpl impl
     private int id;
     private String name;
     private boolean readOnly;
-    private List values;
+    private List<FragmentPreferenceValue> values;
 
     private FragmentPreferenceValueList preferenceValues;
 
@@ -43,7 +43,7 @@ public class FragmentPreferenceImpl impl
      *
      * @return persistent collection
      */
-    List accessValues()
+    List<FragmentPreferenceValue> accessValues()
     {
         // create initial collection if necessary
         if (values == null)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceList.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/FragmentPreferenceList.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceList.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceList.java Sat Mar 15 15:59:17 2014
@@ -16,9 +16,12 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
+import org.apache.jetspeed.om.preference.FragmentPreference;
+
 import java.util.AbstractList;
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
-import org.apache.jetspeed.page.impl.DatabasePageManagerUtils;
 
 /**
  * FragmentPreferenceList
@@ -26,11 +29,11 @@ import org.apache.jetspeed.page.impl.Dat
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-class FragmentPreferenceList extends AbstractList
+class FragmentPreferenceList extends AbstractList<FragmentPreference>
 {
     private BaseFragmentElementImpl fragment;
 
-    private List removedPreferences;
+    private List<FragmentPreference> removedPreferences;
 
     FragmentPreferenceList(BaseFragmentElementImpl fragment)
     {
@@ -46,7 +49,7 @@ class FragmentPreferenceList extends Abs
      * @param preference preference to add
      * @return list element to add
      */
-    private FragmentPreferenceImpl validatePreferenceForAdd(FragmentPreferenceImpl preference)
+    private FragmentPreferenceImpl validatePreferenceForAdd(FragmentPreference preference)
     {
         // only non-null definitions supported
         if (preference == null)
@@ -66,14 +69,14 @@ class FragmentPreferenceList extends Abs
             int removedIndex = removedPreferences.indexOf(preference);
             if (removedIndex >= 0)
             {
-                FragmentPreferenceImpl addPreference = preference;
-                preference = (FragmentPreferenceImpl)removedPreferences.remove(removedIndex);
+                FragmentPreference addPreference = preference;
+                preference = removedPreferences.remove(removedIndex);
                 // TODO: move this logic to copy methods on implementations
                 preference.setReadOnly(addPreference.isReadOnly());
                 preference.setValueList(addPreference.getValueList());
             }
         }
-        return preference;
+        return (FragmentPreferenceImpl)preference;
     }
 
     /**
@@ -81,11 +84,11 @@ class FragmentPreferenceList extends Abs
      *
      * @return removed preferences tracking collection
      */
-    private List getRemovedPreferences()
+    private List<FragmentPreference> getRemovedPreferences()
     {
         if (removedPreferences == null)
         {
-            removedPreferences = DatabasePageManagerUtils.createList();
+            removedPreferences = Collections.synchronizedList(new ArrayList<FragmentPreference>());
         }
         return removedPreferences;
     }
@@ -93,7 +96,7 @@ class FragmentPreferenceList extends Abs
     /* (non-Javadoc)
      * @see java.util.List#add(int,java.lang.Object)
      */
-    public void add(int index, Object element)
+    public void add(int index, FragmentPreference element)
     {
         // implement for modifiable AbstractList:
         // validate index
@@ -102,7 +105,7 @@ class FragmentPreferenceList extends Abs
             throw new IndexOutOfBoundsException("Unable to add to list at index: " + index);
         }
         // verify preference
-        FragmentPreferenceImpl preference = validatePreferenceForAdd((FragmentPreferenceImpl)element);
+        FragmentPreferenceImpl preference = validatePreferenceForAdd(element);
         // add to underlying ordered list
         fragment.accessPreferences().add(index, preference);
     }
@@ -110,7 +113,7 @@ class FragmentPreferenceList extends Abs
     /* (non-Javadoc)
      * @see java.util.List#get(int)
      */
-    public Object get(int index)
+    public FragmentPreference get(int index)
     {
         // implement for modifiable AbstractList
         return fragment.accessPreferences().get(index);
@@ -119,11 +122,11 @@ class FragmentPreferenceList extends Abs
     /* (non-Javadoc)
      * @see java.util.List#remove(int)
      */
-    public Object remove(int index)
+    public FragmentPreference remove(int index)
     {
         // implement for modifiable AbstractList:
         // save removed element 
-        FragmentPreferenceImpl removed = (FragmentPreferenceImpl)fragment.accessPreferences().remove(index);
+        FragmentPreference removed = fragment.accessPreferences().remove(index);
         if (removed != null)
         {
             getRemovedPreferences().add(removed);
@@ -134,13 +137,13 @@ class FragmentPreferenceList extends Abs
     /* (non-Javadoc)
      * @see java.util.List#set(int,java.lang.Object)
      */
-    public Object set(int index, Object element)
+    public FragmentPreference set(int index, FragmentPreference element)
     {
         // implement for modifiable AbstractList:
         // verify preference
-        FragmentPreferenceImpl newPreference = validatePreferenceForAdd((FragmentPreferenceImpl)element);
+        FragmentPreferenceImpl newPreference = validatePreferenceForAdd(element);
         // set in underlying ordered list
-        FragmentPreferenceImpl preference = (FragmentPreferenceImpl)fragment.accessPreferences().set(index, newPreference);
+        FragmentPreferenceImpl preference = fragment.accessPreferences().set(index, newPreference);
         // save replaced element
         getRemovedPreferences().add(preference);
         // return constraints ref

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceValueList.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/FragmentPreferenceValueList.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceValueList.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPreferenceValueList.java Sat Mar 15 15:59:17 2014
@@ -24,7 +24,7 @@ import java.util.AbstractList;
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-class FragmentPreferenceValueList extends AbstractList
+class FragmentPreferenceValueList extends AbstractList<String>
 {
     private FragmentPreferenceImpl preference;
 
@@ -59,7 +59,7 @@ class FragmentPreferenceValueList extend
     /* (non-Javadoc)
      * @see java.util.List#add(int,java.lang.Object)
      */
-    public void add(int index, Object element)
+    public void add(int index, String element)
     {
         // implement for modifiable AbstractList:
         // validate index
@@ -68,13 +68,13 @@ class FragmentPreferenceValueList extend
             throw new IndexOutOfBoundsException("Unable to add to list at index: " + index);
         }
         // wrap and verify preference value string
-        FragmentPreferenceValue preferenceValue = wrapValueStringForAdd((String)element);
+        FragmentPreferenceValue preferenceValue = wrapValueStringForAdd(element);
         // add to underlying ordered list
         preference.accessValues().add(index, preferenceValue);
         // set value order in added element
         if (index > 0)
         {
-            preferenceValue.setValueOrder(((FragmentPreferenceValue)preference.accessValues().get(index-1)).getValueOrder() + 1);
+            preferenceValue.setValueOrder(preference.accessValues().get(index-1).getValueOrder() + 1);
         }
         else
         {
@@ -83,7 +83,7 @@ class FragmentPreferenceValueList extend
         // maintain value order in subsequent elements
         for (int i = index, limit = preference.accessValues().size() - 1; (i < limit); i++)
         {
-            FragmentPreferenceValue nextPreferenceValue = (FragmentPreferenceValue)preference.accessValues().get(i + 1);
+            FragmentPreferenceValue nextPreferenceValue = preference.accessValues().get(i + 1);
             if (nextPreferenceValue.getValueOrder() <= preferenceValue.getValueOrder())
             {
                 // adjust value order for next element
@@ -101,32 +101,32 @@ class FragmentPreferenceValueList extend
     /* (non-Javadoc)
      * @see java.util.List#get(int)
      */
-    public Object get(int index)
+    public String get(int index)
     {
         // implement for modifiable AbstractList:
         // unwrap preference value string
-        return ((FragmentPreferenceValue)preference.accessValues().get(index)).getValue();
+        return preference.accessValues().get(index).getValue();
     }
 
     /* (non-Javadoc)
      * @see java.util.List#remove(int)
      */
-    public Object remove(int index)
+    public String remove(int index)
     {
         // implement for modifiable AbstractList
-        return preference.accessValues().remove(index);
+        return preference.accessValues().remove(index).getValue();
     }
 
     /* (non-Javadoc)
      * @see java.util.List#set(int,java.lang.Object)
      */
-    public Object set(int index, Object element)
+    public String set(int index, String element)
     {
         // implement for modifiable AbstractList:
         // wrap and verify preference value string
-        FragmentPreferenceValue newPreferenceValue = wrapValueStringForAdd((String)element);
+        FragmentPreferenceValue newPreferenceValue = wrapValueStringForAdd(element);
         // set in underlying ordered list
-        FragmentPreferenceValue preferenceValue = (FragmentPreferenceValue)preference.accessValues().set(index, newPreferenceValue);
+        FragmentPreferenceValue preferenceValue = preference.accessValues().set(index, newPreferenceValue);
         // set value order in new element
         newPreferenceValue.setValueOrder(preferenceValue.getValueOrder());
         // return unwrapped preference value string

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPropertyListImpl.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/FragmentPropertyListImpl.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPropertyListImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/FragmentPropertyListImpl.java Sat Mar 15 15:59:17 2014
@@ -16,32 +16,33 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
+import org.apache.jetspeed.om.page.BaseFragmentElement;
+import org.apache.jetspeed.om.page.FragmentProperty;
+import org.apache.jetspeed.page.FragmentPropertyList;
+
 import java.util.AbstractList;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.jetspeed.om.page.BaseFragmentElement;
-import org.apache.jetspeed.om.page.FragmentProperty;
-import org.apache.jetspeed.page.FragmentPropertyList;
-
 /**
  * FragmentPropertyList
  *
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-public class FragmentPropertyListImpl extends AbstractList implements FragmentPropertyList
+public class FragmentPropertyListImpl extends AbstractList<FragmentProperty> implements FragmentPropertyList
 {
     private BaseFragmentElementImpl fragment;
 
-    private List properties;
-    private List removedProperties;
+    private List<FragmentProperty> properties;
+    private List<FragmentProperty> removedProperties;
 
     public FragmentPropertyListImpl(BaseFragmentElementImpl fragment)
     {
         super();
-        this.properties = new ArrayList();
+        this.properties = Collections.synchronizedList(new ArrayList<FragmentProperty>());
         this.fragment = fragment;
     }
 
@@ -51,7 +52,7 @@ public class FragmentPropertyListImpl ex
     /* (non-Javadoc)
 	 * @see org.apache.jetspeed.om.page.impl.FragmentPropertyList#add(int, java.lang.Object)
 	 */
-    public synchronized void add(int index, Object element)
+    public synchronized void add(int index, FragmentProperty element)
     {
         // implement for modifiable AbstractList:
         FragmentPropertyImpl add = (FragmentPropertyImpl)element;
@@ -81,7 +82,7 @@ public class FragmentPropertyListImpl ex
     /* (non-Javadoc)
 	 * @see org.apache.jetspeed.om.page.impl.FragmentPropertyList#get(int)
 	 */
-    public synchronized Object get(int index)
+    public synchronized FragmentProperty get(int index)
     {
         // implement for modifiable AbstractList
         return properties.get(index);
@@ -93,7 +94,7 @@ public class FragmentPropertyListImpl ex
     /* (non-Javadoc)
 	 * @see org.apache.jetspeed.om.page.impl.FragmentPropertyList#remove(int)
 	 */
-    public synchronized Object remove(int index)
+    public synchronized FragmentProperty remove(int index)
     {
         // implement for modifiable AbstractList:
         // save removed element 
@@ -107,7 +108,7 @@ public class FragmentPropertyListImpl ex
     /* (non-Javadoc)
 	 * @see org.apache.jetspeed.om.page.impl.FragmentPropertyList#set(int, java.lang.Object)
 	 */
-    public synchronized Object set(int index, Object element)
+    public synchronized FragmentProperty set(int index, FragmentProperty element)
     {
         // implement for modifiable AbstractList:
         FragmentPropertyImpl set = (FragmentPropertyImpl)element;
@@ -161,7 +162,7 @@ public class FragmentPropertyListImpl ex
     /* (non-Javadoc)
 	 * @see org.apache.jetspeed.om.page.impl.FragmentPropertyList#getProperties()
 	 */
-    public List getProperties()
+    public List<FragmentProperty> getProperties()
     {
         return properties;
     }
@@ -169,7 +170,7 @@ public class FragmentPropertyListImpl ex
     /* (non-Javadoc)
 	 * @see org.apache.jetspeed.om.page.impl.FragmentPropertyList#getRemovedProperties()
 	 */
-    public List getRemovedProperties()
+    public List<FragmentProperty> getRemovedProperties()
     {
         return removedProperties;
     }
@@ -235,7 +236,7 @@ public class FragmentPropertyListImpl ex
         {
             if (removedProperties == null)
             {
-                removedProperties = new ArrayList();
+                removedProperties = Collections.synchronizedList(new ArrayList<FragmentProperty>());
             }
             removedProperties.add(removed);
         }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/LinkImpl.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/LinkImpl.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/LinkImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/LinkImpl.java Sat Mar 15 15:59:17 2014
@@ -16,12 +16,13 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
-import java.util.Collection;
-
 import org.apache.jetspeed.om.page.Link;
 import org.apache.jetspeed.om.page.PageMetadataImpl;
+import org.apache.jetspeed.om.portlet.LocalizedField;
 import org.apache.jetspeed.page.document.impl.DocumentImpl;
 
+import java.util.Collection;
+
 /**
  * LinkImpl
  *
@@ -42,7 +43,7 @@ public class LinkImpl extends DocumentIm
     /* (non-Javadoc)
      * @see org.apache.jetspeed.page.document.impl.NodeImpl#newPageMetadata(java.util.Collection)
      */
-    public PageMetadataImpl newPageMetadata(Collection fields)
+    public PageMetadataImpl newPageMetadata(Collection<LocalizedField> fields)
     {
         PageMetadataImpl pageMetadata = new PageMetadataImpl(LinkMetadataLocalizedFieldImpl.class);
         pageMetadata.setFields(fields);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionElement.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/PageMenuDefinitionElement.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionElement.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionElement.java Sat Mar 15 15:59:17 2014
@@ -16,13 +16,15 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
+import org.apache.jetspeed.om.folder.MenuDefinitionElement;
+
 /**
  * PageMenuDefinitionElement
  * 
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id:$
  */
-public interface PageMenuDefinitionElement
+public interface PageMenuDefinitionElement extends MenuDefinitionElement
 {
     // new interface defined only to facilitate OJB table/class mapping
 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionElementList.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/PageMenuDefinitionElementList.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionElementList.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionElementList.java Sat Mar 15 15:59:17 2014
@@ -16,6 +16,8 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
+import org.apache.jetspeed.om.folder.MenuDefinitionElement;
+
 import java.util.AbstractList;
 
 /**
@@ -24,7 +26,7 @@ import java.util.AbstractList;
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-class PageMenuDefinitionElementList extends AbstractList
+class PageMenuDefinitionElementList extends AbstractList<MenuDefinitionElement>
 {
     private PageMenuDefinitionImpl menuDefinition;
 
@@ -42,20 +44,20 @@ class PageMenuDefinitionElementList exte
      * @param menuElement element to add
      * @return list element to add
      */
-    private PageMenuDefinitionElement validateMenuElementForAdd(PageMenuDefinitionElement menuElement)
+    private PageMenuDefinitionElement validateMenuElementForAdd(MenuDefinitionElement menuElement)
     {
         // validate element instance
         if (menuElement == null)
         {
             throw new NullPointerException("Unable to add null to list.");
         }
-        return menuElement;
+        return (PageMenuDefinitionElement)menuElement;
     }
 
     /* (non-Javadoc)
      * @see java.util.List#add(int,java.lang.Object)
      */
-    public void add(int index, Object element)
+    public void add(int index, MenuDefinitionElement element)
     {
         // implement for modifiable AbstractList:
         // validate index
@@ -64,7 +66,7 @@ class PageMenuDefinitionElementList exte
             throw new IndexOutOfBoundsException("Unable to add to list at index: " + index);
         }
         // verify element
-        PageMenuDefinitionElement menuElement = validateMenuElementForAdd((PageMenuDefinitionElement)element);
+        PageMenuDefinitionElement menuElement = validateMenuElementForAdd(element);
         // add to underlying ordered list
         menuDefinition.accessElements().add(index, menuElement);
         // set element order in added element
@@ -97,7 +99,7 @@ class PageMenuDefinitionElementList exte
     /* (non-Javadoc)
      * @see java.util.List#get(int)
      */
-    public Object get(int index)
+    public MenuDefinitionElement get(int index)
     {
         // implement for modifiable AbstractList
         return menuDefinition.accessElements().get(index);
@@ -106,7 +108,7 @@ class PageMenuDefinitionElementList exte
     /* (non-Javadoc)
      * @see java.util.List#remove(int)
      */
-    public Object remove(int index)
+    public MenuDefinitionElement remove(int index)
     {
         // implement for modifiable AbstractList
         return menuDefinition.accessElements().remove(index);
@@ -115,11 +117,11 @@ class PageMenuDefinitionElementList exte
     /* (non-Javadoc)
      * @see java.util.List#set(int,java.lang.Object)
      */
-    public Object set(int index, Object element)
+    public MenuDefinitionElement set(int index, MenuDefinitionElement element)
     {
         // implement for modifiable AbstractList:
         // verify element
-        PageMenuDefinitionElement newMenuElement = validateMenuElementForAdd((PageMenuDefinitionElement)element);
+        PageMenuDefinitionElement newMenuElement = validateMenuElementForAdd(element);
         // set in underlying ordered list
         PageMenuDefinitionElement menuElement = (PageMenuDefinitionElement)menuDefinition.accessElements().set(index, newMenuElement);
         // set element order in new element

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=1577887&r1=1577886&r2=1577887&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 Sat Mar 15 15:59:17 2014
@@ -20,6 +20,7 @@ import org.apache.jetspeed.om.folder.Men
 import org.apache.jetspeed.om.folder.MenuDefinitionElement;
 import org.apache.jetspeed.om.folder.impl.BaseMenuDefinitionImpl;
 import org.apache.jetspeed.om.page.PageMetadataImpl;
+import org.apache.jetspeed.om.portlet.LocalizedField;
 
 import java.util.Collection;
 import java.util.List;
@@ -39,7 +40,7 @@ public class PageMenuDefinitionImpl exte
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.folder.impl.BaseMenuDefinitionMetadata#newPageMetadata()
      */
-    public PageMetadataImpl newPageMetadata(Collection fields)
+    public PageMetadataImpl newPageMetadata(Collection<LocalizedField> fields)
     {
         PageMetadataImpl pageMetadata = new PageMetadataImpl(PageMenuMetadataLocalizedFieldImpl.class);
         pageMetadata.setFields(fields);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionList.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/PageMenuDefinitionList.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionList.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuDefinitionList.java Sat Mar 15 15:59:17 2014
@@ -16,11 +16,13 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
+import org.apache.jetspeed.om.folder.MenuDefinition;
+
 import java.util.AbstractList;
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
-import org.apache.jetspeed.page.impl.DatabasePageManagerUtils;
-
 
 /**
  * PageMenuDefinitionList
@@ -28,11 +30,11 @@ import org.apache.jetspeed.page.impl.Dat
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-class PageMenuDefinitionList extends AbstractList
+class PageMenuDefinitionList extends AbstractList<MenuDefinition>
 {
     private BasePageElementImpl page;
 
-    private List removedMenuDefinitions;
+    private List<MenuDefinition> removedMenuDefinitions;
 
     PageMenuDefinitionList(BasePageElementImpl page)
     {
@@ -48,7 +50,7 @@ class PageMenuDefinitionList extends Abs
      * @param definition menu definition to add
      * @return list element to add
      */
-    private PageMenuDefinitionImpl validateDefinitionForAdd(PageMenuDefinitionImpl definition)
+    private PageMenuDefinitionImpl validateDefinitionForAdd(MenuDefinition definition)
     {
         // only non-null definitions supported
         if (definition == null)
@@ -69,8 +71,8 @@ class PageMenuDefinitionList extends Abs
             if (removedIndex >= 0)
             {
                 // reuse menu definition with matching name
-                PageMenuDefinitionImpl addDefinition = definition;
-                definition = (PageMenuDefinitionImpl)removedMenuDefinitions.remove(removedIndex);
+                MenuDefinition addDefinition = definition;
+                definition = removedMenuDefinitions.remove(removedIndex);
                 // TODO: move this logic to copy methods on implementations
                 // copy menu definition members
                 definition.setOptions(addDefinition.getOptions());
@@ -95,7 +97,7 @@ class PageMenuDefinitionList extends Abs
                 definition.getMetadata().copyFields(addDefinition.getMetadata().getFields());
             }
         }
-        return definition;
+        return (PageMenuDefinitionImpl)definition;
     }
 
     /**
@@ -103,11 +105,11 @@ class PageMenuDefinitionList extends Abs
      *
      * @return removed menu definitions tracking collection
      */
-    private List getRemovedMenuDefinitions()
+    private List<MenuDefinition> getRemovedMenuDefinitions()
     {
         if (removedMenuDefinitions == null)
         {
-            removedMenuDefinitions = DatabasePageManagerUtils.createList();
+            removedMenuDefinitions = Collections.synchronizedList(new ArrayList<MenuDefinition>());
         }
         return removedMenuDefinitions;
     }
@@ -115,7 +117,7 @@ class PageMenuDefinitionList extends Abs
     /* (non-Javadoc)
      * @see java.util.List#add(int,java.lang.Object)
      */
-    public void add(int index, Object element)
+    public void add(int index, MenuDefinition element)
     {
         // implement for modifiable AbstractList:
         // validate index
@@ -124,7 +126,7 @@ class PageMenuDefinitionList extends Abs
             throw new IndexOutOfBoundsException("Unable to add to list at index: " + index);
         }
         // verify menu definition
-        PageMenuDefinitionImpl definition = validateDefinitionForAdd((PageMenuDefinitionImpl)element);
+        PageMenuDefinitionImpl definition = validateDefinitionForAdd(element);
         // add to underlying ordered list
         page.accessMenus().add(index, definition);
     }
@@ -132,7 +134,7 @@ class PageMenuDefinitionList extends Abs
     /* (non-Javadoc)
      * @see java.util.List#get(int)
      */
-    public Object get(int index)
+    public MenuDefinition get(int index)
     {
         // implement for modifiable AbstractList
         return page.accessMenus().get(index);
@@ -141,11 +143,11 @@ class PageMenuDefinitionList extends Abs
     /* (non-Javadoc)
      * @see java.util.List#remove(int)
      */
-    public Object remove(int index)
+    public MenuDefinition remove(int index)
     {
         // implement for modifiable AbstractList:
         // save removed element 
-        PageMenuDefinitionImpl removed = (PageMenuDefinitionImpl)page.accessMenus().remove(index);
+        PageMenuDefinitionImpl removed = page.accessMenus().remove(index);
         if (removed != null)
         {
             getRemovedMenuDefinitions().add(removed);
@@ -156,13 +158,13 @@ class PageMenuDefinitionList extends Abs
     /* (non-Javadoc)
      * @see java.util.List#set(int,java.lang.Object)
      */
-    public Object set(int index, Object element)
+    public MenuDefinition set(int index, Object element)
     {
         // implement for modifiable AbstractList:
         // verify menu definition
         PageMenuDefinitionImpl newDefinition = validateDefinitionForAdd((PageMenuDefinitionImpl)element);
         // set in underlying ordered list
-        PageMenuDefinitionImpl definition = (PageMenuDefinitionImpl)page.accessMenus().set(index, newDefinition);
+        PageMenuDefinitionImpl definition = page.accessMenus().set(index, newDefinition);
         // save replaced element
         getRemovedMenuDefinitions().add(definition);
         // return menu definition

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuSeparatorDefinitionImpl.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/PageMenuSeparatorDefinitionImpl.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuSeparatorDefinitionImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageMenuSeparatorDefinitionImpl.java Sat Mar 15 15:59:17 2014
@@ -16,11 +16,12 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
-import java.util.Collection;
-
 import org.apache.jetspeed.om.folder.MenuSeparatorDefinition;
 import org.apache.jetspeed.om.folder.impl.BaseMenuSeparatorDefinitionImpl;
 import org.apache.jetspeed.om.page.PageMetadataImpl;
+import org.apache.jetspeed.om.portlet.LocalizedField;
+
+import java.util.Collection;
 
 /**
  * PageMenuSeparatorDefinitionImpl
@@ -35,7 +36,7 @@ public class PageMenuSeparatorDefinition
     /* (non-Javadoc)
      * @see org.apache.jetspeed.om.folder.impl.BaseMenuDefinitionMetadata#newPageMetadata()
      */
-    public PageMetadataImpl newPageMetadata(Collection fields)
+    public PageMetadataImpl newPageMetadata(Collection<LocalizedField> fields)
     {
         PageMetadataImpl pageMetadata = new PageMetadataImpl(PageMenuMetadataLocalizedFieldImpl.class);
         pageMetadata.setFields(fields);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityConstraintsDefList.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/PageSecurityConstraintsDefList.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityConstraintsDefList.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityConstraintsDefList.java Sat Mar 15 15:59:17 2014
@@ -16,22 +16,24 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
+import org.apache.jetspeed.om.page.SecurityConstraintsDef;
+
 import java.util.AbstractList;
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
-import org.apache.jetspeed.page.impl.DatabasePageManagerUtils;
-
 /**
  * PageSecurityConstraintsDefList
  *
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-class PageSecurityConstraintsDefList extends AbstractList
+class PageSecurityConstraintsDefList extends AbstractList<SecurityConstraintsDef>
 {
     private PageSecurityImpl pageSecurity;
 
-    private List removedConstraintsDefs;
+    private List<SecurityConstraintsDef> removedConstraintsDefs;
 
     PageSecurityConstraintsDefList(PageSecurityImpl pageSecurity)
     {
@@ -47,7 +49,7 @@ class PageSecurityConstraintsDefList ext
      * @param constraintsDef constraints definition to add
      * @return list element to add
      */
-    private SecurityConstraintsDefImpl validateConstraintsDefForAdd(SecurityConstraintsDefImpl constraintsDef)
+    private SecurityConstraintsDefImpl validateConstraintsDefForAdd(SecurityConstraintsDef constraintsDef)
     {
         // only non-null definitions supported
         if (constraintsDef == null)
@@ -67,13 +69,13 @@ class PageSecurityConstraintsDefList ext
             int removedIndex = removedConstraintsDefs.indexOf(constraintsDef);
             if (removedIndex >= 0)
             {
-                SecurityConstraintsDefImpl addConstraintsDef = constraintsDef;
-                constraintsDef = (SecurityConstraintsDefImpl)removedConstraintsDefs.remove(removedIndex);
+                SecurityConstraintsDef addConstraintsDef = constraintsDef;
+                constraintsDef = removedConstraintsDefs.remove(removedIndex);
                 // TODO: move this logic to copy methods on implementations
                 constraintsDef.setSecurityConstraints(addConstraintsDef.getSecurityConstraints());
             }
         }
-        return constraintsDef;
+        return (SecurityConstraintsDefImpl)constraintsDef;
     }
 
     /**
@@ -81,11 +83,11 @@ class PageSecurityConstraintsDefList ext
      *
      * @return removed constraints defs tracking collection
      */
-    private List getRemovedConstraintsDefs()
+    private List<SecurityConstraintsDef> getRemovedConstraintsDefs()
     {
         if (removedConstraintsDefs == null)
         {
-            removedConstraintsDefs = DatabasePageManagerUtils.createList();
+            removedConstraintsDefs = Collections.synchronizedList(new ArrayList<SecurityConstraintsDef>());
         }
         return removedConstraintsDefs;
     }
@@ -93,7 +95,7 @@ class PageSecurityConstraintsDefList ext
     /* (non-Javadoc)
      * @see java.util.List#add(int,java.lang.Object)
      */
-    public void add(int index, Object element)
+    public void add(int index, SecurityConstraintsDef element)
     {
         // implement for modifiable AbstractList:
         // validate index
@@ -102,7 +104,7 @@ class PageSecurityConstraintsDefList ext
             throw new IndexOutOfBoundsException("Unable to add to list at index: " + index);
         }
         // verify constraints definition
-        SecurityConstraintsDefImpl constraintsDef = validateConstraintsDefForAdd((SecurityConstraintsDefImpl)element);
+        SecurityConstraintsDefImpl constraintsDef = validateConstraintsDefForAdd(element);
         // add to underlying ordered list
         pageSecurity.accessConstraintsDefs().add(index, constraintsDef);
         // clear cached security constraints definition map
@@ -112,7 +114,7 @@ class PageSecurityConstraintsDefList ext
     /* (non-Javadoc)
      * @see java.util.List#get(int)
      */
-    public Object get(int index)
+    public SecurityConstraintsDef get(int index)
     {
         // implement for modifiable AbstractList
         return pageSecurity.accessConstraintsDefs().get(index);
@@ -121,10 +123,10 @@ class PageSecurityConstraintsDefList ext
     /* (non-Javadoc)
      * @see java.util.List#remove(int)
      */
-    public Object remove(int index)
+    public SecurityConstraintsDef remove(int index)
     {
         // implement for modifiable AbstractList
-        SecurityConstraintsDefImpl removed = (SecurityConstraintsDefImpl)pageSecurity.accessConstraintsDefs().remove(index);
+        SecurityConstraintsDefImpl removed = pageSecurity.accessConstraintsDefs().remove(index);
         if (removed != null)
         {
             // save removed element 
@@ -138,13 +140,13 @@ class PageSecurityConstraintsDefList ext
     /* (non-Javadoc)
      * @see java.util.List#set(int,java.lang.Object)
      */
-    public Object set(int index, Object element)
+    public SecurityConstraintsDef set(int index, SecurityConstraintsDef element)
     {
         // implement for modifiable AbstractList:
         // verify constraints definition
         SecurityConstraintsDefImpl newConstraintsDef = validateConstraintsDefForAdd((SecurityConstraintsDefImpl)element);
         // set in underlying ordered list
-        SecurityConstraintsDefImpl constraintsDef = (SecurityConstraintsDefImpl)pageSecurity.accessConstraintsDefs().set(index, newConstraintsDef);
+        SecurityConstraintsDefImpl constraintsDef = pageSecurity.accessConstraintsDefs().set(index, newConstraintsDef);
         // save replaced element
         getRemovedConstraintsDefs().add(constraintsDef);
         // clear cached security constraints definition map

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityConstraintsRefList.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/PageSecurityConstraintsRefList.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityConstraintsRefList.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityConstraintsRefList.java Sat Mar 15 15:59:17 2014
@@ -17,21 +17,21 @@
 package org.apache.jetspeed.om.page.impl;
 
 import java.util.AbstractList;
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
-import org.apache.jetspeed.page.impl.DatabasePageManagerUtils;
-
 /**
  * PageSecurityConstraintsRefList
  *
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-class PageSecurityConstraintsRefList extends AbstractList
+class PageSecurityConstraintsRefList extends AbstractList<String>
 {
     private PageSecurityImpl pageSecurity;
 
-    private List removedConstraintsRefs;
+    private List<PageSecurityGlobalSecurityConstraintsRef> removedConstraintsRefs;
 
     PageSecurityConstraintsRefList(PageSecurityImpl pageSecurity)
     {
@@ -70,7 +70,7 @@ class PageSecurityConstraintsRefList ext
             int removedIndex = removedConstraintsRefs.indexOf(constraintsRef);
             if (removedIndex >= 0)
             {
-                constraintsRef = (PageSecurityGlobalSecurityConstraintsRef)removedConstraintsRefs.remove(removedIndex);
+                constraintsRef = removedConstraintsRefs.remove(removedIndex);
             }
         }
         return constraintsRef;
@@ -81,11 +81,11 @@ class PageSecurityConstraintsRefList ext
      *
      * @return removed constraints refs tracking collection
      */
-    private List getRemovedConstraintsRefs()
+    private List<PageSecurityGlobalSecurityConstraintsRef> getRemovedConstraintsRefs()
     {
         if (removedConstraintsRefs == null)
         {
-            removedConstraintsRefs = DatabasePageManagerUtils.createList();
+            removedConstraintsRefs = Collections.synchronizedList(new ArrayList<PageSecurityGlobalSecurityConstraintsRef>());
         }
         return removedConstraintsRefs;
     }
@@ -93,7 +93,7 @@ class PageSecurityConstraintsRefList ext
     /* (non-Javadoc)
      * @see java.util.List#add(int,java.lang.Object)
      */
-    public void add(int index, Object element)
+    public void add(int index, String element)
     {
         // implement for modifiable AbstractList:
         // validate index
@@ -102,13 +102,13 @@ class PageSecurityConstraintsRefList ext
             throw new IndexOutOfBoundsException("Unable to add to list at index: " + index);
         }
         // wrap and verify constraints ref name string
-        PageSecurityGlobalSecurityConstraintsRef constraintsRef = wrapNameStringForAdd((String)element);
+        PageSecurityGlobalSecurityConstraintsRef constraintsRef = wrapNameStringForAdd(element);
         // add to underlying ordered list
         pageSecurity.accessGlobalConstraintsRefs().add(index, constraintsRef);
         // set apply order in added element
         if (index > 0)
         {
-            constraintsRef.setApplyOrder(((PageSecurityGlobalSecurityConstraintsRef)pageSecurity.accessGlobalConstraintsRefs().get(index-1)).getApplyOrder() + 1);
+            constraintsRef.setApplyOrder(pageSecurity.accessGlobalConstraintsRefs().get(index-1).getApplyOrder() + 1);
         }
         else
         {
@@ -117,7 +117,7 @@ class PageSecurityConstraintsRefList ext
         // maintain apply order in subsequent elements
         for (int i = index, limit = pageSecurity.accessGlobalConstraintsRefs().size() - 1; (i < limit); i++)
         {
-            PageSecurityGlobalSecurityConstraintsRef nextConstraintsRef = (PageSecurityGlobalSecurityConstraintsRef)pageSecurity.accessGlobalConstraintsRefs().get(i + 1);
+            PageSecurityGlobalSecurityConstraintsRef nextConstraintsRef = pageSecurity.accessGlobalConstraintsRefs().get(i + 1);
             if (nextConstraintsRef.getApplyOrder() <= constraintsRef.getApplyOrder())
             {
                 // adjust apply order for next element
@@ -135,38 +135,39 @@ class PageSecurityConstraintsRefList ext
     /* (non-Javadoc)
      * @see java.util.List#get(int)
      */
-    public Object get(int index)
+    public String get(int index)
     {
         // implement for modifiable AbstractList:
         // unwrap constraints ref name string
-        return ((PageSecurityGlobalSecurityConstraintsRef)pageSecurity.accessGlobalConstraintsRefs().get(index)).getName();
+        return pageSecurity.accessGlobalConstraintsRefs().get(index).getName();
     }
 
     /* (non-Javadoc)
      * @see java.util.List#remove(int)
      */
-    public Object remove(int index)
+    public String remove(int index)
     {
         // implement for modifiable AbstractList:
         // save removed element 
-        PageSecurityGlobalSecurityConstraintsRef removed = (PageSecurityGlobalSecurityConstraintsRef)pageSecurity.accessGlobalConstraintsRefs().remove(index);
+        PageSecurityGlobalSecurityConstraintsRef removed = pageSecurity.accessGlobalConstraintsRefs().remove(index);
         if (removed != null)
         {
             getRemovedConstraintsRefs().add(removed);
+            return removed.getName();
         }
-        return removed;
+        return null;
     }
 
     /* (non-Javadoc)
      * @see java.util.List#set(int,java.lang.Object)
      */
-    public Object set(int index, Object element)
+    public String set(int index, String element)
     {
         // implement for modifiable AbstractList:
         // wrap and verify constraints ref name string
-        PageSecurityGlobalSecurityConstraintsRef newConstraintsRef = wrapNameStringForAdd((String)element);
+        PageSecurityGlobalSecurityConstraintsRef newConstraintsRef = wrapNameStringForAdd(element);
         // set in underlying ordered list
-        PageSecurityGlobalSecurityConstraintsRef constraintsRef = (PageSecurityGlobalSecurityConstraintsRef)pageSecurity.accessGlobalConstraintsRefs().set(index, newConstraintsRef);
+        PageSecurityGlobalSecurityConstraintsRef constraintsRef = pageSecurity.accessGlobalConstraintsRefs().set(index, newConstraintsRef);
         // set apply order in new element
         newConstraintsRef.setApplyOrder(constraintsRef.getApplyOrder());
         // save replaced element

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityImpl.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/PageSecurityImpl.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/PageSecurityImpl.java Sat Mar 15 15:59:17 2014
@@ -35,11 +35,11 @@ import java.util.Map;
  */
 public class PageSecurityImpl extends DocumentImpl implements PageSecurity
 {
-    private List constraintsDefs;
-    private List globalConstraintsRefs;
+    private List<SecurityConstraintsDefImpl> constraintsDefs;
+    private List<PageSecurityGlobalSecurityConstraintsRef> globalConstraintsRefs;
 
     private PageSecurityConstraintsDefList securityConstraintsDefs;
-    private Map securityConstraintsDefsMap;
+    private Map<String,SecurityConstraintsDef> securityConstraintsDefsMap;
     private PageSecurityConstraintsRefList globalSecurityConstraintsRefs;
 
     public PageSecurityImpl()
@@ -54,7 +54,7 @@ public class PageSecurityImpl extends Do
      *
      * @return persistent collection
      */
-    List accessConstraintsDefs()
+    List<SecurityConstraintsDefImpl> accessConstraintsDefs()
     {
         // create initial collection if necessary
         if (constraintsDefs == null)
@@ -71,7 +71,7 @@ public class PageSecurityImpl extends Do
      *
      * @return persistent collection
      */
-    List accessGlobalConstraintsRefs()
+    List<PageSecurityGlobalSecurityConstraintsRef> accessGlobalConstraintsRefs()
     {
         // create initial collection if necessary
         if (globalConstraintsRefs == null)
@@ -155,7 +155,7 @@ public class PageSecurityImpl extends Do
         // map if necessary upon realization or after modification
         if ((getSecurityConstraintsDefs() != null) && (securityConstraintsDefsMap == null))
         {
-            securityConstraintsDefsMap = new HashMap((getSecurityConstraintsDefs().size() * 2) + 1);
+            securityConstraintsDefsMap = new HashMap<String,SecurityConstraintsDef>((getSecurityConstraintsDefs().size() * 2) + 1);
             Iterator definitionsIter = getSecurityConstraintsDefs().iterator();
             while (definitionsIter.hasNext())
             {
@@ -170,7 +170,7 @@ public class PageSecurityImpl extends Do
         // lookup constraints definition using cached map 
         if (securityConstraintsDefsMap != null)
         {
-            return (SecurityConstraintsDef)securityConstraintsDefsMap.get(name);
+            return securityConstraintsDefsMap.get(name);
         }
         return null;
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintDefList.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/SecurityConstraintDefList.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintDefList.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintDefList.java Sat Mar 15 15:59:17 2014
@@ -16,6 +16,8 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
+import org.apache.jetspeed.om.common.SecurityConstraint;
+
 import java.util.AbstractList;
 
 /**
@@ -24,7 +26,7 @@ import java.util.AbstractList;
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-class SecurityConstraintDefList extends AbstractList
+class SecurityConstraintDefList extends AbstractList<SecurityConstraint>
 {
     private SecurityConstraintsDefImpl constraintsDef;
 
@@ -42,20 +44,20 @@ class SecurityConstraintDefList extends 
      * @param constraint constraint to add
      * @return list element to add
      */
-    private PageSecuritySecurityConstraintImpl validateConstraintForAdd(PageSecuritySecurityConstraintImpl constraint)
+    private PageSecuritySecurityConstraintImpl validateConstraintForAdd(SecurityConstraint constraint)
     {
         // validate constraint instance class
         if (constraint == null)
         {
             throw new NullPointerException("Unable to add null to list.");
         }
-        return constraint;
+        return (PageSecuritySecurityConstraintImpl)constraint;
     }
 
     /* (non-Javadoc)
      * @see java.util.List#add(int,java.lang.Object)
      */
-    public void add(int index, Object element)
+    public void add(int index, SecurityConstraint element)
     {
         // implement for modifiable AbstractList:
         // validate index
@@ -64,13 +66,13 @@ class SecurityConstraintDefList extends 
             throw new IndexOutOfBoundsException("Unable to add to list at index: " + index);
         }
         // verify constraint
-        PageSecuritySecurityConstraintImpl constraint = validateConstraintForAdd((PageSecuritySecurityConstraintImpl)element);
+        PageSecuritySecurityConstraintImpl constraint = validateConstraintForAdd(element);
         // add to underlying ordered list
         constraintsDef.accessConstraintDefs().add(index, constraint);
         // set apply order in added element
         if (index > 0)
         {
-            constraint.setApplyOrder(((PageSecuritySecurityConstraintImpl)constraintsDef.accessConstraintDefs().get(index-1)).getApplyOrder() + 1);
+            constraint.setApplyOrder(constraintsDef.accessConstraintDefs().get(index-1).getApplyOrder() + 1);
         }
         else
         {
@@ -79,7 +81,7 @@ class SecurityConstraintDefList extends 
         // maintain apply order in subsequent elements
         for (int i = index, limit = constraintsDef.accessConstraintDefs().size() - 1; (i < limit); i++)
         {
-            PageSecuritySecurityConstraintImpl nextConstraint = (PageSecuritySecurityConstraintImpl)constraintsDef.accessConstraintDefs().get(i + 1);
+            PageSecuritySecurityConstraintImpl nextConstraint = constraintsDef.accessConstraintDefs().get(i + 1);
             if (nextConstraint.getApplyOrder() <= constraint.getApplyOrder())
             {
                 // adjust apply order for next element
@@ -97,7 +99,7 @@ class SecurityConstraintDefList extends 
     /* (non-Javadoc)
      * @see java.util.List#get(int)
      */
-    public Object get(int index)
+    public SecurityConstraint get(int index)
     {
         // implement for modifiable AbstractList
         return constraintsDef.accessConstraintDefs().get(index);
@@ -106,7 +108,7 @@ class SecurityConstraintDefList extends 
     /* (non-Javadoc)
      * @see java.util.List#remove(int)
      */
-    public Object remove(int index)
+    public SecurityConstraint remove(int index)
     {
         // implement for modifiable AbstractList
         return constraintsDef.accessConstraintDefs().remove(index);
@@ -115,13 +117,13 @@ class SecurityConstraintDefList extends 
     /* (non-Javadoc)
      * @see java.util.List#set(int,java.lang.Object)
      */
-    public Object set(int index, Object element)
+    public SecurityConstraint set(int index, SecurityConstraint element)
     {
         // implement for modifiable AbstractList:
         // verify constraint
-        PageSecuritySecurityConstraintImpl newConstraint = validateConstraintForAdd((PageSecuritySecurityConstraintImpl)element);
+        PageSecuritySecurityConstraintImpl newConstraint = validateConstraintForAdd(element);
         // set in underlying ordered list
-        PageSecuritySecurityConstraintImpl constraint = (PageSecuritySecurityConstraintImpl)constraintsDef.accessConstraintDefs().set(index, newConstraint);
+        PageSecuritySecurityConstraintImpl constraint = constraintsDef.accessConstraintDefs().set(index, newConstraint);
         // set apply order in new element
         newConstraint.setApplyOrder(constraint.getApplyOrder());
         // return constraint

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintList.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/SecurityConstraintList.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintList.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintList.java Sat Mar 15 15:59:17 2014
@@ -16,17 +16,18 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
-import java.util.AbstractList;
-
+import org.apache.jetspeed.om.common.SecurityConstraint;
 import org.apache.jetspeed.om.page.SecurityConstraintImpl;
 
+import java.util.AbstractList;
+
 /**
  * SecurityConstraintList
  *
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id$
  */
-class SecurityConstraintList extends AbstractList
+class SecurityConstraintList extends AbstractList<SecurityConstraint>
 {
     private SecurityConstraintsImpl constraints;
 
@@ -44,7 +45,7 @@ class SecurityConstraintList extends Abs
      * @param constraint to add
      * @return list element to add
      */
-    private SecurityConstraintImpl validateConstraintForAdd(SecurityConstraintImpl constraint)
+    private SecurityConstraintImpl validateConstraintForAdd(SecurityConstraint constraint)
     {
         // validate constraint instance class
         if (constraint == null)
@@ -56,13 +57,13 @@ class SecurityConstraintList extends Abs
         {
             throw new ClassCastException("Unable to add list element instance: expected " + constraints.getSecurityConstraintClass().getName() + ", got " + constraint.getClass().getName() + ".");
         }
-        return constraint;
+        return (SecurityConstraintImpl)constraint;
     }
 
     /* (non-Javadoc)
      * @see java.util.List#add(int,java.lang.Object)
      */
-    public void add(int index, Object element)
+    public void add(int index, SecurityConstraint element)
     {
         // implement for modifiable AbstractList:
         // validate index
@@ -71,13 +72,13 @@ class SecurityConstraintList extends Abs
             throw new IndexOutOfBoundsException("Unable to add to list at index: " + index);
         }
         // verify constraint
-        SecurityConstraintImpl constraint = validateConstraintForAdd((SecurityConstraintImpl)element);
+        SecurityConstraintImpl constraint = validateConstraintForAdd(element);
         // add to underlying ordered list
         constraints.accessConstraints().add(index, constraint);
         // set apply order in added element
         if (index > 0)
         {
-            constraint.setApplyOrder(((SecurityConstraintImpl)constraints.accessConstraints().get(index-1)).getApplyOrder() + 1);
+            constraint.setApplyOrder(constraints.accessConstraints().get(index-1).getApplyOrder() + 1);
         }
         else
         {
@@ -86,7 +87,7 @@ class SecurityConstraintList extends Abs
         // maintain apply order in subsequent elements
         for (int i = index, limit = constraints.accessConstraints().size() - 1; (i < limit); i++)
         {
-            SecurityConstraintImpl nextConstraint = (SecurityConstraintImpl)constraints.accessConstraints().get(i + 1);
+            SecurityConstraintImpl nextConstraint = constraints.accessConstraints().get(i + 1);
             if (nextConstraint.getApplyOrder() <= constraint.getApplyOrder())
             {
                 // adjust apply order for next element
@@ -106,7 +107,7 @@ class SecurityConstraintList extends Abs
     /* (non-Javadoc)
      * @see java.util.List#get(int)
      */
-    public Object get(int index)
+    public SecurityConstraint get(int index)
     {
         // implement for modifiable AbstractList
         return constraints.accessConstraints().get(index);
@@ -115,10 +116,10 @@ class SecurityConstraintList extends Abs
     /* (non-Javadoc)
      * @see java.util.List#remove(int)
      */
-    public Object remove(int index)
+    public SecurityConstraint remove(int index)
     {
         // implement for modifiable AbstractList
-        Object removed = constraints.accessConstraints().remove(index);
+        SecurityConstraint removed = constraints.accessConstraints().remove(index);
         if (removed != null)
         {
             // clear all cached security constraints
@@ -130,13 +131,13 @@ class SecurityConstraintList extends Abs
     /* (non-Javadoc)
      * @see java.util.List#set(int,java.lang.Object)
      */
-    public Object set(int index, Object element)
+    public SecurityConstraint set(int index, SecurityConstraint element)
     {
         // implement for modifiable AbstractList:
         // verify constraint
-        SecurityConstraintImpl newConstraint = validateConstraintForAdd((SecurityConstraintImpl)element);
+        SecurityConstraintImpl newConstraint = validateConstraintForAdd(element);
         // set in underlying ordered list
-        SecurityConstraintImpl constraint = (SecurityConstraintImpl)constraints.accessConstraints().set(index, newConstraint);
+        SecurityConstraintImpl constraint = constraints.accessConstraints().set(index, newConstraint);
         // set apply order in new element
         newConstraint.setApplyOrder(constraint.getApplyOrder());
         // clear all cached security constraints

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintsDefImpl.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/SecurityConstraintsDefImpl.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintsDefImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintsDefImpl.java Sat Mar 15 15:59:17 2014
@@ -32,7 +32,7 @@ public class SecurityConstraintsDefImpl 
 {
     private int id;
     private String name;
-    private List constraintDefs = DatabasePageManagerUtils.createList();
+    private List<PageSecuritySecurityConstraintImpl> constraintDefs;
 
     private SecurityConstraintDefList securityConstraintDefs;
 
@@ -43,7 +43,7 @@ public class SecurityConstraintsDefImpl 
      *
      * @return persistent collection
      */
-    List accessConstraintDefs()
+    List<PageSecuritySecurityConstraintImpl> accessConstraintDefs()
     {
         // create initial collection if necessary
         if (constraintDefs == null)



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