You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by rw...@apache.org on 2014/03/15 16:59:19 UTC

svn commit: r1577887 [5/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-...

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/PageManagerTestShared.java Sat Mar 15 15:59:17 2014
@@ -112,7 +112,7 @@ public interface PageManagerTestShared
         static CastorXmlPageManager makeCastorXMLPageManager(String baseDir, String pagesDirName, boolean permissionsEnabled, boolean constraintsEnabled)
             throws Exception
         {
-            Map extensionsToXslt = new HashMap();
+            Map<String,Object> extensionsToXslt = new HashMap<String,Object>();
             extensionsToXslt.put("psml",baseDir+"src/main/resources/stripIds.xslt");
                 
             File pagesDirFile = new File(baseDir+"target/testdata/" + pagesDirName);
@@ -188,11 +188,11 @@ public interface PageManagerTestShared
          * @param csv CSV string
          * @return values list
          */
-        static List makeListFromCSV(String csv)
+        static List<String> makeListFromCSV(String csv)
         {
             if (csv != null)
             {
-                List csvList = new ArrayList();
+                List<String> csvList = new ArrayList<String>();
                 if (csv.indexOf(',') != -1)
                 {
                     StringTokenizer csvTokens = new StringTokenizer(csv, ",");
@@ -218,7 +218,7 @@ public interface PageManagerTestShared
          * @param list values list
          * @return CSV string
          */
-        static String makeCSVFromList(List list)
+        static String makeCSVFromList(List<String> list)
         {
             if ((list != null) && !list.isEmpty())
             {
@@ -230,7 +230,7 @@ public interface PageManagerTestShared
                     {
                         csv.append(",");
                     }
-                    csv.append((String)listIter.next());
+                    csv.append(listIter.next());
                 }
                 return csv.toString();
             }
@@ -252,23 +252,23 @@ public interface PageManagerTestShared
             pageManager.reset();
             
             // setup test subjects
-            Set principals = new PrincipalsSet();
+            Set<Principal> principals = new PrincipalsSet();
             principals.add(new TestUser("admin"));
             principals.add(new TestRole("admin"));
-            Subject adminSubject = new Subject(true, principals, new HashSet(), new HashSet());
+            Subject adminSubject = new Subject(true, principals, new HashSet<Principal>(), new HashSet<Principal>());
             
             principals = new PrincipalsSet();
             principals.add(new TestUser("user"));
-            Subject userSubject = new Subject(true, principals, new HashSet(), new HashSet());
+            Subject userSubject = new Subject(true, principals, new HashSet<Principal>(), new HashSet<Principal>());
             
             principals = new PrincipalsSet();
             principals.add(new TestUser("manager"));
             principals.add(new TestRole("manager"));
-            Subject managerSubject = new Subject(true, principals, new HashSet(), new HashSet());
+            Subject managerSubject = new Subject(true, principals, new HashSet<Principal>(), new HashSet<Principal>());
 
             principals = new PrincipalsSet();
             principals.add(new TestUser("guest"));
-            Subject guestSubject = new Subject(true, principals, new HashSet(), new HashSet());
+            Subject guestSubject = new Subject(true, principals, new HashSet<Principal>(), new HashSet<Principal>());
 
             // setup test as admin user
             Exception setup = (Exception)JSSubject.doAsPrivileged(adminSubject, new PrivilegedAction()
@@ -292,17 +292,17 @@ public interface PageManagerTestShared
                             Folder folder = pageManager.newFolder("/");
                             SecurityConstraints constraints = pageManager.newSecurityConstraints();
                             constraints.setOwner("admin");
-                            List constraintsRefs = new ArrayList(1);
+                            List<String> constraintsRefs = new ArrayList<String>(1);
                             constraintsRefs.add("public-view");
                             constraints.setSecurityConstraintsRefs(constraintsRefs);
                             folder.setSecurityConstraints(constraints);
                             pageManager.updateFolder(folder);
                         
                             PageSecurity pageSecurity = pageManager.newPageSecurity();
-                            List constraintsDefs = new ArrayList(2);
+                            List<SecurityConstraintsDef> constraintsDefs = new ArrayList<SecurityConstraintsDef>(2);
                             SecurityConstraintsDef constraintsDef = pageManager.newSecurityConstraintsDef();
                             constraintsDef.setName("public-view");
-                            List defConstraints = new ArrayList(1);
+                            List<SecurityConstraint> defConstraints = new ArrayList<SecurityConstraint>(1);
                             SecurityConstraint defConstraint = pageManager.newPageSecuritySecurityConstraint();
                             defConstraint.setUsers(Shared.makeListFromCSV("*"));
                             defConstraint.setPermissions(Shared.makeListFromCSV("view"));
@@ -311,7 +311,7 @@ public interface PageManagerTestShared
                             constraintsDefs.add(constraintsDef);
                             constraintsDef = pageManager.newSecurityConstraintsDef();
                             constraintsDef.setName("admin-all");
-                            defConstraints = new ArrayList(1);
+                            defConstraints = new ArrayList<SecurityConstraint>(1);
                             defConstraint = pageManager.newPageSecuritySecurityConstraint();
                             defConstraint.setRoles(Shared.makeListFromCSV("admin"));
                             defConstraint.setPermissions(Shared.makeListFromCSV("view,edit"));
@@ -319,7 +319,7 @@ public interface PageManagerTestShared
                             constraintsDef.setSecurityConstraints(defConstraints);
                             constraintsDefs.add(constraintsDef);
                             pageSecurity.setSecurityConstraintsDefs(constraintsDefs);
-                            List globalConstraintsRefs = new ArrayList(1);
+                            List<String> globalConstraintsRefs = new ArrayList<String>(1);
                             globalConstraintsRefs.add("admin-all");
                             pageSecurity.setGlobalSecurityConstraintsRefs(globalConstraintsRefs);
                             pageManager.updatePageSecurity(pageSecurity);
@@ -327,13 +327,13 @@ public interface PageManagerTestShared
                             Page page = pageManager.newPage("/default-page.psml");
                             constraints = pageManager.newSecurityConstraints();
                             constraints.setOwner("admin");
-                            List inlineConstraints = new ArrayList(1);
+                            List<SecurityConstraint> inlineConstraints = new ArrayList<SecurityConstraint>(1);
                             SecurityConstraint constraint = pageManager.newPageSecurityConstraint();
                             constraint.setRoles(Shared.makeListFromCSV("manager"));
                             constraint.setPermissions(Shared.makeListFromCSV("edit"));
                             inlineConstraints.add(constraint);
                             constraints.setSecurityConstraints(inlineConstraints);
-                            constraintsRefs = new ArrayList(1);
+                            constraintsRefs = new ArrayList<String>(1);
                             constraintsRefs.add("public-view");
                             constraints.setSecurityConstraintsRefs(constraintsRefs);
                             page.setSecurityConstraints(constraints);
@@ -365,7 +365,7 @@ public interface PageManagerTestShared
                         
                             page = pageManager.newPage("/user-page.psml");
                             constraints = pageManager.newSecurityConstraints();
-                            inlineConstraints = new ArrayList(1);
+                            inlineConstraints = new ArrayList<SecurityConstraint>(1);
                             constraint = pageManager.newPageSecurityConstraint();
                             constraint.setUsers(Shared.makeListFromCSV("user"));
                             constraint.setPermissions(Shared.makeListFromCSV("view,edit"));
@@ -378,7 +378,7 @@ public interface PageManagerTestShared
                             link.setUrl("http://www.default.org/");
                             constraints = pageManager.newSecurityConstraints();
                             constraints.setOwner("admin");
-                            inlineConstraints = new ArrayList(1);
+                            inlineConstraints = new ArrayList<SecurityConstraint>(1);
                             constraint = pageManager.newLinkSecurityConstraint();
                             constraint.setRoles(Shared.makeListFromCSV("manager"));
                             constraint.setPermissions(Shared.makeListFromCSV("edit"));
@@ -729,34 +729,34 @@ public interface PageManagerTestShared
             pageManager.reset();
 
             // setup test subjects
-            Set principals = new PrincipalsSet();
+            Set<Principal> principals = new PrincipalsSet();
             principals.add(new TestUser("admin"));
-            Subject adminSubject = new Subject(true, principals, new HashSet(), new HashSet());
+            Subject adminSubject = new Subject(true, principals, new HashSet<Principal>(), new HashSet<Principal>());
 
             principals = new PrincipalsSet();
             principals.add(new TestUser("user-with-admin"));
             principals.add(new TestRole("admin"));
-            Subject userWithAdminSubject = new Subject(true, principals, new HashSet(), new HashSet());
+            Subject userWithAdminSubject = new Subject(true, principals, new HashSet<Principal>(), new HashSet<Principal>());
 
             principals = new PrincipalsSet();
             principals.add(new TestUser("user"));
-            Subject userSubject = new Subject(true, principals, new HashSet(), new HashSet());
+            Subject userSubject = new Subject(true, principals, new HashSet<Principal>(), new HashSet<Principal>());
 
             principals = new PrincipalsSet();
             principals.add(new TestUser("test-group-user"));
             principals.add(new TestGroup("test-group"));
-            Subject testGroupUserSubject = new Subject(true, principals, new HashSet(), new HashSet());
+            Subject testGroupUserSubject = new Subject(true, principals, new HashSet<Principal>(), new HashSet<Principal>());
 
             principals = new PrincipalsSet();
             principals.add(new TestUser("test-role-user"));
             principals.add(new TestRole("test-role"));
-            Subject testRoleUserSubject = new Subject(true, principals, new HashSet(), new HashSet());
+            Subject testRoleUserSubject = new Subject(true, principals, new HashSet<Principal>(), new HashSet<Principal>());
 
             principals = new PrincipalsSet();
             principals.add(new TestUser("test-group-role-user"));
             principals.add(new TestGroup("test-group"));
             principals.add(new TestRole("test-role"));
-            Subject testGroupRoleUserSubject = new Subject(true, principals, new HashSet(), new HashSet());
+            Subject testGroupRoleUserSubject = new Subject(true, principals, new HashSet<Principal>(), new HashSet<Principal>());
 
             // setup test as admin
             Exception setup = (Exception) JSSubject.doAsPrivileged(adminSubject, new PrivilegedAction()
@@ -780,17 +780,17 @@ public interface PageManagerTestShared
                         Folder folder = pageManager.newFolder("/");
                         SecurityConstraints constraints = pageManager.newSecurityConstraints();
                         constraints.setOwner("admin");
-                        List constraintsRefs = new ArrayList(1);
+                        List<String> constraintsRefs = new ArrayList<String>(1);
                         constraintsRefs.add("public-view");
                         constraints.setSecurityConstraintsRefs(constraintsRefs);
                         folder.setSecurityConstraints(constraints);
                         pageManager.updateFolder(folder);
 
                         PageSecurity pageSecurity = pageManager.newPageSecurity();
-                        List constraintsDefs = new ArrayList(5);
+                        List<SecurityConstraintsDef> constraintsDefs = new ArrayList<SecurityConstraintsDef>(5);
                         SecurityConstraintsDef constraintsDef = pageManager.newSecurityConstraintsDef();
                         constraintsDef.setName("public-view");
-                        List defConstraints = new ArrayList(1);
+                        List<SecurityConstraint> defConstraints = new ArrayList<SecurityConstraint>(1);
                         SecurityConstraint defConstraint = pageManager.newPageSecuritySecurityConstraint();
                         defConstraint.setUsers(Shared.makeListFromCSV("*"));
                         defConstraint.setPermissions(Shared.makeListFromCSV("view"));
@@ -799,7 +799,7 @@ public interface PageManagerTestShared
                         constraintsDefs.add(constraintsDef);
                         constraintsDef = pageManager.newSecurityConstraintsDef();
                         constraintsDef.setName("test-group");
-                        defConstraints = new ArrayList(1);
+                        defConstraints = new ArrayList<SecurityConstraint>(1);
                         defConstraint = pageManager.newPageSecuritySecurityConstraint();
                         defConstraint.setGroups(Shared.makeListFromCSV("test-group"));
                         defConstraint.setPermissions(Shared.makeListFromCSV("view"));
@@ -808,7 +808,7 @@ public interface PageManagerTestShared
                         constraintsDefs.add(constraintsDef);
                         constraintsDef = pageManager.newSecurityConstraintsDef();
                         constraintsDef.setName("test-role");
-                        defConstraints = new ArrayList(1);
+                        defConstraints = new ArrayList<SecurityConstraint>(1);
                         defConstraint = pageManager.newPageSecuritySecurityConstraint();
                         defConstraint.setRoles(Shared.makeListFromCSV("test-role"));
                         defConstraint.setPermissions(Shared.makeListFromCSV("view"));
@@ -817,7 +817,7 @@ public interface PageManagerTestShared
                         constraintsDefs.add(constraintsDef);
                         constraintsDef = pageManager.newSecurityConstraintsDef();
                         constraintsDef.setName("admin-role");
-                        defConstraints = new ArrayList(1);
+                        defConstraints = new ArrayList<SecurityConstraint>(1);
                         defConstraint = pageManager.newPageSecuritySecurityConstraint();
                         defConstraint.setRoles(Shared.makeListFromCSV("admin"));
                         defConstraint.setPermissions(Shared.makeListFromCSV("view,edit"));
@@ -826,7 +826,7 @@ public interface PageManagerTestShared
                         constraintsDefs.add(constraintsDef);
                         constraintsDef = pageManager.newSecurityConstraintsDef();
                         constraintsDef.setName("admin-user");
-                        defConstraints = new ArrayList(1);
+                        defConstraints = new ArrayList<SecurityConstraint>(1);
                         defConstraint = pageManager.newPageSecuritySecurityConstraint();
                         defConstraint.setUsers(Shared.makeListFromCSV("admin"));
                         defConstraint.setPermissions(Shared.makeListFromCSV("view,edit"));
@@ -834,7 +834,7 @@ public interface PageManagerTestShared
                         constraintsDef.setSecurityConstraints(defConstraints);
                         constraintsDefs.add(constraintsDef);
                         pageSecurity.setSecurityConstraintsDefs(constraintsDefs);
-                        List globalConstraintsRefs = new ArrayList(1);
+                        List<String> globalConstraintsRefs = new ArrayList<String>(1);
                         globalConstraintsRefs.add("admin-role or admin-user");
                         pageSecurity.setGlobalSecurityConstraintsRefs(globalConstraintsRefs);
                         pageManager.updatePageSecurity(pageSecurity);
@@ -842,7 +842,7 @@ public interface PageManagerTestShared
                         Page page = pageManager.newPage("/default-page.psml");
                         constraints = pageManager.newSecurityConstraints();
                         constraints.setOwner("admin");
-                        constraintsRefs = new ArrayList(1);
+                        constraintsRefs = new ArrayList<String>(1);
                         constraintsRefs.add("public-view");
                         constraints.setSecurityConstraintsRefs(constraintsRefs);
                         page.setSecurityConstraints(constraints);
@@ -851,13 +851,13 @@ public interface PageManagerTestShared
                         page = pageManager.newPage("/or-page.psml");
                         constraints = pageManager.newSecurityConstraints();
                         constraints.setOwner("admin");
-                        List inlineConstraints = new ArrayList(1);
+                        List<SecurityConstraint> inlineConstraints = new ArrayList<SecurityConstraint>(1);
                         SecurityConstraint constraint = pageManager.newPageSecurityConstraint();
                         constraint.setUsers(Shared.makeListFromCSV("user"));
                         constraint.setPermissions(Shared.makeListFromCSV("view"));
                         inlineConstraints.add(constraint);
                         constraints.setSecurityConstraints(inlineConstraints);
-                        constraintsRefs = new ArrayList(1);
+                        constraintsRefs = new ArrayList<String>(1);
                         constraintsRefs.add("test-group || test-role");
                         constraints.setSecurityConstraintsRefs(constraintsRefs);
                         page.setSecurityConstraints(constraints);
@@ -866,7 +866,7 @@ public interface PageManagerTestShared
                         page = pageManager.newPage("/and-page.psml");
                         constraints = pageManager.newSecurityConstraints();
                         constraints.setOwner("admin");
-                        constraintsRefs = new ArrayList(1);
+                        constraintsRefs = new ArrayList<String>(1);
                         constraintsRefs.add("test-group and test-role");
                         constraints.setSecurityConstraintsRefs(constraintsRefs);
                         page.setSecurityConstraints(constraints);
@@ -875,7 +875,7 @@ public interface PageManagerTestShared
                         page = pageManager.newPage("/not-page.psml");
                         constraints = pageManager.newSecurityConstraints();
                         constraints.setOwner("admin");
-                        constraintsRefs = new ArrayList(1);
+                        constraintsRefs = new ArrayList<String>(1);
                         constraintsRefs.add("not test-role");
                         constraints.setSecurityConstraintsRefs(constraintsRefs);
                         page.setSecurityConstraints(constraints);
@@ -884,7 +884,7 @@ public interface PageManagerTestShared
                         page = pageManager.newPage("/and-not-page.psml");
                         constraints = pageManager.newSecurityConstraints();
                         constraints.setOwner("admin");
-                        constraintsRefs = new ArrayList(1);
+                        constraintsRefs = new ArrayList<String>(1);
                         constraintsRefs.add("public-view and not test-group");
                         constraints.setSecurityConstraintsRefs(constraintsRefs);
                         page.setSecurityConstraints(constraints);
@@ -893,7 +893,7 @@ public interface PageManagerTestShared
                         page = pageManager.newPage("/paren-page.psml");
                         constraints = pageManager.newSecurityConstraints();
                         constraints.setOwner("admin");
-                        constraintsRefs = new ArrayList(1);
+                        constraintsRefs = new ArrayList<String>(1);
                         constraintsRefs.add("((test-group||test-role)&&!admin-role)");
                         constraints.setSecurityConstraintsRefs(constraintsRefs);
                         page.setSecurityConstraints(constraints);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java Sat Mar 15 15:59:17 2014
@@ -16,20 +16,8 @@
  */
 package org.apache.jetspeed.page;
 
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.om.common.SecurityConstraint;
@@ -37,6 +25,7 @@ import org.apache.jetspeed.om.common.Sec
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.folder.FolderNotFoundException;
 import org.apache.jetspeed.om.folder.MenuDefinition;
+import org.apache.jetspeed.om.folder.MenuDefinitionElement;
 import org.apache.jetspeed.om.folder.MenuExcludeDefinition;
 import org.apache.jetspeed.om.folder.MenuIncludeDefinition;
 import org.apache.jetspeed.om.folder.MenuOptionsDefinition;
@@ -60,6 +49,17 @@ import org.apache.jetspeed.security.JSSu
 import org.apache.jetspeed.security.PrincipalsSet;
 import org.apache.jetspeed.test.JetspeedTestCase;
 
+import javax.security.auth.Subject;
+import java.security.Principal;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Set;
+
 /**
  * TestCastorXmlPageManager
  * 
@@ -457,7 +457,7 @@ public class TestCastorXmlPageManager ex
         Fragment f = pageManager.newFragment();
         f.setType(Fragment.PORTLET);
         f.setName("TestPortlet");
-        List properties = f.getProperties();
+        List<FragmentProperty> properties = f.getProperties();
         FragmentProperty fp = pageManager.newFragmentProperty();
         fp.setName(Fragment.ROW_PROPERTY_NAME);
         fp.setValue("0");
@@ -478,14 +478,14 @@ public class TestCastorXmlPageManager ex
 
         SecurityConstraints constraints = page.newSecurityConstraints();
         constraints.setOwner("new-user");
-        List constraintsList = new ArrayList(1);
+        List<SecurityConstraint> constraintsList = new ArrayList<SecurityConstraint>(1);
         SecurityConstraint constraint = page.newSecurityConstraint();
         constraint.setUsers(Shared.makeListFromCSV("user10,user11"));
         constraint.setRoles(Shared.makeListFromCSV("*"));
         constraint.setPermissions(Shared.makeListFromCSV(JetspeedActions.EDIT + "," + JetspeedActions.VIEW));
         constraintsList.add(constraint);
         constraints.setSecurityConstraints(constraintsList);
-        List constraintsRefsList = new ArrayList(1);
+        List<String> constraintsRefsList = new ArrayList<String>(1);
         constraintsRefsList.add("public-view");
         constraints.setSecurityConstraintsRefs(constraintsRefsList);
         page.setSecurityConstraints(constraints);
@@ -552,7 +552,7 @@ public class TestCastorXmlPageManager ex
         root = (Fragment)rootFragmentElement;
         assertTrue(root.getName().equals("TestLayout"));
         assertTrue(root.getFragments().size() == 2);
-        BaseFragmentElement bf = (BaseFragmentElement)root.getFragments().get(0);
+        BaseFragmentElement bf = root.getFragments().get(0);
         assertTrue(bf instanceof Fragment);
         f = (Fragment)bf;
         assertNotNull(f.getProperties());
@@ -638,18 +638,18 @@ public class TestCastorXmlPageManager ex
         assertTrue(root.getName().equals("TestLayout"));
         assertTrue(root.getType().equals(Fragment.LAYOUT));
         assertTrue(root.getFragments().size() == 3);
-        bf = (BaseFragmentElement)root.getFragments().get(0);
+        bf = root.getFragments().get(0);
         assertTrue(bf instanceof Fragment);
         f = (Fragment)bf;
         assertTrue(f.getName().equals("TestPortlet"));
         assertTrue(f.getType().equals(Fragment.PORTLET));
         assertNotNull(f.getProperties());
         assertEquals(1, f.getIntProperty(Fragment.ROW_PROPERTY_NAME));
-        bf = (BaseFragmentElement)root.getFragments().get(1);
+        bf = root.getFragments().get(1);
         assertTrue(bf instanceof FragmentReference);
         fr = (FragmentReference)bf;
         assertTrue(fr.getRefId().equals("test002"));
-        bf = (BaseFragmentElement)root.getFragments().get(2);
+        bf = root.getFragments().get(2);
         assertTrue(bf instanceof PageFragment);
 
         DynamicPage dynamicpage = pageManager.newDynamicPage("/test002.dpsml");
@@ -691,12 +691,12 @@ public class TestCastorXmlPageManager ex
         assertTrue(root.getName().equals("TestLayout"));
         assertTrue(root.getType().equals(Fragment.LAYOUT));
         assertTrue(root.getFragments().size() == 2);
-        bf = (BaseFragmentElement)root.getFragments().get(0);
+        bf = root.getFragments().get(0);
         assertTrue(bf instanceof Fragment);
         f = (Fragment)bf;
         assertTrue(f.getName().equals("TestPortlet"));
         assertTrue(f.getType().equals(Fragment.PORTLET));
-        bf = (BaseFragmentElement)root.getFragments().get(1);
+        bf = root.getFragments().get(1);
         assertTrue(bf instanceof FragmentReference);
         fr = (FragmentReference)bf;
         assertTrue(fr.getRefId().equals("test002"));
@@ -1195,11 +1195,11 @@ public class TestCastorXmlPageManager ex
 
         // test writing page menu definitions
         page = pageManager.getPage("/test002.psml");
-        page.setMenuDefinitions(new ArrayList());
+        page.setMenuDefinitions(new ArrayList<MenuDefinition>());
         MenuDefinition newMenu = page.newMenuDefinition();
         newMenu.setName("updated-menu");
         newMenu.setSkin("tabs");
-        newMenu.setMenuElements(new ArrayList());
+        newMenu.setMenuElements(new ArrayList<MenuDefinitionElement>());
         MenuSeparatorDefinition newSeparator = page.newMenuSeparatorDefinition();
         newSeparator.setText("-- Updated Menu --");
         newMenu.getMenuElements().add(newSeparator);
@@ -1247,7 +1247,7 @@ public class TestCastorXmlPageManager ex
 
         // test writing folder menu definitions
         folder = pageManager.getFolder("/folder2");
-        folder.setMenuDefinitions(new ArrayList());
+        folder.setMenuDefinitions(new ArrayList<MenuDefinition>());
         newMenu = folder.newMenuDefinition();
         newMenu.setName("updated-menu");
         newMenu.setSkin("bread-crumbs");
@@ -1618,8 +1618,8 @@ public class TestCastorXmlPageManager ex
         assertTrue(root.getFragments().isEmpty());
     }
     
-    public Collection collectIds(Folder f) throws Exception {
-        Collection result = new ArrayList();
+    public Collection<String> collectIds(Folder f) throws Exception {
+        Collection<String> result = new ArrayList<String>();
         
         for (Iterator iter = f.getAll().iterator(); iter.hasNext();)
         {
@@ -1633,15 +1633,15 @@ public class TestCastorXmlPageManager ex
            } else
            if (obj instanceof Folder){
                Folder thisFolder = (Folder)obj;
-               result.addAll(collectIds((Folder)obj));
+               result.addAll(collectIds(thisFolder));
            }            
         }   
         
         return result;
     }
     
-    public Collection collectIds(BaseFragmentElement bf){
-    	Collection result = new ArrayList();
+    public Collection<String> collectIds(BaseFragmentElement bf){
+    	Collection<String> result = new ArrayList<String>();
         
     	result.add(bf.getId());
     	if (bf instanceof Fragment) {
@@ -1717,10 +1717,10 @@ public class TestCastorXmlPageManager ex
     private Subject constructUserSubject()
     {
         // setup test subject
-        Set principals = new PrincipalsSet();
+        Set<Principal> principals = new PrincipalsSet();
         principals.add(new TestUser("user"));
         principals.add(new TestGroup("group"));
         principals.add(new TestRole("role"));
-        return new Subject(true, principals, new HashSet(), new HashSet());
+        return new Subject(true, principals, new HashSet<Principal>(), new HashSet<Principal>());
     }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCreateUserHomePagesFromRoles.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCreateUserHomePagesFromRoles.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCreateUserHomePagesFromRoles.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCreateUserHomePagesFromRoles.java Sat Mar 15 15:59:17 2014
@@ -16,18 +16,17 @@
  */
 package org.apache.jetspeed.page;
 
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.page.psml.CastorXmlPageManager;
 import org.apache.jetspeed.test.JetspeedTestCase;
 
+import javax.security.auth.Subject;
+import java.security.Principal;
+import java.util.HashSet;
+import java.util.Set;
+
 /**
  * TestSecureCastorXmlPageManager
  * 
@@ -112,7 +111,7 @@ public class TestCreateUserHomePagesFrom
         assertTrue("folder2 failed to create", pageManager.folderExists(FOLDER2));
         assertTrue("folder3 failed to create", pageManager.folderExists(FOLDER3));
         
-        Set principals = new HashSet();
+        Set<Principal> principals = new HashSet<Principal>();
         
         // create the role principals
         principals.add(new TestRole("role1"));
@@ -123,7 +122,7 @@ public class TestCreateUserHomePagesFrom
         principals.add(new TestUser("david"));
         
         // create the subject
-        Subject subject = new Subject(true, principals, new HashSet(), new HashSet());
+        Subject subject = new Subject(true, principals, new HashSet<Principal>(), new HashSet<Principal>());
 
         pageManager.createUserHomePagesFromRoles(subject);
         

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java Sat Mar 15 15:59:17 2014
@@ -23,6 +23,7 @@ import org.apache.jetspeed.om.common.Sec
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.folder.FolderNotFoundException;
 import org.apache.jetspeed.om.folder.MenuDefinition;
+import org.apache.jetspeed.om.folder.MenuDefinitionElement;
 import org.apache.jetspeed.om.folder.MenuExcludeDefinition;
 import org.apache.jetspeed.om.folder.MenuIncludeDefinition;
 import org.apache.jetspeed.om.folder.MenuOptionsDefinition;
@@ -48,6 +49,7 @@ import org.apache.jetspeed.security.JSSu
 import org.apache.jetspeed.security.PrincipalsSet;
 
 import javax.security.auth.Subject;
+import java.security.Principal;
 import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -157,7 +159,7 @@ public class TestDatabasePageManager ext
         metadata.addField(Locale.FRENCH, "title", "[fr] Root Folder");
         SecurityConstraints folderConstraints = pageManager.newSecurityConstraints();
         folderConstraints.setOwner("admin");
-        List inlineFolderConstraints = new ArrayList(2);
+        List<SecurityConstraint> inlineFolderConstraints = new ArrayList<SecurityConstraint>(2);
         SecurityConstraint folderConstraint = pageManager.newFolderSecurityConstraint();
         folderConstraint.setUsers(Shared.makeListFromCSV("user,admin"));
         folderConstraint.setRoles(Shared.makeListFromCSV("manager"));
@@ -168,12 +170,12 @@ public class TestDatabasePageManager ext
         folderConstraint.setPermissions(Shared.makeListFromCSV("edit"));
         inlineFolderConstraints.add(folderConstraint);
         folderConstraints.setSecurityConstraints(inlineFolderConstraints);
-        List folderConstraintsRefs = new ArrayList(2);
+        List<String> folderConstraintsRefs = new ArrayList<String>(2);
         folderConstraintsRefs.add("public-view");
         folderConstraintsRefs.add("public-edit");
         folderConstraints.setSecurityConstraintsRefs(folderConstraintsRefs);
         folder.setSecurityConstraints(folderConstraints);
-        List documentOrder = new ArrayList(2);
+        List<String> documentOrder = new ArrayList<String>(2);
         documentOrder.add("some-other-page.psml");
         documentOrder.add("default-page.psml");
         folder.setDocumentOrder(documentOrder);
@@ -243,17 +245,17 @@ public class TestDatabasePageManager ext
         metadata.addField(Locale.JAPANESE, "title", "[ja] Default Page");
         SecurityConstraints pageConstraints = page.newSecurityConstraints();
         pageConstraints.setOwner("user");
-        List inlinePageConstraints = new ArrayList(1);
+        List<SecurityConstraint> inlinePageConstraints = new ArrayList<SecurityConstraint>(1);
         SecurityConstraint pageConstraint = page.newSecurityConstraint();
         pageConstraint.setUsers(Shared.makeListFromCSV("jetspeed"));
         pageConstraint.setPermissions(Shared.makeListFromCSV("edit"));
         inlinePageConstraints.add(pageConstraint);
         pageConstraints.setSecurityConstraints(inlinePageConstraints);
-        List pageConstraintsRefs = new ArrayList(1);
+        List<String> pageConstraintsRefs = new ArrayList<String>(1);
         pageConstraintsRefs.add("manager-edit");
         pageConstraints.setSecurityConstraintsRefs(pageConstraintsRefs);
         page.setSecurityConstraints(pageConstraints);
-        List pageMenus = new ArrayList();
+        List<MenuDefinition> pageMenus = new ArrayList<MenuDefinition>();
         newMenu = page.newMenuDefinition();
         newMenu.setName("page-menu-1");
         newMenu.setTitle("The Test Page Menu");
@@ -261,7 +263,7 @@ public class TestDatabasePageManager ext
         metadata.addField(Locale.FRENCH, "title", "[fr] The Test Page Menu");
         newSeparator = page.newMenuSeparatorDefinition();
         newSeparator.setText("-- Page Menu --");
-        List menuElements = new ArrayList();
+        List<MenuDefinitionElement> menuElements = new ArrayList<MenuDefinitionElement>();
         menuElements.add(newSeparator);
         newOptions0 = page.newMenuOptionsDefinition();
         newOptions0.setOptions("/*.psml");
@@ -317,18 +319,18 @@ public class TestDatabasePageManager ext
         portlet.setLayoutZ(34.56F);
         portlet.setLayoutWidth(45.67F);
         portlet.setLayoutHeight(56.78F);
-        List preferences = new ArrayList(2);
+        List<FragmentPreference> preferences = new ArrayList<FragmentPreference>(2);
         FragmentPreference preference = pageManager.newFragmentPreference();
         preference.setName("pref0");
         preference.setReadOnly(true);
-        List preferenceValues = new ArrayList(2);
+        List<String> preferenceValues = new ArrayList<String>(2);
         preferenceValues.add("pref0-value0");
         preferenceValues.add("pref0-value1");
         preference.setValueList(preferenceValues);
         preferences.add(preference);
         preference = pageManager.newFragmentPreference();
         preference.setName("pref1");
-        preferenceValues = new ArrayList(1);
+        preferenceValues = new ArrayList<String>(1);
         preferenceValues.add("pref1-value");
         preference.setValueList(preferenceValues);
         preferences.add(preference);
@@ -430,13 +432,13 @@ public class TestDatabasePageManager ext
         metadata.addField(Locale.GERMAN, "title", "[de] Default Link");
         SecurityConstraints linkConstraints = link.newSecurityConstraints();
         linkConstraints.setOwner("user");
-        List inlineLinkConstraints = new ArrayList(1);
+        List<SecurityConstraint> inlineLinkConstraints = new ArrayList<SecurityConstraint>(1);
         SecurityConstraint linkConstraint = link.newSecurityConstraint();
         linkConstraint.setUsers(Shared.makeListFromCSV("jetspeed"));
         linkConstraint.setPermissions(Shared.makeListFromCSV("edit"));
         inlineLinkConstraints.add(linkConstraint);
         linkConstraints.setSecurityConstraints(inlineLinkConstraints);
-        List linkConstraintsRefs = new ArrayList(1);
+        List<String> linkConstraintsRefs = new ArrayList<String>(1);
         linkConstraintsRefs.add("manager-edit");
         linkConstraints.setSecurityConstraintsRefs(linkConstraintsRefs);
         link.setSecurityConstraints(linkConstraints);
@@ -451,10 +453,10 @@ public class TestDatabasePageManager ext
         assertEquals(1, pageManager.getLinks(folder).size());
 
         PageSecurity pageSecurity = pageManager.newPageSecurity();
-        List constraintsDefs = new ArrayList(2);
+        List<SecurityConstraintsDef> constraintsDefs = new ArrayList<SecurityConstraintsDef>(2);
         SecurityConstraintsDef constraintsDef = pageManager.newSecurityConstraintsDef();
         constraintsDef.setName("public-view");
-        List defConstraints = new ArrayList(1);
+        List<SecurityConstraint> defConstraints = new ArrayList<SecurityConstraint>(1);
         SecurityConstraint defConstraint = pageSecurity.newSecurityConstraint();
         defConstraint.setUsers(Shared.makeListFromCSV("*"));
         defConstraint.setPermissions(Shared.makeListFromCSV("view"));
@@ -463,7 +465,7 @@ public class TestDatabasePageManager ext
         constraintsDefs.add(constraintsDef);
         constraintsDef = pageSecurity.newSecurityConstraintsDef();
         constraintsDef.setName("admin-all");
-        defConstraints = new ArrayList(2);
+        defConstraints = new ArrayList<SecurityConstraint>(2);
         defConstraint = pageSecurity.newSecurityConstraint();
         defConstraint.setRoles(Shared.makeListFromCSV("admin"));
         defConstraint.setPermissions(Shared.makeListFromCSV("view,edit"));
@@ -474,7 +476,7 @@ public class TestDatabasePageManager ext
         constraintsDef.setSecurityConstraints(defConstraints);
         constraintsDefs.add(constraintsDef);
         pageSecurity.setSecurityConstraintsDefs(constraintsDefs);
-        List globalConstraintsRefs = new ArrayList(2);
+        List<String> globalConstraintsRefs = new ArrayList<String>(2);
         globalConstraintsRefs.add("admin-all");
         globalConstraintsRefs.add("public-view");
         pageSecurity.setGlobalSecurityConstraintsRefs(globalConstraintsRefs);
@@ -685,19 +687,19 @@ public class TestDatabasePageManager ext
             assertEquals("/page.security", check.getUrl());
             assertNotNull(check.getSecurityConstraintsDefs());
             assertEquals(2, check.getSecurityConstraintsDefs().size());
-            assertEquals("admin-all", ((SecurityConstraintsDef)check.getSecurityConstraintsDefs().get(0)).getName());
-            assertNotNull(((SecurityConstraintsDef)check.getSecurityConstraintsDefs().get(0)).getSecurityConstraints());
-            assertEquals(2, ((SecurityConstraintsDef)check.getSecurityConstraintsDefs().get(0)).getSecurityConstraints().size());
-            assertEquals("view,edit", Shared.makeCSVFromList(((SecurityConstraint)((SecurityConstraintsDef)check.getSecurityConstraintsDefs().get(0)).getSecurityConstraints().get(0)).getPermissions()));
-            assertEquals("public-view", ((SecurityConstraintsDef)check.getSecurityConstraintsDefs().get(1)).getName());
-            assertNotNull(((SecurityConstraintsDef)check.getSecurityConstraintsDefs().get(1)).getSecurityConstraints());
-            assertEquals(1, ((SecurityConstraintsDef)check.getSecurityConstraintsDefs().get(1)).getSecurityConstraints().size());
-            assertEquals("*", Shared.makeCSVFromList(((SecurityConstraint)((SecurityConstraintsDef)check.getSecurityConstraintsDefs().get(1)).getSecurityConstraints().get(0)).getUsers()));
-            assertEquals("view", Shared.makeCSVFromList(((SecurityConstraint)((SecurityConstraintsDef)check.getSecurityConstraintsDefs().get(1)).getSecurityConstraints().get(0)).getPermissions()));
+            assertEquals("admin-all", check.getSecurityConstraintsDefs().get(0).getName());
+            assertNotNull(check.getSecurityConstraintsDefs().get(0).getSecurityConstraints());
+            assertEquals(2, check.getSecurityConstraintsDefs().get(0).getSecurityConstraints().size());
+            assertEquals("view,edit", Shared.makeCSVFromList(check.getSecurityConstraintsDefs().get(0).getSecurityConstraints().get(0).getPermissions()));
+            assertEquals("public-view", check.getSecurityConstraintsDefs().get(1).getName());
+            assertNotNull(check.getSecurityConstraintsDefs().get(1).getSecurityConstraints());
+            assertEquals(1, check.getSecurityConstraintsDefs().get(1).getSecurityConstraints().size());
+            assertEquals("*", Shared.makeCSVFromList(check.getSecurityConstraintsDefs().get(1).getSecurityConstraints().get(0).getUsers()));
+            assertEquals("view", Shared.makeCSVFromList(check.getSecurityConstraintsDefs().get(1).getSecurityConstraints().get(0).getPermissions()));
             assertNotNull(check.getGlobalSecurityConstraintsRefs());
             assertEquals(2, check.getGlobalSecurityConstraintsRefs().size());
-            assertEquals("admin-all", (String)check.getGlobalSecurityConstraintsRefs().get(0));
-            assertEquals("public-view", (String)check.getGlobalSecurityConstraintsRefs().get(1));
+            assertEquals("admin-all", check.getGlobalSecurityConstraintsRefs().get(0));
+            assertEquals("public-view", check.getGlobalSecurityConstraintsRefs().get(1));
             assertNotNull(check.getParent());
         }
         catch (DocumentNotFoundException e)
@@ -724,7 +726,7 @@ public class TestDatabasePageManager ext
             assertEquals("manager-edit", (String)check.getSecurityConstraints().getSecurityConstraintsRefs().get(0));
             assertNotNull(check.getSecurityConstraints().getSecurityConstraints());
             assertEquals(1, check.getSecurityConstraints().getSecurityConstraints().size());
-            assertEquals("jetspeed", Shared.makeCSVFromList(((SecurityConstraint)check.getSecurityConstraints().getSecurityConstraints().get(0)).getUsers()));
+            assertEquals("jetspeed", Shared.makeCSVFromList(check.getSecurityConstraints().getSecurityConstraints().get(0).getUsers()));
             assertNotNull(check.getParent());
         }
         catch (PageNotFoundException e)
@@ -763,12 +765,12 @@ public class TestDatabasePageManager ext
             assertEquals("jetspeed-layouts::VelocityTwoColumns", root.getName());
             assertEquals(Fragment.LAYOUT, root.getType());
             assertEquals(2, root.getFragments().size());
-            BaseFragmentElement checkElement0 = (BaseFragmentElement)root.getFragments().get(0);
+            BaseFragmentElement checkElement0 = root.getFragments().get(0);
             assertTrue(checkElement0 instanceof Fragment);
             Fragment check0 = (Fragment)checkElement0;
             assertEquals("content-app::ContentPortlet", check0.getName());
             assertEquals(Fragment.PORTLET, check0.getType());
-            BaseFragmentElement checkElement1 = (BaseFragmentElement)root.getFragments().get(1);
+            BaseFragmentElement checkElement1 = root.getFragments().get(1);
             assertTrue(checkElement1 instanceof FragmentReference);
             FragmentReference check1 = (FragmentReference)checkElement1;
             assertEquals("fragment-definition", check1.getRefId());
@@ -789,17 +791,17 @@ public class TestDatabasePageManager ext
             assertEquals("jetspeed-layouts::VelocityTwoColumns", root.getName());
             assertEquals(Fragment.LAYOUT, root.getType());
             assertEquals(3, root.getFragments().size());
-            BaseFragmentElement checkElement0 = (BaseFragmentElement)root.getFragments().get(0);
+            BaseFragmentElement checkElement0 = root.getFragments().get(0);
             assertTrue(checkElement0 instanceof Fragment);
             Fragment check0 = (Fragment)checkElement0;
             assertEquals("templates::MenusTemplatePortlet", check0.getName());
             assertEquals(Fragment.PORTLET, check0.getType());
             assertEquals(1, check0.getLayoutRow());
-            BaseFragmentElement checkElement1 = (BaseFragmentElement)root.getFragments().get(1);
+            BaseFragmentElement checkElement1 = root.getFragments().get(1);
             assertTrue(checkElement1 instanceof FragmentReference);
             FragmentReference check1 = (FragmentReference)checkElement1;
             assertEquals("fragment-definition", check1.getRefId());
-            BaseFragmentElement checkElement2 = (BaseFragmentElement)root.getFragments().get(2);
+            BaseFragmentElement checkElement2 = root.getFragments().get(2);
             assertTrue(checkElement2 instanceof PageFragment);
         }
         catch (PageNotFoundException e)
@@ -829,10 +831,10 @@ public class TestDatabasePageManager ext
             assertEquals("manager-edit", (String)check.getSecurityConstraints().getSecurityConstraintsRefs().get(0));
             assertNotNull(check.getSecurityConstraints().getSecurityConstraints());
             assertEquals(1, check.getSecurityConstraints().getSecurityConstraints().size());
-            assertEquals("jetspeed", Shared.makeCSVFromList(((SecurityConstraint)check.getSecurityConstraints().getSecurityConstraints().get(0)).getUsers()));
+            assertEquals("jetspeed", Shared.makeCSVFromList(check.getSecurityConstraints().getSecurityConstraints().get(0).getUsers()));
             assertNotNull(check.getMenuDefinitions());
             assertEquals(2, check.getMenuDefinitions().size());
-            MenuDefinition checkMenu = (MenuDefinition)check.getMenuDefinitions().get(0);
+            MenuDefinition checkMenu = check.getMenuDefinitions().get(0);
             assertEquals("page-menu-1", checkMenu.getName());
             assertEquals("The Test Page Menu", checkMenu.getTitle());
             assertEquals("[fr] The Test Page Menu", checkMenu.getTitle(Locale.FRENCH));
@@ -850,7 +852,7 @@ public class TestDatabasePageManager ext
             assertEquals("exclude-menu", ((MenuExcludeDefinition)checkMenu.getMenuElements().get(3)).getName());
             assertTrue(checkMenu.getMenuElements().get(4) instanceof MenuIncludeDefinition);
             assertEquals("include-menu", ((MenuIncludeDefinition)checkMenu.getMenuElements().get(4)).getName());
-            checkMenu = (MenuDefinition)check.getMenuDefinitions().get(1);
+            checkMenu = check.getMenuDefinitions().get(1);
             assertEquals("page-menu-2", checkMenu.getName());
             assertNotNull(checkMenu.getMenuElements());
             assertTrue(checkMenu.getMenuElements().isEmpty());
@@ -925,7 +927,7 @@ public class TestDatabasePageManager ext
             }
             assertNotNull(checkRootFragment.getFragments());
             assertEquals(3, checkRootFragment.getFragments().size());
-            BaseFragmentElement checkElement0 = (BaseFragmentElement)checkRootFragment.getFragments().get(0);
+            BaseFragmentElement checkElement0 = checkRootFragment.getFragments().get(0);
             assertTrue(checkElement0 instanceof Fragment);
             Fragment check0 = (Fragment)checkElement0;
             assertEquals("security::LoginPortlet", check0.getName());
@@ -946,18 +948,18 @@ public class TestDatabasePageManager ext
             assertTrue((check0.getLayoutHeight() > 56.0F) && (check0.getLayoutWidth() < 57.0F));
             assertNotNull(check0.getPreferences());
             assertEquals(2, check0.getPreferences().size());
-            assertEquals("pref0", ((FragmentPreference)check0.getPreferences().get(0)).getName());
-            assertTrue(((FragmentPreference)check0.getPreferences().get(0)).isReadOnly());
-            assertNotNull(((FragmentPreference)check0.getPreferences().get(0)).getValueList());
-            assertEquals(2, ((FragmentPreference)check0.getPreferences().get(0)).getValueList().size());
-            assertEquals("pref0-value0", (String)((FragmentPreference)check0.getPreferences().get(0)).getValueList().get(0));
-            assertEquals("pref0-value1", (String)((FragmentPreference)check0.getPreferences().get(0)).getValueList().get(1));
-            assertEquals("pref1", ((FragmentPreference)check0.getPreferences().get(1)).getName());
-            assertFalse(((FragmentPreference)check0.getPreferences().get(1)).isReadOnly());
-            assertNotNull(((FragmentPreference)check0.getPreferences().get(1)).getValueList());
-            assertEquals(1, ((FragmentPreference)check0.getPreferences().get(1)).getValueList().size());
-            assertEquals("pref1-value", (String)((FragmentPreference)check0.getPreferences().get(1)).getValueList().get(0));
-            BaseFragmentElement checkElement1 = (BaseFragmentElement)checkRootFragment.getFragments().get(1);
+            assertEquals("pref0", check0.getPreferences().get(0).getName());
+            assertTrue(check0.getPreferences().get(0).isReadOnly());
+            assertNotNull(check0.getPreferences().get(0).getValueList());
+            assertEquals(2, check0.getPreferences().get(0).getValueList().size());
+            assertEquals("pref0-value0", check0.getPreferences().get(0).getValueList().get(0));
+            assertEquals("pref0-value1", check0.getPreferences().get(0).getValueList().get(1));
+            assertEquals("pref1", check0.getPreferences().get(1).getName());
+            assertFalse(check0.getPreferences().get(1).isReadOnly());
+            assertNotNull(check0.getPreferences().get(1).getValueList());
+            assertEquals(1, check0.getPreferences().get(1).getValueList().size());
+            assertEquals("pref1-value", check0.getPreferences().get(1).getValueList().get(0));
+            BaseFragmentElement checkElement1 = checkRootFragment.getFragments().get(1);
             assertTrue(checkElement1 instanceof Fragment);
             Fragment check1 = (Fragment)checkElement1;
             assertEquals("some-app::SomePortlet", check1.getName());
@@ -977,7 +979,7 @@ public class TestDatabasePageManager ext
             assertNotNull(check.getFragmentsByName("some-app::SomePortlet"));
             assertEquals(1, check.getFragmentsByName("some-app::SomePortlet").size());
             assertNotNull(check.getParent());
-            BaseFragmentElement checkElement2 = (BaseFragmentElement)checkRootFragment.getFragments().get(2);
+            BaseFragmentElement checkElement2 = checkRootFragment.getFragments().get(2);
             assertTrue(checkElement2 instanceof FragmentReference);
             FragmentReference checkFragmentReference = (FragmentReference)checkElement2;
             assertTrue(checkFragmentReference.getRefId().equals("fragment-definition"));
@@ -1009,17 +1011,17 @@ public class TestDatabasePageManager ext
             assertEquals("admin", check.getSecurityConstraints().getOwner());
             assertNotNull(check.getSecurityConstraints().getSecurityConstraintsRefs());
             assertEquals(2, check.getSecurityConstraints().getSecurityConstraintsRefs().size());
-            assertEquals("public-edit", (String)check.getSecurityConstraints().getSecurityConstraintsRefs().get(1));
+            assertEquals("public-edit", check.getSecurityConstraints().getSecurityConstraintsRefs().get(1));
             assertNotNull(check.getSecurityConstraints().getSecurityConstraints());
             assertEquals(2, check.getSecurityConstraints().getSecurityConstraints().size());
-            assertEquals("user,admin", Shared.makeCSVFromList(((SecurityConstraint)check.getSecurityConstraints().getSecurityConstraints().get(0)).getUsers()));
-            assertEquals("manager", Shared.makeCSVFromList(((SecurityConstraint)check.getSecurityConstraints().getSecurityConstraints().get(0)).getRoles()));
-            assertEquals("*", Shared.makeCSVFromList(((SecurityConstraint)check.getSecurityConstraints().getSecurityConstraints().get(0)).getGroups()));
-            assertEquals("edit", Shared.makeCSVFromList(((SecurityConstraint)check.getSecurityConstraints().getSecurityConstraints().get(1)).getPermissions()));
+            assertEquals("user,admin", Shared.makeCSVFromList(check.getSecurityConstraints().getSecurityConstraints().get(0).getUsers()));
+            assertEquals("manager", Shared.makeCSVFromList(check.getSecurityConstraints().getSecurityConstraints().get(0).getRoles()));
+            assertEquals("*", Shared.makeCSVFromList(check.getSecurityConstraints().getSecurityConstraints().get(0).getGroups()));
+            assertEquals("edit", Shared.makeCSVFromList(check.getSecurityConstraints().getSecurityConstraints().get(1).getPermissions()));
             assertNotNull(check.getDocumentOrder());
             assertEquals(2, check.getDocumentOrder().size());
-            assertEquals("some-other-page.psml", (String)check.getDocumentOrder().get(0));
-            assertEquals("default-page.psml", (String)check.getDocumentOrder().get(1));
+            assertEquals("some-other-page.psml", check.getDocumentOrder().get(0));
+            assertEquals("default-page.psml", check.getDocumentOrder().get(1));
             assertNull(check.getParent());
             assertNotNull(check.getPageSecurity());
             assertNotNull(check.getPages());
@@ -1042,14 +1044,14 @@ public class TestDatabasePageManager ext
             assertEquals("page.security", ((Node)all.next()).getName());
             assertNotNull(check.getMenuDefinitions());
             assertEquals(2, check.getMenuDefinitions().size());
-            MenuDefinition checkMenu = (MenuDefinition)check.getMenuDefinitions().get(0);
+            MenuDefinition checkMenu = check.getMenuDefinitions().get(0);
             assertEquals("folder-breadcrumb-menu", checkMenu.getName());
             assertEquals("bread-crumbs", checkMenu.getSkin());
             assertEquals("./", checkMenu.getOptions());
             assertTrue(checkMenu.isPaths());
             assertNotNull(checkMenu.getMenuElements());
             assertTrue(checkMenu.getMenuElements().isEmpty());
-            checkMenu = (MenuDefinition)check.getMenuDefinitions().get(1);
+            checkMenu = check.getMenuDefinitions().get(1);
             assertEquals("folder-menu", checkMenu.getName());
             assertEquals("The Test Folder Menu", checkMenu.getTitle());
             assertEquals("Folder Menu", checkMenu.getShortTitle());
@@ -1350,10 +1352,10 @@ public class TestDatabasePageManager ext
     private Subject constructUserSubject()
     {
         // setup test subject
-        Set principals = new PrincipalsSet();
+        Set<Principal> principals = new PrincipalsSet();
         principals.add(new TestUser("user"));
         principals.add(new TestGroup("group"));
         principals.add(new TestRole("role"));
-        return new Subject(true, principals, new HashSet(), new HashSet());
+        return new Subject(true, principals, new HashSet<Principal>(), new HashSet<Principal>());
     }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestTransactions.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestTransactions.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestTransactions.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestTransactions.java Sat Mar 15 15:59:17 2014
@@ -53,7 +53,7 @@ public class TestTransactions extends  D
 
     public void testTx() throws Exception
     {
-        PageManager pageManager = (PageManager)scm.getComponent("pageManager");
+         PageManager pageManager = (PageManager)scm.getComponent("pageManager");
 
         if (pageManager.folderExists("/"))
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/DatabasePageManagerServer.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/DatabasePageManagerServer.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/DatabasePageManagerServer.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/DatabasePageManagerServer.java Sat Mar 15 15:59:17 2014
@@ -34,8 +34,10 @@ import javax.security.auth.Subject;
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
+import java.security.Principal;
 import java.security.PrivilegedAction;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Set;
 
 /**
@@ -94,9 +96,11 @@ public class DatabasePageManagerServer
         
         // create jexl context
         jexlContext = JexlHelper.createContext();
-        jexlContext.getVars().put("pageManager", pageManager);
-        jexlContext.getVars().put("pageManagerServer", this);
-        
+        @SuppressWarnings("unchecked")
+        Map<String,Object> jexlContextVars = jexlContext.getVars();
+        jexlContextVars.put("pageManager", pageManager);
+        jexlContextVars.put("pageManagerServer", this);
+
         log.info( "DatabasePageManager server initialized");
     }
     
@@ -237,7 +241,7 @@ public class DatabasePageManagerServer
     {
         if ((userSubject == null) && (user != null))
         {
-            Set userPrincipals = new PrincipalsSet();
+            Set<Principal> userPrincipals = new PrincipalsSet();
             userPrincipals.add(new PageManagerTestShared.TestUser(user));
             if (groups != null)
             {
@@ -255,7 +259,7 @@ public class DatabasePageManagerServer
                     userPrincipals.add(new PageManagerTestShared.TestRole(rolesArray[i].trim()));                                    
                 }
             }
-            userSubject = new Subject(true, userPrincipals, new HashSet(), new HashSet());            
+            userSubject = new Subject(true, userPrincipals, new HashSet<Principal>(), new HashSet<Principal>());
         }
         return userSubject;
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/document/psml/TestCastorFileSystemDocumentHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/document/psml/TestCastorFileSystemDocumentHandler.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/document/psml/TestCastorFileSystemDocumentHandler.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/document/psml/TestCastorFileSystemDocumentHandler.java Sat Mar 15 15:59:17 2014
@@ -16,25 +16,23 @@
  */
 package org.apache.jetspeed.page.document.psml;
 
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import net.sf.ehcache.CacheManager;
-
+import org.apache.jetspeed.cache.file.FileCache;
+import org.apache.jetspeed.cache.impl.EhCacheImpl;
 import org.apache.jetspeed.idgenerator.IdGenerator;
 import org.apache.jetspeed.idgenerator.JetspeedIdGenerator;
-import org.apache.jetspeed.om.page.Document;
 import org.apache.jetspeed.om.folder.psml.FolderMetaDataImpl;
+import org.apache.jetspeed.om.page.Document;
+import org.apache.jetspeed.page.document.DocumentHandler;
 import org.apache.jetspeed.page.document.DocumentHandlerFactory;
-import org.apache.jetspeed.page.document.psml.DocumentHandlerFactoryImpl;
 import org.apache.jetspeed.test.JetspeedTestCase;
-import org.apache.jetspeed.cache.file.FileCache;
-import org.apache.jetspeed.cache.impl.EhCacheImpl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -73,7 +71,7 @@ public class TestCastorFileSystemDocumen
             getBaseDir()+"src/test/testdata/pages",
             cache);
             
-        Map handlerMap = new HashMap();
+        Map<String,DocumentHandler> handlerMap = new HashMap<String,DocumentHandler>();
         handlerMap.put("folder.metadata", folderMetaDataDocumentHandler);
         DocumentHandlerFactory handlerFactory = new DocumentHandlerFactoryImpl(handlerMap);
         folderMetaDataDocumentHandler.setHandlerFactory(handlerFactory);
@@ -138,7 +136,7 @@ public class TestCastorFileSystemDocumen
     {
         Thread [] threads = new Thread[10];
         int i;
-        final List exceptions = new ArrayList(10);
+        final List<Exception> exceptions = new ArrayList<Exception>(10);
         
         for (i = 0; i < threads.length; i++)
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/impl/MenuImpl.java Sat Mar 15 15:59:17 2014
@@ -62,7 +62,7 @@ public class MenuImpl extends MenuElemen
      * elements - ordered list of menu elements that
      *            make up this instantiated menu
      */
-    private List elements;
+    private List<MenuElement> elements;
 
     /**
      * elementRelative - flag that indicates whether any relative paths
@@ -809,7 +809,7 @@ public class MenuImpl extends MenuElemen
         if (copy.elements != null)
         {
             Iterator elementsIter = copy.elements.iterator();
-            copy.elements = new ArrayList(copy.elements.size());
+            copy.elements = new ArrayList<MenuElement>(copy.elements.size());
             while (elementsIter.hasNext())
             {
                 MenuElementImpl elementCopy = (MenuElementImpl)((MenuElementImpl)elementsIter.next()).clone();
@@ -1008,7 +1008,7 @@ public class MenuImpl extends MenuElemen
      *
      * @return menu elements list
      */
-    public List getElements()
+    public List<MenuElement> getElements()
     {
         return elements;
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/util/ojb/CollectionUtils.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/util/ojb/CollectionUtils.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/util/ojb/CollectionUtils.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/util/ojb/CollectionUtils.java Sat Mar 15 15:59:17 2014
@@ -16,11 +16,6 @@
  */
 package org.apache.jetspeed.util.ojb;
 
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
 import org.apache.ojb.broker.ManageableCollection;
 import org.apache.ojb.broker.PersistenceBroker;
 import org.apache.ojb.broker.PersistenceBrokerException;
@@ -28,6 +23,11 @@ import org.apache.ojb.broker.util.collec
 import org.apache.ojb.broker.util.collections.RemovalAwareCollection;
 import org.apache.ojb.broker.util.collections.RemovalAwareList;
 
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
 /**
  * CollectionUtils
  * 
@@ -42,12 +42,11 @@ public class CollectionUtils
      * This issue on occurs when persisting newly create object collections
      * When persisting objects retrieved with OJB, this issue does not occur
      * 
-     * @see JS2-590
-     * @return
+     * See issue JS2-590
      */
     
     @SuppressWarnings("unchecked")
-    public static final Collection createCollection()
+    public static <T> Collection<T> createCollection()
     {
         // highly concurrent applications will require using
         // createSynchronizedCollection() here instead of this OJB
@@ -59,18 +58,18 @@ public class CollectionUtils
      * Synchronized OJB removal aware collection.
      */
     @SuppressWarnings("unchecked")
-    public static class SynchronizedRemovalAwareCollection implements Collection, ManageableCollection, IRemovalAwareCollection
+    public static class SynchronizedRemovalAwareCollection<T> implements Collection<T>, ManageableCollection, IRemovalAwareCollection
     {
         private static final long serialVersionUID = 1L;
 
         private RemovalAwareCollection collection = new RemovalAwareCollection();
 
-        public synchronized boolean add(Object e)
+        public synchronized boolean add(T e)
         {
             return collection.add(e);
         }
 
-        public synchronized boolean addAll(Collection c)
+        public synchronized boolean addAll(Collection<? extends T> c)
         {
             return collection.addAll(c);
         }
@@ -95,7 +94,7 @@ public class CollectionUtils
             return collection.isEmpty();
         }
 
-        public synchronized Iterator iterator()
+        public synchronized Iterator<T> iterator()
         {
             return collection.iterator();
         }
@@ -120,14 +119,14 @@ public class CollectionUtils
             return collection.size();
         }
 
-        public synchronized Object[] toArray()
+        public synchronized T[] toArray()
         {
-            return collection.toArray();
+            return (T[])collection.toArray();
         }
 
-        public synchronized Object[] toArray(Object[] a)
+        public synchronized <A> A[] toArray(A[] a)
         {
-            return collection.toArray(a);
+            return (A[])collection.toArray(a);
         }
 
         public synchronized void afterStore(PersistenceBroker broker) throws PersistenceBrokerException
@@ -151,8 +150,7 @@ public class CollectionUtils
         }
     }
 
-    @SuppressWarnings("unchecked")
-    public static final Collection createSynchronizedCollection()
+    public static <T> Collection<T> createSynchronizedCollection()
     {
         // if OJB collections are to be synchronized, collection-class
         // attributes for collection-descriptor need to be set in the
@@ -167,11 +165,11 @@ public class CollectionUtils
         // using Collections.synchronizedCollection() will not work since
         // OJB collections that are removal aware must implement the
         // ManageableCollection, IRemovalAwareCollection interfaces.
-        return new SynchronizedRemovalAwareCollection();
+        return new SynchronizedRemovalAwareCollection<T>();
     }
-    
+
     @SuppressWarnings("unchecked")
-    public static final List createList()
+    public static <T> List<T> createList()
     {
         // highly concurrent applications will require using
         // createSynchronizedList() here instead of this OJB
@@ -183,23 +181,23 @@ public class CollectionUtils
      * Synchronized OJB removal aware list.
      */
     @SuppressWarnings("unchecked")
-    public static class SynchronizedRemovalAwareList implements List, ManageableCollection, IRemovalAwareCollection
+    public static class SynchronizedRemovalAwareList<T> implements List<T>, ManageableCollection, IRemovalAwareCollection
     {
         private static final long serialVersionUID = 1L;
 
         private RemovalAwareList list = new RemovalAwareList();
 
-        public synchronized void add(int index, Object element)
+        public synchronized void add(int index, T element)
         {
             list.add(index, element);
         }
 
-        public synchronized boolean add(Object e)
+        public synchronized boolean add(T e)
         {
             return list.add(e);
         }
 
-        public synchronized boolean addAll(Collection c)
+        public synchronized boolean addAll(Collection<? extends T> c)
         {
             return list.addAll(c);
         }
@@ -224,9 +222,9 @@ public class CollectionUtils
             return list.containsAll(c);
         }
 
-        public synchronized Object get(int index)
+        public synchronized T get(int index)
         {
-            return list.get(index);
+            return (T)list.get(index);
         }
 
         public synchronized int indexOf(Object o)
@@ -239,7 +237,7 @@ public class CollectionUtils
             return list.isEmpty();
         }
 
-        public synchronized Iterator iterator()
+        public synchronized Iterator<T> iterator()
         {
             return list.iterator();
         }
@@ -249,19 +247,19 @@ public class CollectionUtils
             return list.lastIndexOf(o);
         }
 
-        public synchronized ListIterator listIterator()
+        public synchronized ListIterator<T> listIterator()
         {
             return list.listIterator();
         }
 
-        public synchronized ListIterator listIterator(int index)
+        public synchronized ListIterator<T> listIterator(int index)
         {
             return list.listIterator(index);
         }
 
-        public synchronized Object remove(int index)
+        public synchronized T remove(int index)
         {
-            return list.remove(index);
+            return (T)list.remove(index);
         }
 
         public synchronized boolean remove(Object o)
@@ -279,9 +277,9 @@ public class CollectionUtils
             return list.retainAll(c);
         }
 
-        public synchronized Object set(int index, Object element)
+        public synchronized T set(int index, T element)
         {
-            return list.set(index, element);
+            return (T)list.set(index, element);
         }
 
         public synchronized int size()
@@ -289,19 +287,19 @@ public class CollectionUtils
             return list.size();
         }
 
-        public synchronized List subList(int fromIndex, int toIndex)
+        public synchronized List<T> subList(int fromIndex, int toIndex)
         {
             return list.subList(fromIndex, toIndex);
         }
 
-        public synchronized Object[] toArray()
+        public synchronized T[] toArray()
         {
-            return list.toArray();
+            return (T[])list.toArray();
         }
 
-        public synchronized Object[] toArray(Object[] a)
+        public synchronized <A> A[] toArray(A[] a)
         {
-            return list.toArray(a);
+            return (A[])list.toArray(a);
         }
 
         public synchronized void afterStore(PersistenceBroker broker) throws PersistenceBrokerException
@@ -325,8 +323,7 @@ public class CollectionUtils
         }            
     }
 
-    @SuppressWarnings("unchecked")
-    public static final List createSynchronizedList()
+    public static <T> List<T> createSynchronizedList()
     {
         // if OJB lists are to be synchronized, collection-class
         // attributes for collection-descriptor need to be set in the
@@ -341,6 +338,6 @@ public class CollectionUtils
         // Collections.synchronizedList() will not work since
         // OJB lists that are removal aware must implement the
         // ManageableCollection, IRemovalAwareCollection interfaces.
-        return new SynchronizedRemovalAwareList();
+        return new SynchronizedRemovalAwareList<T>();
     }
 }

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/FragmentPropertyList.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/FragmentPropertyList.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/FragmentPropertyList.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/FragmentPropertyList.java Sat Mar 15 15:59:17 2014
@@ -16,32 +16,32 @@
  */
 package org.apache.jetspeed.page;
 
