portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r1578106 - in /portals/jetspeed-2/portal/trunk/components: jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/ jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/ jetspeed-page-manager/src/main/java/org/apache...
Date Sun, 16 Mar 2014 15:39:03 GMT
Author: rwatler
Date: Sun Mar 16 15:39:02 2014
New Revision: 1578106

URL: http://svn.apache.org/r1578106
Log:
JS2-874: Generics conversion for collections that did not flag unchecked warnings.

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/BaseFragmentPropertyImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/SecurityConstraintImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/SecurityConstraintsRefParser.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintsImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/AbstractBaseFragmentElement.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/SecurityConstraintsImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/PageManagerSecurityUtils.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/util/ojb/ACLFieldConversion.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestCastorXmlPageManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestDatabasePageManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestSecureDatabasePageManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestTransactions.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/page/document/proxy/NodeProxy.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/PhysicalSiteView.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteView.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteViewUtils.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/BaseFragmentPropertyImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/BaseFragmentPropertyImpl.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/BaseFragmentPropertyImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/BaseFragmentPropertyImpl.java Sun Mar 16 15:39:02 2014
@@ -49,13 +49,13 @@ public abstract class BaseFragmentProper
      * @param globalValue returned global value
      * @return value found flag
      */
-    public static boolean getFragmentProperty(String propName, List properties, String [] userValue, String [] groupValue, String [] roleValue, String [] globalValue)
+    public static boolean getFragmentProperty(String propName, List<FragmentProperty> properties, String [] userValue, String [] groupValue, String [] roleValue, String [] globalValue)
     {
         boolean valueFound = false;
         
         // iterate through properties list and merge with current
         // principals to determine most specific property value
-        Set principals = null;
+        Set<Principal> principals = null;
         Principal userPrincipal = null;
         boolean skipPropertyScopes = false;
         Iterator propertiesIter = properties.iterator();
@@ -159,7 +159,7 @@ public abstract class BaseFragmentProper
         
         // iterate through properties list and merge with current
         // principals to determine most specific property value
-        Set principals = null;
+        Set<Principal> principals = null;
         Principal userPrincipal = null;
         boolean skipPropertyScopes = false;
         Iterator propertiesIter = properties.iterator();
@@ -238,7 +238,7 @@ public abstract class BaseFragmentProper
      * @param properties fragment properties list
      * @return fragment property
      */
-    public static FragmentProperty findFragmentProperty(String propName, String propScope, String propScopeValue, List properties)
+    public static FragmentProperty findFragmentProperty(String propName, String propScope, String propScopeValue, List<FragmentProperty> properties)
     {
         // iterate through properties to find specified scoped property
         FragmentProperty fragmentProperty = null;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/SecurityConstraintImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/SecurityConstraintImpl.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/SecurityConstraintImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/SecurityConstraintImpl.java Sun Mar 16 15:39:02 2014
@@ -304,7 +304,7 @@ public class SecurityConstraintImpl impl
      * @param allowDefault
      * @return match result
      */
-    public boolean principalsMatch(List userPrincipals, List rolePrincipals, List groupPrincipals, boolean allowDefault)
+    public boolean principalsMatch(List<String> userPrincipals, List<String> rolePrincipals, List<String> groupPrincipals, boolean allowDefault)
     {
         // test match using users, roles, and groups list members
         // since these are the master representation in this impl
@@ -411,7 +411,7 @@ public class SecurityConstraintImpl impl
      * @param collection1
      * @return contains any result.
      */
-    public static boolean containsAny(Collection collection0, Collection collection1)
+    public static boolean containsAny(Collection<String> collection0, Collection<String> collection1)
     {
         if ((collection0 != null) && (collection1 != null))
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/SecurityConstraintsRefParser.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/SecurityConstraintsRefParser.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/SecurityConstraintsRefParser.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/SecurityConstraintsRefParser.java Sun Mar 16 15:39:02 2014
@@ -52,7 +52,7 @@ public class SecurityConstraintsRefParse
     public static Object parse(String constraintsRef, PageSecurity pageSecurity)
     {
         // parse infix constraints ref expression into postfix tokens
-        List postfixTokens = parseConstraintsRef(constraintsRef);
+        List<String> postfixTokens = parseConstraintsRef(constraintsRef);
         if (postfixTokens.isEmpty())
         {
             return null;
@@ -60,7 +60,7 @@ public class SecurityConstraintsRefParse
 
         // single reference expression check
         if (postfixTokens.size() == 1) {
-            String postfixToken = (String)postfixTokens.get(0);
+            String postfixToken = postfixTokens.get(0);
             if (!postfixToken.equals(AND_OPERATION) && !postfixToken.equals(OR_OPERATION) && !postfixToken.equals(NOT_OPERATION))
             {
                 // return definition security constraints
@@ -128,7 +128,7 @@ public class SecurityConstraintsRefParse
      * @return list of postfix expression token strings.
      * @throws RuntimeException if expression parsing error occurs
      */
-    static List parseConstraintsRef(String constraintsRef)
+    static List<String> parseConstraintsRef(String constraintsRef)
     {
         List<String> postfixTokens = new ArrayList<String>();
         Stack<String> infixToPostfixStack = new Stack<String>();

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintsImpl.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/SecurityConstraintsImpl.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintsImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/SecurityConstraintsImpl.java Sun Mar 16 15:39:02 2014
@@ -130,7 +130,7 @@ public class SecurityConstraintsImpl imp
         try
         {
             // skip missing or empty constraints: permit all access
-            List checkConstraints = getAllSecurityConstraints(pageSecurity);
+            List<Object> checkConstraints = getAllSecurityConstraints(pageSecurity);
             if ((checkConstraints != null) && !checkConstraints.isEmpty())
             {
                 // test each action, constraints check passes only

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/AbstractBaseFragmentElement.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/AbstractBaseFragmentElement.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/AbstractBaseFragmentElement.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/AbstractBaseFragmentElement.java Sun Mar 16 15:39:02 2014
@@ -732,7 +732,7 @@ public abstract class AbstractBaseFragme
      * 
      * @return properties collection
      */
-    public List getPropertyImpls()
+    public List<FragmentProperty> getPropertyImpls()
     {
         return propertyImpls;
     }
@@ -742,7 +742,7 @@ public abstract class AbstractBaseFragme
      * 
      * @param propertiesImpls properties collection
      */
-    public void setPropertyImpls(List propertiesImpls)
+    public void setPropertyImpls(List<FragmentProperty> propertiesImpls)
     {
         this.propertyImpls = propertyImpls;  
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/SecurityConstraintsImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/SecurityConstraintsImpl.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/SecurityConstraintsImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/psml/SecurityConstraintsImpl.java Sun Mar 16 15:39:02 2014
@@ -176,7 +176,7 @@ public class SecurityConstraintsImpl imp
         try
         {
             // skip missing or empty constraints: permit all access
-            List checkConstraints = getAllSecurityConstraints(pageSecurity);
+            List<Object> checkConstraints = getAllSecurityConstraints(pageSecurity);
             if ((checkConstraints != null) && !checkConstraints.isEmpty())
             {
                 // test each action, constraints check passes only
@@ -310,7 +310,7 @@ public class SecurityConstraintsImpl imp
         // add any global decurity constraints references
         if (pageSecurity != null)
         {
-            List globalConstraintsRefs = pageSecurity.getGlobalSecurityConstraintsRefs();
+            List<String> globalConstraintsRefs = pageSecurity.getGlobalSecurityConstraintsRefs();
             if ((globalConstraintsRefs != null) && !globalConstraintsRefs.isEmpty())
             {
                 List<Object> referencedConstraints = dereferenceSecurityConstraintsRefs(globalConstraintsRefs, pageSecurity);
@@ -334,7 +334,7 @@ public class SecurityConstraintsImpl imp
      * @return security constraints and constraints ref expressions
      * @throws RuntimeException if expression parsing error occurs
      */
-    private List<Object> dereferenceSecurityConstraintsRefs(List constraintsRefs, PageSecurity pageSecurity)
+    private List<Object> dereferenceSecurityConstraintsRefs(List<String> constraintsRefs, PageSecurity pageSecurity)
     {
         // access security document to dereference security
         // constraints definitions

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/PageManagerSecurityUtils.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/PageManagerSecurityUtils.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/PageManagerSecurityUtils.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/PageManagerSecurityUtils.java Sun Mar 16 15:39:02 2014
@@ -17,6 +17,7 @@
 package org.apache.jetspeed.page;
 
 import org.apache.jetspeed.JetspeedActions;
+import org.apache.jetspeed.om.common.SecurityConstraint;
 import org.apache.jetspeed.om.page.SecurityConstraintImpl;
 import org.apache.jetspeed.om.page.SecurityConstraintsDef;
 import org.apache.jetspeed.page.document.DocumentException;
@@ -120,6 +121,7 @@ public class PageManagerSecurityUtils
         }
         return result;
     }
+
     /**
      * check access for the constraints list of a security constraints definition
      * 
@@ -130,14 +132,10 @@ public class PageManagerSecurityUtils
      * @param def the security constraint definition 
      * @throws SecurityException
      */
-    public static boolean checkConstraints(List actions, List userPrincipals, List rolePrincipals, List groupPrincipals, SecurityConstraintsDef def) 
+    public static boolean checkConstraints(List<String> actions, List<String> userPrincipals, List<String> rolePrincipals, List<String> groupPrincipals, SecurityConstraintsDef def)
     throws DocumentException
     {
-        
-        List checkConstraints = def.getSecurityConstraints();
-            // SecurityConstraint c =(SecurityConstraint)constraints.next();
-        // skip missing or empty constraints: permit all access
-        //List checkConstraints = getAllSecurityConstraints(pageSecurity);
+        List<SecurityConstraint> checkConstraints = def.getSecurityConstraints();
         if ((checkConstraints != null) && !checkConstraints.isEmpty())
         {
             // test each action, constraints check passes only
@@ -146,7 +144,7 @@ public class PageManagerSecurityUtils
             while (actionsIter.hasNext())
             {
                 // check each action:
-                // - if any actions explicity permitted, (including owner),
+                // - if any actions explicitly permitted, (including owner),
                 //   assume no permissions are permitted by default
                 // - if all constraints do not specify a permission, assume
                 //   access is permitted by default
@@ -189,19 +187,16 @@ public class PageManagerSecurityUtils
                 // fail if any action not permitted
                 if ((!actionPermitted && anyActionsPermitted) || actionNotPermitted)
                 {
-                    //throw new SecurityException("SecurityConstraintsImpl.checkConstraints(): Access for " + action + " not permitted.");
                     return false;
                 }
             }
         }
         else
         {
-            // fail for any action if owner specified
-            // since no other constraints were found
-            if (/*(getOwner() != null) && */ !actions.isEmpty())
+            // fail if no constraints were found and
+            // actions specified
+            if (!actions.isEmpty())
             {
-                //String action = (String)actions.get(0);
-                //throw new SecurityException("SecurityConstraintsImpl.checkConstraints(): Access for " + action + " not permitted, (not owner).");
                 return false;
             }
         }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManager.java Sun Mar 16 15:39:02 2014
@@ -2748,7 +2748,7 @@ public class DatabasePageManager extends
             {
                 if (GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED)
                 {
-                    Set principals = subject.getPrincipals();
+                    Set<Principal> principals = subject.getPrincipals();
                     Iterator principalsIter = principals.iterator();
                     while (principalsIter.hasNext())
                     {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/impl/DatabasePageManagerCache.java Sun Mar 16 15:39:02 2014
@@ -500,7 +500,8 @@ public class DatabasePageManagerCache im
     private static void clearPrincipalPropertiesCache(int fragmentId)
     {
         // scan principal fragment property cache
-        List principalKeys = principalPropertiesCache.getKeys();
+        @SuppressWarnings("unchecked")
+        List<String> principalKeys = principalPropertiesCache.getKeys();
         Iterator principalKeysIter = principalKeys.iterator();
         while (principalKeysIter.hasNext())
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/util/ojb/ACLFieldConversion.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/util/ojb/ACLFieldConversion.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/util/ojb/ACLFieldConversion.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/util/ojb/ACLFieldConversion.java Sun Mar 16 15:39:02 2014
@@ -42,7 +42,8 @@ public class ACLFieldConversion implemen
     {
         if (arg0 instanceof List)
         {
-            List csvList = (List) arg0;
+            @SuppressWarnings("unchecked")
+            List<String> csvList = (List)arg0;
             if (csvList.size() > 1)
             {
                 StringBuffer buffer = null;

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=1578106&r1=1578105&r2=1578106&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 Sun Mar 16 15:39:02 2014
@@ -42,6 +42,7 @@ import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.om.page.PageFragment;
 import org.apache.jetspeed.om.page.PageTemplate;
 import org.apache.jetspeed.om.portlet.GenericMetadata;
+import org.apache.jetspeed.om.portlet.LocalizedField;
 import org.apache.jetspeed.om.preference.FragmentPreference;
 import org.apache.jetspeed.page.document.DocumentNotFoundException;
 import org.apache.jetspeed.page.psml.CastorXmlPageManager;
@@ -209,8 +210,8 @@ public class TestCastorXmlPageManager ex
         assertTrue(testpage.getVersion().equals("2.77"));
 
         GenericMetadata md = testpage.getMetadata();
-        Collection descriptions = md.getFields("description");
-        Collection subjects = md.getFields("subject");
+        Collection<LocalizedField> descriptions = md.getFields("description");
+        Collection<LocalizedField> subjects = md.getFields("subject");
         assertEquals(2, descriptions.size());
         assertEquals(1, subjects.size());
 
@@ -223,7 +224,7 @@ public class TestCastorXmlPageManager ex
         assertTrue(root.getType().equals(Fragment.LAYOUT));
         assertNull(root.getDecorator());
 
-        List children = root.getFragments();
+        List<BaseFragmentElement> children = root.getFragments();
         assertNotNull(children);
         assertTrue(children.size() == 4);
 
@@ -232,7 +233,7 @@ public class TestCastorXmlPageManager ex
         assertTrue(f.getName().equals("HelloPortlet"));
         assertTrue(f.getType().equals(Fragment.PORTLET));
 
-        List properties = f.getProperties();
+        List<FragmentProperty> properties = f.getProperties();
         assertNotNull(properties);
         assertEquals(11, properties.size());
         assertEquals("0", f.getProperty(Fragment.ROW_PROPERTY_NAME));
@@ -261,7 +262,7 @@ public class TestCastorXmlPageManager ex
                 try
                 {
                     assertTrue(userFragment.getId().equals("pe001"));
-                    List properties = userFragment.getProperties();
+                    List<FragmentProperty> properties = userFragment.getProperties();
                     assertNotNull(properties);
                     assertEquals((FragmentProperty.GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED ? 17 : 12), properties.size());
                     assertEquals("0", userFragment.getProperty(Fragment.ROW_PROPERTY_NAME));
@@ -310,20 +311,20 @@ public class TestCastorXmlPageManager ex
             throw userException;
         }
 
-        List preferences = f.getPreferences();
+        List<FragmentPreference> preferences = f.getPreferences();
         assertNotNull(preferences);
         assertTrue(preferences.size() == 2);
-        assertEquals("pref0", ((FragmentPreference)preferences.get(0)).getName());
-        assertTrue(((FragmentPreference)preferences.get(0)).isReadOnly());
-        assertNotNull(((FragmentPreference)preferences.get(0)).getValueList());
-        assertEquals(2, ((FragmentPreference)preferences.get(0)).getValueList().size());
-        assertEquals("pref0-value0", (String)((FragmentPreference)preferences.get(0)).getValueList().get(0));
-        assertEquals("pref0-value1", (String)((FragmentPreference)preferences.get(0)).getValueList().get(1));
-        assertEquals("pref1", ((FragmentPreference)preferences.get(1)).getName());
-        assertFalse(((FragmentPreference)preferences.get(1)).isReadOnly());
-        assertNotNull(((FragmentPreference)preferences.get(1)).getValueList());
-        assertEquals(1, ((FragmentPreference)preferences.get(1)).getValueList().size());
-        assertEquals("pref1-value", (String)((FragmentPreference)preferences.get(1)).getValueList().get(0));
+        assertEquals("pref0", preferences.get(0).getName());
+        assertTrue(preferences.get(0).isReadOnly());
+        assertNotNull(preferences.get(0).getValueList());
+        assertEquals(2, preferences.get(0).getValueList().size());
+        assertEquals("pref0-value0", preferences.get(0).getValueList().get(0));
+        assertEquals("pref0-value1", preferences.get(0).getValueList().get(1));
+        assertEquals("pref1", preferences.get(1).getName());
+        assertFalse(preferences.get(1).isReadOnly());
+        assertNotNull(preferences.get(1).getValueList());
+        assertEquals(1, preferences.get(1).getValueList().size());
+        assertEquals("pref1-value", preferences.get(1).getValueList().get(0));
 
         f = (Fragment) children.get(1);
         assertTrue(f.getId().equals("pe002"));
@@ -353,13 +354,13 @@ public class TestCastorXmlPageManager ex
         assertTrue(fr.getId().equals("f003"));
         assertTrue(fr.getRefId().equals("test001"));
 
-        List fragments = testpage.getFragmentsByName("JMXPortlet");
+        List<BaseFragmentElement> fragments = testpage.getFragmentsByName("JMXPortlet");
         assertNotNull(fragments);
         assertEquals(1, fragments.size());
         assertTrue(((Fragment)fragments.get(0)).getId().equals("pe002"));
         assertTrue(((Fragment)fragments.get(0)).getName().equals("JMXPortlet"));
         assertTrue(((Fragment)fragments.get(0)).getType().equals(Fragment.PORTLET));
-        List fragmentsByInterface = testpage.getFragmentsByInterface(null);
+        List<BaseFragmentElement> fragmentsByInterface = testpage.getFragmentsByInterface(null);
         assertNotNull(fragmentsByInterface);
         assertEquals(7, fragmentsByInterface.size());
         fragmentsByInterface = testpage.getFragmentsByInterface(FragmentReference.class);
@@ -1105,11 +1106,11 @@ public class TestCastorXmlPageManager ex
         // test folder resident menu definitions
         Folder folder = pageManager.getFolder("/");
         assertNotNull(folder);
-        List menus = folder.getMenuDefinitions();
+        List<MenuDefinition> menus = folder.getMenuDefinitions();
         assertNotNull(menus);
         assertEquals(5, menus.size());
 
-        MenuDefinition simpleMenu = (MenuDefinition)menus.get(0);
+        MenuDefinition simpleMenu = menus.get(0);
         assertNotNull(simpleMenu);
         assertEquals("simple", simpleMenu.getName());
         assertNotNull(simpleMenu.getMenuElements());
@@ -1117,7 +1118,7 @@ public class TestCastorXmlPageManager ex
         assertTrue(simpleMenu.getMenuElements().get(0) instanceof MenuOptionsDefinition);
         assertEquals("/test001.psml,/folder1/folder2", ((MenuOptionsDefinition)simpleMenu.getMenuElements().get(0)).getOptions());
 
-        MenuDefinition top2LevelsMenu = (MenuDefinition)menus.get(1);
+        MenuDefinition top2LevelsMenu = menus.get(1);
         assertNotNull(top2LevelsMenu);
         assertEquals("top-2-levels", top2LevelsMenu.getName());
         assertNull(top2LevelsMenu.getMenuElements());
@@ -1125,19 +1126,19 @@ public class TestCastorXmlPageManager ex
         assertEquals(2, top2LevelsMenu.getDepth());
         assertEquals("dhtml-pull-down", top2LevelsMenu.getSkin());
 
-        MenuDefinition topRolePagesMenu = (MenuDefinition)menus.get(2);
+        MenuDefinition topRolePagesMenu = menus.get(2);
         assertNotNull(topRolePagesMenu);
         assertEquals("top-role-pages", topRolePagesMenu.getName());
         assertTrue(topRolePagesMenu.isRegexp());
         assertEquals("roles", topRolePagesMenu.getProfile());
         assertEquals("*.psml,*.link", topRolePagesMenu.getOrder());
 
-        MenuDefinition breadCrumbsMenu = (MenuDefinition)menus.get(3);
+        MenuDefinition breadCrumbsMenu = menus.get(3);
         assertNotNull(breadCrumbsMenu);
         assertEquals("bread-crumbs", breadCrumbsMenu.getName());
         assertTrue(breadCrumbsMenu.isPaths());
 
-        MenuDefinition topCustomMenu = (MenuDefinition)menus.get(4);
+        MenuDefinition topCustomMenu = menus.get(4);
         assertNotNull(topCustomMenu);
         assertEquals("top-custom", topCustomMenu.getName());
         assertEquals("Top Menu", topCustomMenu.getTitle());
@@ -1187,7 +1188,7 @@ public class TestCastorXmlPageManager ex
         assertNotNull(menus);
         assertEquals(1, menus.size());
 
-        simpleMenu = (MenuDefinition)menus.get(0);
+        simpleMenu = menus.get(0);
         assertNotNull(simpleMenu);
         assertEquals("simple", simpleMenu.getName());
         assertNotNull(simpleMenu.getMenuElements());
@@ -1236,14 +1237,14 @@ public class TestCastorXmlPageManager ex
         page = pageManager.getPage("/test002.psml");
         assertNotNull(page.getMenuDefinitions());
         assertEquals(1, page.getMenuDefinitions().size());
-        assertNotNull(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements());
-        assertEquals(6,((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().size());
-        assertTrue(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().get(0) instanceof MenuSeparatorDefinition);
-        assertTrue(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().get(1) instanceof MenuOptionsDefinition);
-        assertTrue(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().get(2) instanceof MenuOptionsDefinition);
-        assertTrue(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().get(3) instanceof MenuDefinition);
-        assertTrue(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().get(4) instanceof MenuExcludeDefinition);
-        assertTrue(((MenuDefinition)page.getMenuDefinitions().get(0)).getMenuElements().get(5) instanceof MenuIncludeDefinition);
+        assertNotNull(page.getMenuDefinitions().get(0).getMenuElements());
+        assertEquals(6, page.getMenuDefinitions().get(0).getMenuElements().size());
+        assertTrue(page.getMenuDefinitions().get(0).getMenuElements().get(0) instanceof MenuSeparatorDefinition);
+        assertTrue(page.getMenuDefinitions().get(0).getMenuElements().get(1) instanceof MenuOptionsDefinition);
+        assertTrue(page.getMenuDefinitions().get(0).getMenuElements().get(2) instanceof MenuOptionsDefinition);
+        assertTrue(page.getMenuDefinitions().get(0).getMenuElements().get(3) instanceof MenuDefinition);
+        assertTrue(page.getMenuDefinitions().get(0).getMenuElements().get(4) instanceof MenuExcludeDefinition);
+        assertTrue(page.getMenuDefinitions().get(0).getMenuElements().get(5) instanceof MenuIncludeDefinition);
 
         // test writing folder menu definitions
         folder = pageManager.getFolder("/folder2");
@@ -1268,9 +1269,9 @@ public class TestCastorXmlPageManager ex
         folder = pageManager.getFolder("/folder2");
         assertNotNull(folder.getMenuDefinitions());
         assertEquals(1, folder.getMenuDefinitions().size());
-        assertEquals("updated-menu", ((MenuDefinition)folder.getMenuDefinitions().get(0)).getName());
-        assertEquals("bread-crumbs", ((MenuDefinition)folder.getMenuDefinitions().get(0)).getSkin());
-        assertEquals("./", ((MenuDefinition)folder.getMenuDefinitions().get(0)).getOptions());
+        assertEquals("updated-menu", folder.getMenuDefinitions().get(0).getName());
+        assertEquals("bread-crumbs", folder.getMenuDefinitions().get(0).getSkin());
+        assertEquals("./", folder.getMenuDefinitions().get(0).getOptions());
     }
 
     public void testRemovePage() throws Exception
@@ -1460,8 +1461,8 @@ public class TestCastorXmlPageManager ex
         assertTrue(cloneRoot.getType().equals(Fragment.LAYOUT));
         assertNull(cloneRoot.getDecorator());
 
-        List children = root.getFragments();
-        List cloneChildren = cloneRoot.getFragments();
+        List<BaseFragmentElement> children = root.getFragments();
+        List<BaseFragmentElement> cloneChildren = cloneRoot.getFragments();
         assertNotNull(cloneChildren);
         assertTrue(cloneChildren.size() == 3);
 
@@ -1472,8 +1473,8 @@ public class TestCastorXmlPageManager ex
         assertTrue(cf.getName().equals("HelloPortlet"));
         assertTrue(cf.getType().equals(Fragment.PORTLET));
 
-        List properties = f.getProperties();
-        List cloneProperties = cf.getProperties();
+        List<FragmentProperty> properties = f.getProperties();
+        List<FragmentProperty> cloneProperties = cf.getProperties();
 
         assertNotNull(cloneProperties);
         assertEquals(3, cloneProperties.size());
@@ -1495,7 +1496,7 @@ public class TestCastorXmlPageManager ex
         assertEquals("0", cf.getProperty(Fragment.ROW_PROPERTY_NAME));
         assertEquals(1, cf.getIntProperty(Fragment.COLUMN_PROPERTY_NAME));
 
-        BaseFragmentElement bf = (BaseFragmentElement)cloneChildren.get(2);
+        BaseFragmentElement bf = cloneChildren.get(2);
         assertTrue(bf instanceof Fragment);
         cf = (Fragment)bf;
         String id = cf.getId();
@@ -1516,10 +1517,10 @@ public class TestCastorXmlPageManager ex
         SecurityConstraints constraints = clone.getSecurityConstraints();
         assertNotNull(constraints); 
         assertTrue(constraints.getOwner().equals("new-user"));
-        List secs = constraints.getSecurityConstraints();
+        List<SecurityConstraint> secs = constraints.getSecurityConstraints();
         assertNotNull(secs);
         assertTrue(secs.size() == 1);
-        SecurityConstraint constraint = (SecurityConstraint)secs.get(0);
+        SecurityConstraint constraint = secs.get(0);
         assertNotNull(constraint);
         assertTrue(constraint.getUsers() != null);
         assertTrue(constraint.getUsers().size() == 2);
@@ -1530,10 +1531,10 @@ public class TestCastorXmlPageManager ex
         assertTrue(constraint.getPermissions() != null);
         assertTrue(constraint.getPermissions().size() == 2);
         assertTrue(Shared.makeCSVFromList(constraint.getPermissions()).equals("edit,view"));
-        List refs = constraints.getSecurityConstraintsRefs();
+        List<String> refs = constraints.getSecurityConstraintsRefs();
         assertNotNull(refs);
         assertTrue(refs.size() == 1);
-        String ref = (String)refs.get(0);
+        String ref = refs.get(0);
         assertNotNull(ref);
         assertTrue(ref.equals("public-view"));
         
@@ -1549,7 +1550,7 @@ public class TestCastorXmlPageManager ex
         assertTrue(clonepagetemplate.getDefaultDecorator(Fragment.LAYOUT).equals("test-template-layout"));
         assertTrue(clonepagetemplate.getDefaultDecorator(Fragment.PORTLET).equals("test-template-portlet"));
         GenericMetadata md = clonepagetemplate.getMetadata();
-        Collection descriptions = md.getFields("description");
+        Collection<LocalizedField> descriptions = md.getFields("description");
         assertNotNull(descriptions);
         assertEquals(1, descriptions.size());
         rootFragmentElement = clonepagetemplate.getRootFragment();
@@ -1565,11 +1566,11 @@ public class TestCastorXmlPageManager ex
         assertFalse(f.getId().equals("cpt-f002"));
         assertTrue(f.getName().equals("TemplatePortlet"));
         assertTrue(f.getType().equals(Fragment.PORTLET));
-        bf = (BaseFragmentElement)root.getFragments().get(1);
+        bf = root.getFragments().get(1);
         assertTrue(bf instanceof PageFragment);
         PageFragment pf = (PageFragment)bf;
         assertFalse(pf.getId().equals("cpt-f003"));
-        bf = (BaseFragmentElement)root.getFragments().get(2);
+        bf = root.getFragments().get(2);
         assertTrue(bf instanceof FragmentReference);
         FragmentReference fr = (FragmentReference)bf;
         assertFalse(fr.getId().equals("cpt-f004"));
@@ -1596,7 +1597,7 @@ public class TestCastorXmlPageManager ex
         assertFalse(f.getId().equals("cdp-f002"));
         assertTrue(f.getName().equals("HelloPortlet"));
         assertTrue(f.getType().equals(Fragment.PORTLET));
-        bf = (BaseFragmentElement)root.getFragments().get(1);
+        bf = root.getFragments().get(1);
         assertTrue(bf instanceof FragmentReference);
         fr = (FragmentReference)bf;
         assertFalse(fr.getId().equals("cdp-f003"));
@@ -1702,7 +1703,7 @@ public class TestCastorXmlPageManager ex
         
         compareFolders(webappIds,webappNoIds);
         
-        Collection allIds = collectIds(webappNoIds); 
+        Collection<String> allIds = collectIds(webappNoIds);
         for (Iterator iter = allIds.iterator(); iter.hasNext();) {
 			String id = (String) iter.next();
 			assertNotNull(id);

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=1578106&r1=1578105&r2=1578106&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 Sun Mar 16 15:39:02 2014
@@ -879,7 +879,7 @@ public class TestDatabasePageManager ext
                 {
                     try
                     {
-                        List properties = checkUserFragment.getProperties();
+                        List<FragmentProperty> properties = checkUserFragment.getProperties();
                         assertNotNull(properties);
                         assertEquals((FragmentProperty.GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED ? 12 : 7), properties.size());
                         assertEquals("50%,50%", checkUserFragment.getProperty(Fragment.SIZES_PROPERTY_NAME));

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestSecureDatabasePageManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestSecureDatabasePageManager.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestSecureDatabasePageManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestSecureDatabasePageManager.java Sun Mar 16 15:39:02 2014
@@ -49,13 +49,13 @@ public class TestSecureDatabasePageManag
     public void testSecurePageManager() throws Exception
     {
         // utilize standard secure page manager test
-        PageManager pageManager = (PageManager)scm.getComponent("pageManager");
+        PageManager pageManager = scm.lookupComponent("pageManager");
         Shared.testSecurePageManager(this, pageManager);
     }
 
     public void testSecurityConstraintsRefExpressions() throws Exception
     {
-        PageManager pageManager = (PageManager)scm.getComponent("pageManager");
+        PageManager pageManager = scm.lookupComponent("pageManager");
         if (pageManager.getConstraintsEnabled())
         {
             // utilize standard secure page manager test

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=1578106&r1=1578105&r2=1578106&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 Sun Mar 16 15:39:02 2014
@@ -53,7 +53,7 @@ public class TestTransactions extends  D
 
     public void testTx() throws Exception
     {
-         PageManager pageManager = (PageManager)scm.getComponent("pageManager");
+        PageManager pageManager = scm.lookupComponent("pageManager");
 
         if (pageManager.folderExists("/"))
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/proxy/FolderProxy.java Sun Mar 16 15:39:02 2014
@@ -1172,7 +1172,7 @@ public class FolderProxy extends NodePro
             // document order or strict collation order
             if (allChildren.size() > 1)
             {
-                final List order = folderDocumentOrder;
+                final List<String> order = folderDocumentOrder;
                 Comparator<Node> comparator = new Comparator<Node>()
                     {
                         public int compare(Node proxyNode1, Node proxyNode2)
@@ -1227,7 +1227,7 @@ public class FolderProxy extends NodePro
      * @return list containing concrete search folders in folder view
      * @throws FolderNotFoundException
      */
-    private List getSearchFolders() throws FolderNotFoundException
+    private List<SearchFolder> getSearchFolders() throws FolderNotFoundException
     {
         // latently aggregate search folders
         if (searchFolders == null)
@@ -1289,7 +1289,7 @@ public class FolderProxy extends NodePro
      * @return list containing concrete inheritance folders in folder view
      * @throws FolderNotFoundException
      */
-    private List getInheritanceFolders() throws FolderNotFoundException
+    private List<InheritanceFolder> getInheritanceFolders() throws FolderNotFoundException
     {
         // latently aggregate inheritance folders
         if (inheritanceFolders == null)
@@ -1300,7 +1300,7 @@ public class FolderProxy extends NodePro
             // folder to the proxy root to create the inheritance
             // graph folder list
             FolderProxy folder = this;
-            List searchFolders = folder.getSearchFolders();
+            List<SearchFolder> searchFolders = folder.getSearchFolders();
             if (getParent() != null)
             {
                 inheritanceFolders = new ArrayList<InheritanceFolder>(searchFolders.size() * 2);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/page/document/proxy/NodeProxy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/page/document/proxy/NodeProxy.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/page/document/proxy/NodeProxy.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/page/document/proxy/NodeProxy.java Sun Mar 16 15:39:02 2014
@@ -206,7 +206,7 @@ public abstract class NodeProxy extends 
         // aggregated menu definition locators
         if (! menuDefinitionsAggregated)
         {
-            List locators = getMenuDefinitionLocators();
+            List<SiteViewMenuDefinitionLocator> locators = getMenuDefinitionLocators();
             if (locators != null)
             {
                 menuDefinitions = Collections.synchronizedList(new ArrayList<MenuDefinition>(locators.size()));
@@ -278,7 +278,7 @@ public abstract class NodeProxy extends 
     public SiteViewMenuDefinitionLocator getMenuDefinitionLocator(String name)
     {
         // get menu definition locators and find by name
-        List locators = getMenuDefinitionLocators();
+        List<SiteViewMenuDefinitionLocator> locators = getMenuDefinitionLocators();
         if (locators != null)
         {
             return SiteViewUtils.findMenuDefinitionLocator(locators, name);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/PhysicalSiteView.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/PhysicalSiteView.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/PhysicalSiteView.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/PhysicalSiteView.java Sun Mar 16 15:39:02 2014
@@ -180,7 +180,7 @@ public class PhysicalSiteView extends Ab
     public SiteViewMenuDefinitionLocator getMenuDefinitionLocator(Node node, String name)
     {
         // get menu definition locators and find by name
-        List locators = getMenuDefinitionLocators(node);
+        List<SiteViewMenuDefinitionLocator> locators = getMenuDefinitionLocators(node);
         if (locators != null)
         {
             return SiteViewUtils.findMenuDefinitionLocator(locators, name);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteView.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteView.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteView.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteView.java Sun Mar 16 15:39:02 2014
@@ -300,7 +300,7 @@ public class SearchPathsSiteView extends
      * @param searchPaths string of comma separated search paths
      * @return search path list
      */
-    private static List makeSearchPathList(String searchPaths)
+    private static List<String> makeSearchPathList(String searchPaths)
     {
         return ((searchPaths != null) ? makeSearchPathList(searchPaths.split(",")) : null);
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteViewUtils.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteViewUtils.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteViewUtils.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteViewUtils.java Sun Mar 16 15:39:02 2014
@@ -122,7 +122,7 @@ public class SiteViewUtils
      * @param name menu definition name
      * @return contains name result
      */
-    public static boolean menuDefinitionLocatorsContains(List menuDefinitionLocators, String name)
+    public static boolean menuDefinitionLocatorsContains(List<SiteViewMenuDefinitionLocator> menuDefinitionLocators, String name)
     {
         // test for matching name in menu definition locators
         return (findMenuDefinitionLocator(menuDefinitionLocators, name) != null);
@@ -135,7 +135,7 @@ public class SiteViewUtils
      * @param name menu definition name
      * @return menu definition locator
      */
-    public static SiteViewMenuDefinitionLocator findMenuDefinitionLocator(List menuDefinitionLocators, String name)
+    public static SiteViewMenuDefinitionLocator findMenuDefinitionLocator(List<SiteViewMenuDefinitionLocator> menuDefinitionLocators, String name)
     {
         // find matching menu definition locator by name
         if ((menuDefinitionLocators != null) && (name != null))

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java?rev=1578106&r1=1578105&r2=1578106&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java Sun Mar 16 15:39:02 2014
@@ -29,6 +29,7 @@ import org.apache.jetspeed.om.page.Link;
 import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.om.page.PageTemplate;
 import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.page.document.Node;
 import org.apache.jetspeed.page.document.NodeNotFoundException;
 import org.apache.jetspeed.page.document.NodeSet;
 import org.apache.jetspeed.page.document.proxy.NodeProxy;
@@ -245,15 +246,15 @@ public class TestPortalSite extends Abst
         catch (NodeNotFoundException nnfe)
         {
         }
-        List rootPageViewsByPath = baseView.getNodeViews("/page?.psml", null, null, true, false, false);
+        List<Node> rootPageViewsByPath = baseView.getNodeViews("/page?.psml", null, null, true, false, false);
         assertNotNull(rootPageViewsByPath);
         assertEquals(3,rootPageViewsByPath.size());
         assertTrue(rootPageViewsByPath.contains(rootPage0View));
-        List rootFolderViewsByPath = baseView.getNodeViews("/*/", null, null, true, false, false);
+        List<Node> rootFolderViewsByPath = baseView.getNodeViews("/*/", null, null, true, false, false);
         assertNotNull(rootFolderViewsByPath);
         assertEquals(6,rootFolderViewsByPath.size());
         assertTrue(rootFolderViewsByPath.contains(rootFolder0View));
-        List folderPageViewsByPath = baseView.getNodeViews("*/p*[0-9].psml", rootFolderView, null, true, false, false);
+        List<Node> folderPageViewsByPath = baseView.getNodeViews("*/p*[0-9].psml", rootFolderView, null, true, false, false);
         assertNotNull(folderPageViewsByPath);
         assertEquals(2,folderPageViewsByPath.size());
         assertTrue(folderPageViewsByPath.contains(folder0Page0View));
@@ -275,7 +276,7 @@ public class TestPortalSite extends Abst
         assertEquals(rootFolderView, rootPage0View.getParent());
         assertEquals("page0.psml", rootPage0View.getName());
         assertEquals("/page0.psml", extractFileSystemPathFromId(rootPage0View.getId()));
-        List rootPage0ViewMenus = rootPage0View.getMenuDefinitions();
+        List<MenuDefinition> rootPage0ViewMenus = rootPage0View.getMenuDefinitions();
         assertNotNull(rootPage0ViewMenus);
         assertEquals(7 + aggregateView.getStandardMenuNames().size(), rootPage0ViewMenus.size());
         Iterator menusIter = rootPage0ViewMenus.iterator();
@@ -311,7 +312,7 @@ public class TestPortalSite extends Abst
         assertEquals(rootFolderView, rootPage2View.getParent());
         assertEquals("page2.psml", rootPage2View.getName());
         assertEquals("/_user/user/page2.psml", extractFileSystemPathFromId(rootPage2View.getId()));
-        List rootPage2ViewMenus = rootPage2View.getMenuDefinitions();
+        List<MenuDefinition> rootPage2ViewMenus = rootPage2View.getMenuDefinitions();
         assertNotNull(rootPage2ViewMenus);
         assertEquals(7 + aggregateView.getStandardMenuNames().size(), rootPage2ViewMenus.size());
         menusIter = rootPage2ViewMenus.iterator();
@@ -946,7 +947,7 @@ public class TestPortalSite extends Abst
         locators.put("group", locator);
         PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, "user");
         assertNotNull(requestContext);
-        Set customMenuNames = requestContext.getCustomMenuNames();
+        Set<String> customMenuNames = requestContext.getCustomMenuNames();
         assertNotNull(customMenuNames);
         assertEquals(7, customMenuNames.size());
         assertTrue(customMenuNames.contains("top"));
@@ -966,7 +967,7 @@ public class TestPortalSite extends Abst
         assertEquals("top", topMenu.getName());
         assertEquals("/", topMenu.getUrl());
         assertFalse(topMenu.isEmpty());
-        List topMenuElements = topMenu.getElements();
+        List<MenuElement> topMenuElements = topMenu.getElements();
         assertNotNull(topMenuElements);
         assertEquals(8, topMenuElements.size());
         Iterator menuElementsIter = topMenuElements.iterator();
@@ -983,7 +984,7 @@ public class TestPortalSite extends Abst
                 assertTrue(element.getManagedNode() instanceof Folder);
                 assertEquals("/folder0", element.getManagedNode().getPath());
                 assertFalse(((Menu)element).isEmpty());
-                List elements = ((Menu)element).getElements();
+                List<MenuElement> elements = ((Menu)element).getElements();
                 assertNotNull(elements);
                 assertEquals(1, elements.size());
                 assertTrue(elements.get(0) instanceof MenuOption);
@@ -1000,7 +1001,7 @@ public class TestPortalSite extends Abst
                 assertTrue(element.getManagedNode() instanceof Folder);
                 assertEquals("/_user/user/folder1", element.getManagedNode().getPath());
                 assertFalse(((Menu)element).isEmpty());
-                List elements = ((Menu)element).getElements();
+                List<MenuElement> elements = ((Menu)element).getElements();
                 assertNotNull(elements);
                 assertEquals(3, elements.size());
                 assertTrue(elements.get(0) instanceof MenuOption);
@@ -1020,7 +1021,7 @@ public class TestPortalSite extends Abst
                 assertTrue(element.getManagedNode() instanceof Folder);
                 assertEquals("/folder4", element.getManagedNode().getPath());
                 assertFalse(((Menu)element).isEmpty());
-                List elements = ((Menu)element).getElements();
+                List<MenuElement> elements = ((Menu)element).getElements();
                 assertNotNull(elements);
                 assertEquals(1, elements.size());
                 assertTrue(elements.get(0) instanceof MenuOption);
@@ -1095,7 +1096,7 @@ public class TestPortalSite extends Abst
         assertEquals("bread-crumbs", breadCrumbsMenu.getName());
         assertEquals("/", breadCrumbsMenu.getUrl());
         assertFalse(breadCrumbsMenu.isEmpty());
-        List breadCrumbsElements = breadCrumbsMenu.getElements();
+        List<MenuElement> breadCrumbsElements = breadCrumbsMenu.getElements();
         assertNotNull(breadCrumbsElements);
         assertEquals(1, breadCrumbsElements.size());
         assertTrue(breadCrumbsElements.get(0) instanceof MenuOption);
@@ -1106,7 +1107,7 @@ public class TestPortalSite extends Abst
         assertNotNull(templateTestMenu);
         assertEquals("template-test", templateTestMenu.getName());
         assertFalse(templateTestMenu.isEmpty());
-        List templateTestElements = templateTestMenu.getElements();
+        List<MenuElement> templateTestElements = templateTestMenu.getElements();
         assertNotNull(templateTestElements);
         assertEquals(1, templateTestElements.size());
         assertTrue(templateTestElements.get(0) instanceof MenuOption);
@@ -1114,7 +1115,7 @@ public class TestPortalSite extends Abst
         Menu currentPageTestMenu = requestContext.getMenu("current-page-test");
         assertEquals("current-page-test", currentPageTestMenu.getName());
         assertFalse(currentPageTestMenu.isEmpty());
-        List currentPageTestElements = currentPageTestMenu.getElements();
+        List<MenuElement> currentPageTestElements = currentPageTestMenu.getElements();
         assertNotNull(currentPageTestElements);
         assertEquals(1, currentPageTestElements.size());
         assertTrue(currentPageTestElements.get(0) instanceof MenuOption);
@@ -1124,12 +1125,12 @@ public class TestPortalSite extends Abst
         Menu currentPathTestMenu = requestContext.getMenu("current-path-test");
         assertEquals("current-path-test", currentPathTestMenu.getName());
         assertTrue(currentPathTestMenu.isEmpty());
-        List currentPathTestElements = currentPathTestMenu.getElements();
+        List<MenuElement> currentPathTestElements = currentPathTestMenu.getElements();
         assertNull(currentPathTestElements);
         Menu siteNavigationsMenu = requestContext.getMenu("site-navigations");
         assertEquals("site-navigations", siteNavigationsMenu.getName());
         assertFalse(siteNavigationsMenu.isEmpty());
-        List siteNavigationsElements = siteNavigationsMenu.getElements();
+        List<MenuElement> siteNavigationsElements = siteNavigationsMenu.getElements();
         assertNotNull(siteNavigationsElements);
         assertEquals(6, siteNavigationsElements.size());
         menuElementsIter = siteNavigationsElements.iterator();
@@ -1146,7 +1147,7 @@ public class TestPortalSite extends Abst
                 assertTrue(element.getManagedNode() instanceof Folder);
                 assertEquals("/folder0", element.getManagedNode().getPath());
                 assertFalse(((Menu)element).isEmpty());
-                List elements = ((Menu)element).getElements();
+                List<MenuElement> elements = ((Menu)element).getElements();
                 assertNotNull(elements);
                 assertEquals(1, elements.size());
                 assertTrue(elements.get(0) instanceof MenuOption);
@@ -1162,7 +1163,7 @@ public class TestPortalSite extends Abst
                 assertTrue(element.getManagedNode() instanceof Folder);
                 assertEquals("/_user/user/folder1", element.getManagedNode().getPath());
                 assertFalse(((Menu)element).isEmpty());
-                List elements = ((Menu)element).getElements();
+                List<MenuElement> elements = ((Menu)element).getElements();
                 assertNotNull(elements);
                 assertEquals(3, elements.size());
                 assertTrue(elements.get(0) instanceof Menu);
@@ -1183,7 +1184,7 @@ public class TestPortalSite extends Abst
                 assertEquals("/folder4", element.getManagedNode().getPath());
                 Menu menuElement = (Menu)element;
                 assertFalse(menuElement.isEmpty());
-                List elements = menuElement.getElements();
+                List<MenuElement> elements = menuElement.getElements();
                 assertNotNull(elements);
                 assertEquals(1, elements.size());
                 assertTrue(elements.get(0) instanceof Menu);
@@ -1237,7 +1238,7 @@ public class TestPortalSite extends Abst
         Menu rootedMenu = requestContext.getMenu("rooted-navigations");
         assertNotNull(rootedMenu);
         assertFalse(rootedMenu.isEmpty());
-        List rootedElements = rootedMenu.getElements();
+        List<MenuElement> rootedElements = rootedMenu.getElements();
         assertNotNull(rootedElements);
         assertEquals(8, rootedElements.size());
         menuElementsIter = rootedElements.iterator();
@@ -1365,7 +1366,7 @@ public class TestPortalSite extends Abst
         navigationsMenu = requestContext.getMenu("navigations");
         assertNotNull(navigationsMenu);
         assertFalse(navigationsMenu.isEmpty());
-        List navigationsElements = navigationsMenu.getElements();
+        List<MenuElement> navigationsElements = navigationsMenu.getElements();
         assertNotNull(navigationsElements);
         assertEquals(7, navigationsElements.size());
         menuElementsIter = navigationsElements.iterator();
@@ -1438,7 +1439,7 @@ public class TestPortalSite extends Abst
         Menu pagesMenu = requestContext.getMenu("pages");
         assertNotNull(pagesMenu);
         assertFalse(pagesMenu.isEmpty());
-        List pagesElements = pagesMenu.getElements();
+        List<MenuElement> pagesElements = pagesMenu.getElements();
         assertNotNull(pagesElements);
         assertEquals(3, pagesElements.size());
         menuElementsIter = pagesElements.iterator();
@@ -1491,7 +1492,7 @@ public class TestPortalSite extends Abst
         assertNotNull(templateTestMenu2);
         assertEquals("template-test", templateTestMenu2.getName());
         assertFalse(templateTestMenu2.isEmpty());
-        List templateTestElements2 = templateTestMenu2.getElements();
+        List<MenuElement> templateTestElements2 = templateTestMenu2.getElements();
         assertNotNull(templateTestElements2);
         assertEquals(1, templateTestElements2.size());
         assertTrue(templateTestElements2.get(0) instanceof MenuOption);
@@ -1519,7 +1520,7 @@ public class TestPortalSite extends Abst
         Menu customMenu = requestContext.getMenu("custom");
         assertNotNull(customMenu);
         assertFalse(customMenu.isEmpty());
-        List customElements = customMenu.getElements();
+        List<MenuElement> customElements = customMenu.getElements();
         assertNotNull(customElements);
         assertEquals(12, customElements.size());
         assertEquals("custom", customMenu.getName());
@@ -1552,7 +1553,7 @@ public class TestPortalSite extends Abst
             if (element.getElementType().equals(MenuElement.MENU_ELEMENT_TYPE) && element.getTitle().equals("user root"))
             {
                 assertFalse(((Menu)element).isEmpty());
-                List nestedElements = ((Menu)element).getElements();
+                List<MenuElement> nestedElements = ((Menu)element).getElements();
                 assertEquals(6, nestedElements.size());
                 Iterator nestedElementsIter = nestedElements.iterator();
                 if (nestedElementsIter.hasNext())
@@ -2053,7 +2054,7 @@ public class TestPortalSite extends Abst
         Menu topMenu = requestContext.getMenu("top");
         assertNotNull(topMenu);
         assertFalse(topMenu.isEmpty());
-        List topMenuElements = topMenu.getElements();
+        List<MenuElement> topMenuElements = topMenu.getElements();
         assertNotNull(topMenuElements);
         Iterator menuElementsIter = topMenuElements.iterator();
         boolean hiddenElement = false;
@@ -2069,7 +2070,7 @@ public class TestPortalSite extends Abst
         Menu pagesMenu = requestContext.getMenu("pages");
         assertNotNull(pagesMenu);
         assertFalse(pagesMenu.isEmpty());
-        List pagesElements = pagesMenu.getElements();
+        List<MenuElement> pagesElements = pagesMenu.getElements();
         assertNotNull(pagesElements);
         menuElementsIter = pagesElements.iterator();
         hiddenElement = false;



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