-import java.util.List;
-
 import org.apache.jetspeed.om.page.BaseFragmentElement;
 import org.apache.jetspeed.om.page.FragmentProperty;
 
-public interface FragmentPropertyList extends List
+import java.util.List;
+
+public interface FragmentPropertyList extends List<FragmentProperty>
 {
 	/* (non-Javadoc)
 	 * @see java.util.List#add(int,java.lang.Object)
 	 */
-	public abstract void add(int index, Object element);
+	public abstract void add(int index, FragmentProperty element);
 
 	/* (non-Javadoc)
 	 * @see java.util.List#get(int)
 	 */
-	public abstract Object get(int index);
+	public abstract FragmentProperty get(int index);
 
 	/* (non-Javadoc)
 	 * @see java.util.List#remove(int)
 	 */
-	public abstract Object remove(int index);
+	public abstract FragmentProperty remove(int index);
 
 	/* (non-Javadoc)
 	 * @see java.util.List#set(int,java.lang.Object)
 	 */
-	public abstract Object set(int index, Object element);
+	public abstract FragmentProperty set(int index, FragmentProperty element);
 
 	/* (non-Javadoc)
 	 * @see java.util.List#size()
@@ -60,14 +60,14 @@ public interface FragmentPropertyList ex
 	 * 
 	 * @return fragment property list
 	 */
-	public abstract List getProperties();
+	public abstract List<FragmentProperty> getProperties();
 
 	/**
 	 * Get underlying removed fragment properties list.
 	 * 
 	 * @return removed fragment property list
 	 */
-	public abstract List getRemovedProperties();
+	public abstract List<FragmentProperty> getRemovedProperties();
 
 	/**
 	 * Find matching property.
@@ -75,8 +75,7 @@ public interface FragmentPropertyList ex
 	 * @param match match property
 	 * @return matching property
 	 */
-	public abstract FragmentProperty getMatchingProperty(
-			FragmentProperty match);
+	public abstract FragmentProperty getMatchingProperty(FragmentProperty match);
 
 	/**
 	 * Clear all transient properties.

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/page/PageManager.java Sat Mar 15 15:59:17 2014
@@ -51,6 +51,8 @@ import org.apache.jetspeed.page.document
 import org.apache.jetspeed.page.document.NodeSet;
 import org.apache.jetspeed.page.document.UnsupportedDocumentTypeException;
 
+import java.util.List;
+
 
 /**
  * This service is responsible for loading and saving Pages into
@@ -1171,5 +1173,12 @@ public interface PageManager 
      * Fragment Property lists can be manipulated with this interface 
      */
     public FragmentPropertyManagement getFragmentPropertyManager();
-    
+
+    /**
+     * Create list suitable for list model members.
+     *
+     * @param <T> list element type
+     * @return list
+     */
+    public <T> List<T> createList();
 }

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/Menu.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/Menu.java?rev=1577887&r1=1577886&r2=1577887&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/Menu.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/Menu.java Sat Mar 15 15:59:17 2014
@@ -71,7 +71,7 @@ public interface Menu extends MenuElemen
      *
      * @return menu elements list
      */
-    List getElements();
+    List<MenuElement> getElements();
 
     /**
      * isEmpty - get empty state of list of menu elements



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