portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r1536817 [2/4] - in /portals/jetspeed-2/portal/trunk: components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/ components/jetspeed-capability/src/test/java/org/apache/jetspeed/capabilities/ components/jetspeed-cm/...
Date Tue, 29 Oct 2013 17:11:31 GMT
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseUserAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseUserAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseUserAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseUserAction.java Tue Oct 29 17:11:29 2013
@@ -16,12 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
@@ -29,6 +23,12 @@ import org.apache.jetspeed.om.page.Conte
 import org.apache.jetspeed.om.page.ContentPage;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.security.UserManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Abstract portlet placement action
@@ -75,13 +75,13 @@ public abstract class BaseUserAction 
         this.userManager = userManager;
     }
 
-    public boolean buildContext(RequestContext requestContext, Map responseContext)
+    public boolean buildContext(RequestContext requestContext, Map<String,Object> responseContext)
     {
         return true;
     }
 
     public boolean buildErrorContext(RequestContext requestContext,
-            Map responseContext) 
+            Map<String,Object> responseContext)
     {
         responseContext.put(STATUS, "failure");
 
@@ -144,7 +144,7 @@ public abstract class BaseUserAction 
         return null;
     }
     
-    public boolean runBatch(RequestContext requestContext, Map resultMap) throws AJAXException
+    public boolean runBatch(RequestContext requestContext, Map<String,Object> resultMap) throws AJAXException
     {
         return run(requestContext, resultMap);
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/ChangePortletAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/ChangePortletAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/ChangePortletAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/ChangePortletAction.java Tue Oct 29 17:11:29 2013
@@ -16,20 +16,12 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.portlet.PortletMode;
-import javax.portlet.WindowState;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
+import org.apache.jetspeed.container.PortletWindow;
 import org.apache.jetspeed.container.state.MutableNavigationalState;
 import org.apache.jetspeed.decoration.PageActionAccess;
 import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
@@ -37,7 +29,14 @@ import org.apache.jetspeed.om.page.Conte
 import org.apache.jetspeed.om.page.ContentPage;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.jetspeed.container.PortletWindow;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.portlet.PortletMode;
+import javax.portlet.WindowState;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
 
 /**
  * Changes the window state or portlet mode for a given portlet window
@@ -57,8 +56,8 @@ public class ChangePortletAction 
 {
     protected static final Logger log = LoggerFactory.getLogger(ChangePortletAction.class);
     protected String action;
-    protected Map validWindowStates = new HashMap();
-    protected Map validPortletModes = new HashMap();
+    protected Map<String,String> validWindowStates = new HashMap();
+    protected Map<String,String> validPortletModes = new HashMap();
     
     public ChangePortletAction(String template, 
             String errorTemplate, 
@@ -105,7 +104,7 @@ public class ChangePortletAction 
         }        
     }
 
-    public boolean runBatch(RequestContext requestContext, Map resultMap) throws AJAXException
+    public boolean runBatch(RequestContext requestContext, Map<String,Object> resultMap) throws AJAXException
     {
         return runAction(requestContext, resultMap, true);
     }    
@@ -116,7 +115,7 @@ public class ChangePortletAction 
         return runAction(requestContext, resultMap, false);
     }
     
-    public boolean runAction(RequestContext requestContext, Map resultMap, boolean batch)
+    public boolean runAction(RequestContext requestContext, Map<String,Object> resultMap, boolean batch)
     {
         boolean success = true;
         String status = "success";

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderAction.java Tue Oct 29 17:11:29 2013
@@ -16,10 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
@@ -27,6 +23,10 @@ import org.apache.jetspeed.layout.Portle
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.request.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
 
 /**
  * Retrieve a single page
@@ -51,7 +51,7 @@ public class GetFolderAction 
         super(template, errorTemplate, pageManager, securityBehavior);
     }
 
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
     {
         boolean success = true;
         String status = "success";

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderListAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderListAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderListAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderListAction.java Tue Oct 29 17:11:29 2013
@@ -16,11 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
@@ -28,6 +23,11 @@ import org.apache.jetspeed.layout.Portle
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.request.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
+import java.util.StringTokenizer;
 
 /**
  * Get the immediate contents of a folder in JSON format 
@@ -52,7 +52,7 @@ public class GetFolderListAction 
         super(template, errorTemplate, pageManager, securityBehavior);        
     }
 
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
     {
         boolean success = true;
         String status = "success";

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFoldersListAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFoldersListAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFoldersListAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFoldersListAction.java Tue Oct 29 17:11:29 2013
@@ -16,10 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
@@ -27,6 +23,10 @@ import org.apache.jetspeed.layout.Portle
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.request.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
 
 /**
  * Get the immediate contents of a folder in Ajax Format 
@@ -52,7 +52,7 @@ public class GetFoldersListAction 
         super(template, errorTemplate, pageManager, securityBehavior);        
     }
 
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
     {
         boolean success = true;
         String status = "success";

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetLinkAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetLinkAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetLinkAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetLinkAction.java Tue Oct 29 17:11:29 2013
@@ -16,10 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
@@ -27,6 +23,10 @@ import org.apache.jetspeed.layout.Portle
 import org.apache.jetspeed.om.page.Link;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.request.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
 
 /**
  * Retrieve a single link
@@ -51,7 +51,7 @@ public class GetLinkAction 
         super(template, errorTemplate, pageManager, securityBehavior);
     }
 
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
     {
         boolean success = true;
         String status = "success";

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetMenuAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetMenuAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetMenuAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetMenuAction.java Tue Oct 29 17:11:29 2013
@@ -16,11 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Locale;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
@@ -30,6 +25,11 @@ import org.apache.jetspeed.portalsite.Me
 import org.apache.jetspeed.portalsite.PortalSiteRequestContext;
 import org.apache.jetspeed.profiler.impl.ProfilerValveImpl;
 import org.apache.jetspeed.request.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Locale;
+import java.util.Map;
 
 /**
  * Get menu action retrieves a menu defined for the addressed page.
@@ -52,7 +52,7 @@ public class GetMenuAction extends BaseP
         super(template, errorTemplate, securityBehavior);
     }
 
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
     {
         boolean success = true;
         String status = "success";

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetMenusAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetMenusAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetMenusAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetMenusAction.java Tue Oct 29 17:11:29 2013
@@ -16,14 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Locale;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Set;
-import java.util.Iterator;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
@@ -33,49 +25,51 @@ import org.apache.jetspeed.portalsite.Me
 import org.apache.jetspeed.portalsite.PortalSiteRequestContext;
 import org.apache.jetspeed.profiler.impl.ProfilerValveImpl;
 import org.apache.jetspeed.request.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
 
 /**
  * Get menus action retrieves all menu names defined for the addressed page.
+ * <p/>
+ * AJAX Parameters:
+ * none
  *
- * AJAX Parameters: 
- *    none
- *    
  * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
  * @version $Id: $
  */
-public class GetMenusAction extends BasePortletAction 
-    implements AjaxAction, AjaxBuilder, Constants
-{
+public class GetMenusAction extends BasePortletAction
+        implements AjaxAction, AjaxBuilder, Constants {
     protected static final Logger log = LoggerFactory.getLogger(GetMenusAction.class);
-    
+
     public GetMenusAction(String template,
                           String errorTemplate,
-                          PortletActionSecurityBehavior securityBehavior)
-    {
+                          PortletActionSecurityBehavior securityBehavior) {
         super(template, errorTemplate, securityBehavior);
     }
 
-    public boolean run(RequestContext requestContext, Map resultMap)
-    {
+    public boolean run(RequestContext requestContext, Map<String, Object> resultMap) {
         boolean success = true;
         String status = "success";
-        try
-        {
+        try {
             // generate action result
             resultMap.put(ACTION, "getmenus");
 
             // check permission to use ajax api
-            if (!checkAccess(requestContext, JetspeedActions.VIEW))
-            {
+            if (!checkAccess(requestContext, JetspeedActions.VIEW)) {
                 success = false;
                 resultMap.put(REASON, "Insufficient access to get menus");
                 return success;
             }
 
             // get request context
-            PortalSiteRequestContext siteRequestContext = (PortalSiteRequestContext)requestContext.getAttribute(ProfilerValveImpl.PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY);
-            if (siteRequestContext == null)
-            {
+            PortalSiteRequestContext siteRequestContext = (PortalSiteRequestContext) requestContext.getAttribute(ProfilerValveImpl.PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY);
+            if (siteRequestContext == null) {
                 success = false;
                 resultMap.put(REASON, "Missing portal site request context from ProfilerValve");
                 return success;
@@ -84,88 +78,72 @@ public class GetMenusAction extends Base
             // get menu names
             Set standardMenuNames = siteRequestContext.getStandardMenuNames();
             Set customMenuNames = null;
-            try
-            {
+            try {
                 customMenuNames = siteRequestContext.getCustomMenuNames();
+            } catch (NodeNotFoundException nnfe) {
             }
-            catch (NodeNotFoundException nnfe)
-            {
-            }
-            
+
             // return menu names action results
             resultMap.put(STANDARD_MENUS, standardMenuNames);
             resultMap.put(CUSTOM_MENUS, customMenuNames);
-            
+
             // get action parameter
             String includeMenuDefinitions = getActionParameter(requestContext, INCLUDE_MENU_DEFS);
-            if ( includeMenuDefinitions != null && includeMenuDefinitions.toLowerCase().equals( "true" ) )
-            {
+            if (includeMenuDefinitions != null && includeMenuDefinitions.toLowerCase().equals("true")) {
                 // get request locale
                 Locale locale = requestContext.getLocale();
-                
+
                 HashMap menuDefinitionsMap = new HashMap();
-                
+
                 StringBuffer failReason = new StringBuffer();
                 Iterator menuNamesIter = standardMenuNames.iterator();
-                while ( menuNamesIter.hasNext() )
-                {
-                    String menuName = (String)menuNamesIter.next();
-                    Menu menuDefinition = getMenuDefinition( menuName, siteRequestContext, failReason );
-                    if ( menuDefinition != null )
-                        menuDefinitionsMap.put( menuName, menuDefinition );
+                while (menuNamesIter.hasNext()) {
+                    String menuName = (String) menuNamesIter.next();
+                    Menu menuDefinition = getMenuDefinition(menuName, siteRequestContext, failReason);
+                    if (menuDefinition != null)
+                        menuDefinitionsMap.put(menuName, menuDefinition);
                 }
                 menuNamesIter = customMenuNames.iterator();
-                while ( menuNamesIter.hasNext() )
-                {
-                    String menuName = (String)menuNamesIter.next();
-                    Menu menuDefinition = getMenuDefinition( menuName, siteRequestContext, failReason );
-                    if ( menuDefinition != null )
-                        menuDefinitionsMap.put( menuName, menuDefinition );
+                while (menuNamesIter.hasNext()) {
+                    String menuName = (String) menuNamesIter.next();
+                    Menu menuDefinition = getMenuDefinition(menuName, siteRequestContext, failReason);
+                    if (menuDefinition != null)
+                        menuDefinitionsMap.put(menuName, menuDefinition);
                 }
-                
-                if ( failReason.length() > 0 )
-                {
+
+                if (failReason.length() > 0) {
                     success = false;
-                    resultMap.put(REASON, failReason.toString() );
+                    resultMap.put(REASON, failReason.toString());
                     return success;
                 }
-                resultMap.put( INCLUDE_MENU_DEFS, new Boolean( true ) );
-                resultMap.put( MENU_DEFINITIONS, menuDefinitionsMap );
-                resultMap.put( MENU_CONTEXT, siteRequestContext );
-                resultMap.put( MENU_LOCALE, locale );
-            }
-            else
-            {
-                resultMap.put( INCLUDE_MENU_DEFS, new Boolean( false ) );
+                resultMap.put(INCLUDE_MENU_DEFS, new Boolean(true));
+                resultMap.put(MENU_DEFINITIONS, menuDefinitionsMap);
+                resultMap.put(MENU_CONTEXT, siteRequestContext);
+                resultMap.put(MENU_LOCALE, locale);
+            } else {
+                resultMap.put(INCLUDE_MENU_DEFS, new Boolean(false));
             }
             resultMap.put(STATUS, status);
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             log.error("Exception while getting page menus info", e);
             success = false;
         }
 
         return success;
-	}
-    
-    private Menu getMenuDefinition( String menuName, PortalSiteRequestContext siteRequestContext, StringBuffer failReason )
-    {
+    }
+
+    private Menu getMenuDefinition(String menuName, PortalSiteRequestContext siteRequestContext, StringBuffer failReason) {
         // get menu definition
         Menu menuDefinition = null;
-        try
-        {
-            menuDefinition = siteRequestContext.getMenu( menuName );
-        }
-        catch ( NodeNotFoundException nnfe )
-        {
+        try {
+            menuDefinition = siteRequestContext.getMenu(menuName);
+        } catch (NodeNotFoundException nnfe) {
         }
-        if ( menuDefinition == null && failReason != null )
-        {
-            if ( failReason.length() == 0 )
-                failReason.append( "Unable to lookup specified menus: " ).append( menuName );
+        if (menuDefinition == null && failReason != null) {
+            if (failReason.length() == 0)
+                failReason.append("Unable to lookup specified menus: ").append(menuName);
             else
-                failReason.append( ", " ).append( menuName );
+                failReason.append(", ").append(menuName);
         }
         return menuDefinition;
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPagesAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPagesAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPagesAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPagesAction.java Tue Oct 29 17:11:29 2013
@@ -16,15 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
@@ -33,6 +24,15 @@ import org.apache.jetspeed.om.folder.Fol
 import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.request.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Get Pages retrieves all pages for the given folder
@@ -57,7 +57,7 @@ public class GetPagesAction 
         super(template, errorTemplate, pageManager, securityBehavior);
     }
 
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
     {
         boolean success = true;
         String status = "success";

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletActionsAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletActionsAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletActionsAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletActionsAction.java Tue Oct 29 17:11:29 2013
@@ -16,11 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.ArrayList;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
@@ -31,105 +26,97 @@ import org.apache.jetspeed.om.page.Conte
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.request.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.Map;
 
 /**
  * Get Portlet Actions retrieves the current set of valid actions for one or more portlet windows
+ * <p/>
+ * AJAX Parameters:
+ * id = the fragment id of the portlet for which to retrieve the action list
+ * multiple id parameters are supported
+ * page = (implied in the URL)
  *
- * AJAX Parameters: 
- *    id = the fragment id of the portlet for which to retrieve the action list
- *         multiple id parameters are supported
- *    page = (implied in the URL)
- *    
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  * @version $Id: $
  */
 public class GetPortletActionsAction
-    extends BasePortletAction 
-    implements AjaxAction, AjaxBuilder, Constants
-{
+        extends BasePortletAction
+        implements AjaxAction, AjaxBuilder, Constants {
     protected static final Logger log = LoggerFactory.getLogger(GetPortletActionsAction.class);
     protected String action;
     private DecorationValve decorationValve;
-    
+
     public GetPortletActionsAction(String template,
                                    String errorTemplate,
                                    String action,
-                                   DecorationValve decorationValve)            
-    throws AJAXException
-    {
+                                   DecorationValve decorationValve)
+            throws AJAXException {
         this(template, errorTemplate, action, decorationValve, null, null);
     }
-    
+
     public GetPortletActionsAction(String template,
                                    String errorTemplate,
                                    String action,
                                    DecorationValve decorationValve,
                                    PageManager pageManager,
                                    PortletActionSecurityBehavior securityBehavior)
-    throws AJAXException
-    {
+            throws AJAXException {
         super(template, errorTemplate, pageManager, securityBehavior);
         this.action = action;
         this.decorationValve = decorationValve;
     }
 
-    public boolean runBatch(RequestContext requestContext, Map resultMap) throws AJAXException
-    {
+    public boolean runBatch(RequestContext requestContext, Map<String, Object> resultMap) throws AJAXException {
         return runAction(requestContext, resultMap, true);
-    }    
-    
-    public boolean run(RequestContext requestContext, Map resultMap)
-            throws AJAXException
-    {
+    }
+
+    public boolean run(RequestContext requestContext, Map<String, Object> resultMap)
+            throws AJAXException {
         return runAction(requestContext, resultMap, false);
     }
-    
-    public boolean runAction( RequestContext requestContext, Map resultMap, boolean batch )
-    {
+
+    public boolean runAction(RequestContext requestContext, Map<String, Object> resultMap, boolean batch) {
         boolean success = true;
         String status = "success";
-        try
-        {
-            resultMap.put( ACTION, action );
-            
+        try {
+            resultMap.put(ACTION, action);
+
             ContentPage page = requestContext.getPage();
-            
+
             // Get the necessary parameters off of the request
             ArrayList getActionsForFragments = new ArrayList();
-            String[] portletIds = requestContext.getRequest().getParameterValues( PORTLETID );
-            if ( portletIds != null && portletIds.length > 0 ) 
-            {
-                for ( int i = 0 ; i < portletIds.length ; i++ )
-                {
-                    String portletId = portletIds[ i ];
-                    ContentFragment fragment = (ContentFragment)page.getFragmentById( portletId );
-                    if ( fragment == null )
-                    {
-                        throw new Exception("fragment not found for specified portlet id: " + portletId); 
+            String[] portletIds = requestContext.getRequest().getParameterValues(PORTLETID);
+            if (portletIds != null && portletIds.length > 0) {
+                for (int i = 0; i < portletIds.length; i++) {
+                    String portletId = portletIds[i];
+                    ContentFragment fragment = (ContentFragment) page.getFragmentById(portletId);
+                    if (fragment == null) {
+                        throw new Exception("fragment not found for specified portlet id: " + portletId);
                     }
-                    getActionsForFragments.add( fragment );
+                    getActionsForFragments.add(fragment);
                 }
-                getActionsForFragments.add( page.getRootFragment() );
+                getActionsForFragments.add(page.getRootFragment());
             }
 
             // Run the Decoration valve to get actions
-            decorationValve.initFragments( requestContext, true, getActionsForFragments );
-            
-            if ( getActionsForFragments.size() > 0 )
-            {
-                Fragment rootFragment = (Fragment)getActionsForFragments.remove( getActionsForFragments.size()-1 );
-                resultMap.put( PAGE, rootFragment );
+            decorationValve.initFragments(requestContext, true, getActionsForFragments);
+
+            if (getActionsForFragments.size() > 0) {
+                Fragment rootFragment = (Fragment) getActionsForFragments.remove(getActionsForFragments.size() - 1);
+                resultMap.put(PAGE, rootFragment);
             }
-            
-            resultMap.put( PORTLETS, getActionsForFragments );
-            
-            resultMap.put( STATUS, status );
-        } 
-        catch (Exception e)
-        {
+
+            resultMap.put(PORTLETS, getActionsForFragments);
+
+            resultMap.put(STATUS, status);
+        } catch (Exception e) {
             // Log the exception
-            log.error( "exception while getting actions for a fragment", e );
-            resultMap.put( REASON, e.toString() );
+            log.error("exception while getting actions for a fragment", e);
+            resultMap.put(REASON, e.toString());
             // Return a failure indicator
             success = false;
         }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java Tue Oct 29 17:11:29 2013
@@ -16,17 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AjaxAction;
@@ -41,6 +30,17 @@ import org.apache.jetspeed.request.Reque
 import org.apache.jetspeed.search.ParsedObject;
 import org.apache.jetspeed.search.SearchEngine;
 import org.apache.jetspeed.security.SecurityAccessController;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
 
 /**
  * Get Portlets retrieves the portlet list available to the current subject
@@ -82,7 +82,7 @@ public class GetPortletsAction 
         this.securityAccessController = securityAccessController;
     }
 
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
     {
         boolean success = true;
         String status = "success";
@@ -122,10 +122,10 @@ public class GetPortletsAction 
         return success;
 	}
     
-    public List retrievePortlets(RequestContext requestContext, String filter)
+    public List<PortletInfo> retrievePortlets(RequestContext requestContext, String filter)
     {
         Iterator portlets = null;
-        List list = new ArrayList();
+        List<PortletInfo> list = new ArrayList<PortletInfo>();
         Locale locale = requestContext.getLocale();
         
         if (filter == null)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetThemesAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetThemesAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetThemesAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetThemesAction.java Tue Oct 29 17:11:29 2013
@@ -16,16 +16,16 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
 import org.apache.jetspeed.decoration.DecorationFactory;
 import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
 import org.apache.jetspeed.request.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
 
 /**
  * Get Portal-wide themes lists 
@@ -53,7 +53,7 @@ public class GetThemesAction 
         this.decorationFactory = decorationFactory;
     }
 
-    public boolean run( RequestContext requestContext, Map resultMap )
+    public boolean run( RequestContext requestContext, Map<String,Object> resultMap )
     {
         boolean success = true;
         String status = "success";

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetUserInformationAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetUserInformationAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetUserInformationAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetUserInformationAction.java Tue Oct 29 17:11:29 2013
@@ -16,23 +16,22 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.security.auth.Subject;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
 import org.apache.jetspeed.request.RequestContext;
-import org.apache.jetspeed.security.User;
 import org.apache.jetspeed.security.Role;
+import org.apache.jetspeed.security.User;
 import org.apache.jetspeed.security.UserManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.security.auth.Subject;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Retrieve user information of the current user
@@ -60,7 +59,7 @@ public class GetUserInformationAction 
         super(template, errorTemplate, um, rolesSecurityBehavior);
     }
     
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
             throws AJAXException
     {
         boolean success = true;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetUserListAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetUserListAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetUserListAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetUserListAction.java Tue Oct 29 17:11:29 2013
@@ -16,16 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
@@ -38,6 +28,16 @@ import org.apache.jetspeed.security.User
 import org.apache.jetspeed.security.UserManager;
 import org.apache.jetspeed.statistics.PortalStatistics;
 import org.apache.jetspeed.statistics.UserStats;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Returns the list of currently logged in users
@@ -109,7 +109,7 @@ public class GetUserListAction 
     	this.protectionScope = protectionScope;
     }
     
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
             throws AJAXException
     {
         boolean success = true;
@@ -192,7 +192,7 @@ public class GetUserListAction 
         		if(numberOfCurrentLoggedInUsers > 0)
         		{
 
-        			// Logged in users is a list of UserStats objects
+        			// Logged in users is a list of UserStats actions
         			Iterator usersIter = pstats.getListOfLoggedInUsers().iterator();
         			while(usersIter.hasNext())
         			{

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MovePortletAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MovePortletAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MovePortletAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MovePortletAction.java Tue Oct 29 17:11:29 2013
@@ -16,9 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Map;
-import java.util.Iterator;
-
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
@@ -26,17 +23,18 @@ import org.apache.jetspeed.ajax.AjaxBuil
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
 import org.apache.jetspeed.layout.Coordinate;
 import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
-import org.apache.jetspeed.layout.PortletPlacementException;
 import org.apache.jetspeed.layout.PortletPlacementContext;
+import org.apache.jetspeed.layout.PortletPlacementException;
 import org.apache.jetspeed.om.page.ContentFragment;
 import org.apache.jetspeed.om.page.ContentPage;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.page.document.NodeException;
 import org.apache.jetspeed.request.RequestContext;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.Map;
+
 /**
  * Move Portlet portlet placement action
  *
@@ -131,18 +129,18 @@ public class MovePortletAction 
         }
     }
 
-    public boolean runBatch(RequestContext requestContext, Map resultMap) throws AJAXException
+    public boolean runBatch(RequestContext requestContext, Map<String,Object> resultMap) throws AJAXException
     {
         return runAction(requestContext, resultMap, true);
     }    
     
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
             throws AJAXException
     {
         return runAction(requestContext, resultMap, false);
     }
         
-    protected boolean runAction( RequestContext requestContext, Map resultMap, boolean batch )  throws AJAXException
+    protected boolean runAction( RequestContext requestContext, Map<String,Object> resultMap, boolean batch )  throws AJAXException
     {
         boolean success = true;
         String status = "success";
@@ -173,10 +171,7 @@ public class MovePortletAction 
                 {
                     // determine if layoutId parameter refers to the current layout fragment or to some other layout fragment
                     moveToLayoutFragment = currentLayoutFragment;
-                    Iterator layoutChildIter = moveToLayoutFragment.getFragments().iterator();
-                    while ( layoutChildIter.hasNext() )
-                    {
-                        ContentFragment childFrag = (ContentFragment)layoutChildIter.next();
+                    for (ContentFragment childFrag : moveToLayoutFragment.getFragments()) {
                         if ( childFrag != null )
                         {
                             if ( moveFragmentId.equals( childFrag.getId() ) )
@@ -460,7 +455,7 @@ public class MovePortletAction 
 
     protected boolean moveToOtherLayoutFragment( RequestContext requestContext,
                                                  boolean batch,
-                                                 Map resultMap,
+                                                 Map<String,Object> resultMap,
                                                  String moveFragmentId,
                                                  ContentFragment moveToLayoutFragment,
                                                  ContentFragment removeFromLayoutFragment )
@@ -499,7 +494,7 @@ public class MovePortletAction 
 
     protected boolean placeFragment( RequestContext requestContext,
                                      boolean batch,
-                                     Map resultMap,
+                                     Map<String,Object> resultMap,
                                      ContentFragment placeFragment,
                                      ContentFragment placeInLayoutFragment )
         throws PortletPlacementException, NodeException, AJAXException
@@ -542,7 +537,7 @@ public class MovePortletAction 
         return a_oCoordinate;
     }
 
-    protected void putCartesianResult(Map resultMap, float value, float oldValue, String name, String oldName)
+    protected void putCartesianResult(Map<String,Object> resultMap, float value, float oldValue, String name, String oldName)
     {    
         if (value != -1F)
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MultipleAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MultipleAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MultipleAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MultipleAction.java Tue Oct 29 17:11:29 2013
@@ -16,16 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
@@ -41,6 +31,16 @@ import org.springframework.beans.BeansEx
 import org.springframework.beans.factory.BeanFactory;
 import org.springframework.beans.factory.BeanFactoryAware;
 
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
 /**
  * 
  * @author David Gurney
@@ -98,7 +98,7 @@ public class MultipleAction extends Base
         actionMap.put("multiple", proxy);        
     }
     
-    public boolean run(RequestContext p_oRequestContext, Map p_oResultMap)
+    public boolean run(RequestContext p_oRequestContext, Map<String,Object> p_oResultMap)
             throws AJAXException
     {
         boolean a_bReturnSuccess = true;
@@ -249,7 +249,7 @@ public class MultipleAction extends Base
     }
 
     // Process the builder if provided
-    protected void processBuilder(AjaxBuilder p_oBuilder, Map p_oInputMap,
+    protected void processBuilder(AjaxBuilder p_oBuilder, Map<String,Object> p_oInputMap,
             RequestContext p_oRequestContext, boolean p_oActionSuccessFlag)
     {
         try
@@ -314,7 +314,7 @@ public class MultipleAction extends Base
     }
 
     public boolean buildContext(RequestContext p_oRequestContext,
-            Map p_oInputMap)
+            Map<String,Object> p_oInputMap)
     {
         boolean a_bResults = true;
 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/RemovePortletAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/RemovePortletAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/RemovePortletAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/RemovePortletAction.java Tue Oct 29 17:11:29 2013
@@ -16,10 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
@@ -32,6 +28,10 @@ import org.apache.jetspeed.om.page.Conte
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.pipeline.PipelineException;
 import org.apache.jetspeed.request.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
 
 
 /**
@@ -70,7 +70,7 @@ public class RemovePortletAction 
         this.registry = registry;
     }
     
-    public boolean runBatch(RequestContext requestContext, Map resultMap) throws AJAXException
+    public boolean runBatch(RequestContext requestContext, Map<String,Object> resultMap) throws AJAXException
     {
         return runAction(requestContext, resultMap, true);
     }    
@@ -81,7 +81,7 @@ public class RemovePortletAction 
         return runAction(requestContext, resultMap, false);
     }
     
-    public boolean runAction(RequestContext requestContext, Map resultMap, boolean batch)
+    public boolean runAction(RequestContext requestContext, Map<String,Object> resultMap, boolean batch)
     {
         boolean success = true;
         String status = "success";

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityConstraintsAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityConstraintsAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityConstraintsAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityConstraintsAction.java Tue Oct 29 17:11:29 2013
@@ -16,17 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
@@ -37,10 +26,20 @@ import org.apache.jetspeed.om.page.PageS
 import org.apache.jetspeed.om.page.SecurityConstraintsDef;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.request.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
 
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
 /**
  * Security Permission action
  * 
@@ -74,7 +73,7 @@ public class SecurityConstraintsAction 
         this(template, errorTemplate, pm, null); 
     }
     
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
             throws AJAXException
     {
     	System.out.println( "SecurityConstraintsAction run" );
@@ -134,7 +133,7 @@ public class SecurityConstraintsAction 
         return success;
     }
     
-    protected int removeConstraintDefinition(RequestContext requestContext, Map resultMap)
+    protected int removeConstraintDefinition(RequestContext requestContext, Map<String,Object> resultMap)
     throws AJAXException
     {
         String name = getActionParameter(requestContext, "name");
@@ -161,7 +160,7 @@ public class SecurityConstraintsAction 
         return 1;
     }
     
-    protected int updateConstraintDefinition(RequestContext requestContext, Map resultMap)
+    protected int updateConstraintDefinition(RequestContext requestContext, Map<String,Object> resultMap)
     throws AJAXException
     {
     	System.out.println( "SecurityConstraintsAction updateConstraintDefinition started" );
@@ -292,7 +291,7 @@ public class SecurityConstraintsAction 
         return null;
     }
     
-    protected int removeGlobal(RequestContext requestContext, Map resultMap)
+    protected int removeGlobal(RequestContext requestContext, Map<String,Object> resultMap)
     throws AJAXException
     {
         int count = 0;
@@ -320,7 +319,7 @@ public class SecurityConstraintsAction 
         return count;
     }
        
-    protected int addGlobal(RequestContext requestContext, Map resultMap)
+    protected int addGlobal(RequestContext requestContext, Map<String,Object> resultMap)
     throws AJAXException
     {
         int count = 0;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityPermissionAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityPermissionAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityPermissionAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityPermissionAction.java Tue Oct 29 17:11:29 2013
@@ -16,13 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
@@ -35,6 +28,13 @@ import org.apache.jetspeed.security.Jets
 import org.apache.jetspeed.security.PermissionManager;
 import org.apache.jetspeed.security.SecurityException;
 import org.apache.jetspeed.security.impl.TransientRole;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
 
 /**
  * Security Permission action
@@ -67,7 +67,7 @@ public class SecurityPermissionAction 
         this.pm = pm;
     }
     
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
             throws AJAXException
     {
         boolean success = true;
@@ -123,7 +123,7 @@ public class SecurityPermissionAction 
         return success;
     }
     
-    protected int addPermission(RequestContext requestContext, Map resultMap)
+    protected int addPermission(RequestContext requestContext, Map<String,Object> resultMap)
     throws AJAXException
     {
         try
@@ -154,7 +154,7 @@ public class SecurityPermissionAction 
         }        
     }
 
-    protected int updatePermission(RequestContext requestContext, Map resultMap)
+    protected int updatePermission(RequestContext requestContext, Map<String,Object> resultMap)
     throws AJAXException
     {
         try
@@ -210,7 +210,7 @@ public class SecurityPermissionAction 
         return count;
     }
 
-    protected int removePermission(RequestContext requestContext, Map resultMap)
+    protected int removePermission(RequestContext requestContext, Map<String,Object> resultMap)
     throws AJAXException
     {
         try

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdateFolderAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdateFolderAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdateFolderAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdateFolderAction.java Tue Oct 29 17:11:29 2013
@@ -16,10 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
@@ -30,6 +26,10 @@ import org.apache.jetspeed.om.page.Fragm
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.page.document.Node;
 import org.apache.jetspeed.request.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
 
 /**
  * Update Folder action -- updates various parts of the PSML folder
@@ -63,7 +63,7 @@ public class UpdateFolderAction 
         super(template, errorTemplate, pm, securityBehavior); 
     }
     
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
             throws AJAXException
     {
         boolean success = true;
@@ -184,7 +184,7 @@ public class UpdateFolderAction 
         return success;
     }
     
-    protected int updateInformation(RequestContext requestContext, Map resultMap, Node node, String path)
+    protected int updateInformation(RequestContext requestContext, Map<String,Object> resultMap, Node node, String path)
     throws AJAXException    
     {
         int count = 0;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdateLinkAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdateLinkAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdateLinkAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdateLinkAction.java Tue Oct 29 17:11:29 2013
@@ -16,10 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Map;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
@@ -30,6 +26,10 @@ import org.apache.jetspeed.om.page.Link;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.page.document.Node;
 import org.apache.jetspeed.request.RequestContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
 
 /**
  * Update Link action -- updates various parts of the PSML link
@@ -63,7 +63,7 @@ public class UpdateLinkAction 
         super(template, errorTemplate, pm, securityBehavior); 
     }
     
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
             throws AJAXException
     {
         boolean success = true;
@@ -188,7 +188,7 @@ public class UpdateLinkAction 
         return success;
     }
     
-    protected int updateInformation(RequestContext requestContext, Map resultMap, Node node, String path)
+    protected int updateInformation(RequestContext requestContext, Map<String,Object> resultMap, Node node, String path)
     throws AJAXException    
     {
         int count = 0;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdatePageAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdatePageAction.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdatePageAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdatePageAction.java Tue Oct 29 17:11:29 2013
@@ -16,8 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Map;
-
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
@@ -32,10 +30,11 @@ import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.page.document.Node;
 import org.apache.jetspeed.request.RequestContext;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.Map;
+
 /**
  * Update Page action -- updates various parts of the PSML page
  * 
@@ -72,7 +71,7 @@ public class UpdatePageAction 
         super(template, errorTemplate, pm, securityBehavior);
     }
     
-    public boolean run(RequestContext requestContext, Map resultMap)
+    public boolean run(RequestContext requestContext, Map<String,Object> resultMap)
             throws AJAXException
     {
         boolean success = true;
@@ -298,7 +297,7 @@ public class UpdatePageAction 
         return success;
     }
     
-    protected int updatePortletDecorator(RequestContext requestContext, Map resultMap, BaseFragmentsElement page, String fragmentId, String portletDecorator)
+    protected int updatePortletDecorator(RequestContext requestContext, Map<String,Object> resultMap, BaseFragmentsElement page, String fragmentId, String portletDecorator)
     {
     	int count = 0;
     	BaseFragmentElement fragment = page.getFragmentById(fragmentId);
@@ -310,7 +309,7 @@ public class UpdatePageAction 
     	return count;
     }
     
-    protected int updateFragment(RequestContext requestContext, Map resultMap, BaseFragmentsElement page, String fragmentId, String layout)
+    protected int updateFragment(RequestContext requestContext, Map<String,Object> resultMap, BaseFragmentsElement page, String fragmentId, String layout)
     {
         int count = 0;
         String sizes = getActionParameter(requestContext, SIZES);
@@ -344,7 +343,7 @@ public class UpdatePageAction 
         return count;
     }
 
-    protected int addFragment(RequestContext requestContext, Map resultMap, BaseFragmentsElement page, String parentFragmentId, String layout)
+    protected int addFragment(RequestContext requestContext, Map<String,Object> resultMap, BaseFragmentsElement page, String parentFragmentId, String layout)
     {
         int count = 0;
         String sizes = getActionParameter(requestContext, SIZES);
@@ -367,7 +366,7 @@ public class UpdatePageAction 
         return count;
     }
 
-    protected int removeFragment(RequestContext requestContext, Map resultMap, BaseFragmentsElement page, String fragmentId)
+    protected int removeFragment(RequestContext requestContext, Map<String,Object> resultMap, BaseFragmentsElement page, String fragmentId)
     {
         int count = 0;
         BaseFragmentElement fragment = page.getFragmentById(fragmentId);
@@ -379,7 +378,7 @@ public class UpdatePageAction 
         return count;
     }    
         
-    protected int updateInformation(RequestContext requestContext, Map resultMap, Node node, String path)
+    protected int updateInformation(RequestContext requestContext, Map<String,Object> resultMap, Node node, String path)
     throws AJAXException    
     {
         int count = 0;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/localization/impl/LocalizationValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/localization/impl/LocalizationValveImpl.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/localization/impl/LocalizationValveImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/localization/impl/LocalizationValveImpl.java Tue Oct 29 17:11:29 2013
@@ -16,14 +16,6 @@
  */
 package org.apache.jetspeed.localization.impl;
 
-import java.security.Principal;
-import java.util.Enumeration;
-import java.util.Locale;
-
-import javax.security.auth.Subject;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.Jetspeed;
 import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.i18n.CurrentLocale;
@@ -38,6 +30,13 @@ import org.apache.jetspeed.security.Subj
 import org.apache.jetspeed.security.User;
 import org.apache.jetspeed.security.UserManager;
 import org.apache.jetspeed.util.JetspeedLocale;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.security.auth.Subject;
+import java.security.Principal;
+import java.util.Enumeration;
+import java.util.Locale;
 
 /**
  * LocalizationValveImpl
@@ -108,7 +107,7 @@ public class LocalizationValveImpl exten
                 if (null != userPrincipal)
                 {
                     log.debug("Got user principal: " + userPrincipal.getName());
-                    UserManager userMgr = (UserManager) Jetspeed.getComponentManager().getComponent(UserManager.class);
+                    UserManager userMgr = Jetspeed.getComponentManager().lookupComponent(UserManager.class);
                     try
                     {
                         if (!userMgr.getAnonymousUser().equals(userPrincipal.getName())

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginErrorServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginErrorServlet.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginErrorServlet.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginErrorServlet.java Tue Oct 29 17:11:29 2013
@@ -16,16 +16,15 @@
  */
 package org.apache.jetspeed.login;
 
-import java.io.IOException;
+import org.apache.jetspeed.Jetspeed;
+import org.apache.jetspeed.audit.AuditActivity;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
-
-import org.apache.jetspeed.Jetspeed;
-import org.apache.jetspeed.audit.AuditActivity;
+import java.io.IOException;
 
 /**
  * LoginErrorServlet
@@ -56,7 +55,7 @@ public class LoginErrorServlet extends H
         session.setAttribute(LoginConstants.RETRYCOUNT, retryCount);
 
         String username = (String)session.getAttribute(LoginConstants.USERNAME);        
-        AuditActivity audit = (AuditActivity)Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.audit.AuditActivity");
+        AuditActivity audit = Jetspeed.getComponentManager().lookupComponent("org.apache.jetspeed.audit.AuditActivity");
         if (audit != null)
         {
             audit.logUserActivity(username, request.getRemoteAddr(), AuditActivity.AUTHENTICATION_FAILURE, "Active Authentication");

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginProxyServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginProxyServlet.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginProxyServlet.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginProxyServlet.java Tue Oct 29 17:11:29 2013
@@ -16,9 +16,12 @@
  */
 package org.apache.jetspeed.login;
 
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
+import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.jetspeed.Jetspeed;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.administration.PortalAuthenticationConfiguration;
+import org.apache.jetspeed.security.activeauthentication.ActiveAuthenticationIdentityProvider;
+import org.apache.jetspeed.security.activeauthentication.IdentityToken;
 
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
@@ -26,13 +29,9 @@ import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
-
-import org.apache.commons.lang.StringEscapeUtils;
-import org.apache.jetspeed.Jetspeed;
-import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.jetspeed.administration.PortalAuthenticationConfiguration;
-import org.apache.jetspeed.security.activeauthentication.ActiveAuthenticationIdentityProvider;
-import org.apache.jetspeed.security.activeauthentication.IdentityToken;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
 
 /**
  * LoginProxyServlet
@@ -108,13 +107,13 @@ public class LoginProxyServlet extends H
         }
 
         Boolean portalFiltered = Boolean.valueOf((String)request.getAttribute(PortalReservedParameters.PORTAL_FILTER_ATTRIBUTE));
-        PortalAuthenticationConfiguration authenticationConfiguration = (PortalAuthenticationConfiguration)
-        Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.administration.PortalAuthenticationConfiguration");   
+        PortalAuthenticationConfiguration authenticationConfiguration =
+            Jetspeed.getComponentManager().lookupComponent("org.apache.jetspeed.administration.PortalAuthenticationConfiguration");
         if (!portalFiltered && authenticationConfiguration.isCreateNewSessionOnLogin())
         {
     
-            ActiveAuthenticationIdentityProvider identityProvider = (ActiveAuthenticationIdentityProvider) 
-                Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.security.activeauthentication.ActiveAuthenticationIdentityProvider");
+            ActiveAuthenticationIdentityProvider identityProvider =
+                Jetspeed.getComponentManager().lookupComponent("org.apache.jetspeed.security.activeauthentication.ActiveAuthenticationIdentityProvider");
             IdentityToken token = identityProvider.createIdentityToken(username);
             saveState(session, token, identityProvider.getSessionAttributeNames());
             request.getSession().invalidate();

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginRedirectorServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginRedirectorServlet.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginRedirectorServlet.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginRedirectorServlet.java Tue Oct 29 17:11:29 2013
@@ -16,19 +16,18 @@
  */
 package org.apache.jetspeed.login;
 
-import java.io.IOException;
+import org.apache.jetspeed.Jetspeed;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.audit.AuditActivity;
+import org.apache.jetspeed.cache.UserContentCacheManager;
+import org.apache.jetspeed.components.ComponentManager;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
-
-import org.apache.jetspeed.Jetspeed;
-import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.jetspeed.audit.AuditActivity;
-import org.apache.jetspeed.cache.UserContentCacheManager;
-import org.apache.jetspeed.components.ComponentManager;
+import java.io.IOException;
 
 /**
  * LoginRedirectorServlet
@@ -58,9 +57,9 @@ public class LoginRedirectorServlet exte
         session.removeAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE);
 
         ComponentManager cm = Jetspeed.getComponentManager();
-        UserContentCacheManager userContentCacheManager = (UserContentCacheManager)cm.getComponent("userContentCacheManager");
+        UserContentCacheManager userContentCacheManager = cm.lookupComponent("userContentCacheManager");
         userContentCacheManager.evictUserContentCache(username, session.getId());
-        AuditActivity audit = (AuditActivity)cm.getComponent("org.apache.jetspeed.audit.AuditActivity");
+        AuditActivity audit = cm.lookupComponent("org.apache.jetspeed.audit.AuditActivity");
         if (audit != null)
         {
             audit.logUserActivity(username, request.getRemoteAddr(), AuditActivity.AUTHENTICATION_SUCCESS, "Active Authentication");

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java Tue Oct 29 17:11:29 2013
@@ -16,24 +16,23 @@
  */
 package org.apache.jetspeed.login;
 
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.apache.jetspeed.administration.PortalConfigurationConstants;
-import org.apache.jetspeed.om.folder.Folder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.Jetspeed;
 import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.administration.PortalConfigurationConstants;
 import org.apache.jetspeed.engine.Engine;
 import org.apache.jetspeed.exception.JetspeedException;
+import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.jetspeed.request.RequestContextComponent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
 
 /**
  * LoginServlet
@@ -83,7 +82,7 @@ public class LoginServlet extends HttpSe
                         session.setAttribute(LoginConstants.DESTINATION, destination);
                     }
                 }
-                contextComponent = (RequestContextComponent) Jetspeed.getComponentManager().getComponent(RequestContextComponent.class);
+                contextComponent = Jetspeed.getComponentManager().lookupComponent(RequestContextComponent.class);
                 context = contextComponent.create(request, response, getServletConfig());
                 engine.service(context);
             }            

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalFilter.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalFilter.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalFilter.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalFilter.java Tue Oct 29 17:11:29 2013
@@ -16,19 +16,6 @@
  */
 package org.apache.jetspeed.login.filter;
 
-import java.io.IOException;
-import java.security.Principal;
-
-import javax.security.auth.Subject;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
 import org.apache.jetspeed.Jetspeed;
 import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.administration.PortalAuthenticationConfiguration;
@@ -46,6 +33,18 @@ import org.apache.jetspeed.security.Subj
 import org.apache.jetspeed.security.User;
 import org.apache.jetspeed.security.UserManager;
 
+import javax.security.auth.Subject;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+import java.security.Principal;
+
 public class PortalFilter implements Filter
 {
     protected String guest = "guest";
@@ -70,9 +69,9 @@ public class PortalFilter implements Fil
             if (username != null)
             {
                 ComponentManager cm = Jetspeed.getComponentManager();
-                UserManager userManager = (UserManager)cm.getComponent("org.apache.jetspeed.security.UserManager");
-                AuditActivity audit = (AuditActivity)cm.getComponent("org.apache.jetspeed.audit.AuditActivity");
-                AuthenticationProvider authProvider = (AuthenticationProvider)cm.getComponent("org.apache.jetspeed.security.AuthenticationProvider");
+                UserManager userManager = cm.lookupComponent("org.apache.jetspeed.security.UserManager");
+                AuditActivity audit = cm.lookupComponent("org.apache.jetspeed.audit.AuditActivity");
+                AuthenticationProvider authProvider = cm.lookupComponent("org.apache.jetspeed.security.AuthenticationProvider");
                 
                 // Commenting out for the using latest securty API's
                 //boolean success = userManager.authenticate(username, password);
@@ -89,15 +88,15 @@ public class PortalFilter implements Fil
                 if (authUser != null)
                 {
                     audit.logUserActivity(username, request.getRemoteAddr(), AuditActivity.AUTHENTICATION_SUCCESS, "PortalFilter");
-                    PortalAuthenticationConfiguration authenticationConfiguration = (PortalAuthenticationConfiguration)
-                        cm.getComponent("org.apache.jetspeed.administration.PortalAuthenticationConfiguration");
+                    PortalAuthenticationConfiguration authenticationConfiguration =
+                        cm.lookupComponent("org.apache.jetspeed.administration.PortalAuthenticationConfiguration");
                     if (authenticationConfiguration.isCreateNewSessionOnLogin() && httpSession != null && !httpSession.isNew())
                     {
                         request.getSession().invalidate();
                     }
                     else
                     {
-                        UserContentCacheManager userContentCacheManager = (UserContentCacheManager)cm.getComponent("userContentCacheManager");
+                        UserContentCacheManager userContentCacheManager = cm.lookupComponent("userContentCacheManager");
                         userContentCacheManager.evictUserContentCache(username, request.getSession().getId());
                     }
                     if (authUser.getUser() == null)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java Tue Oct 29 17:11:29 2013
@@ -16,18 +16,6 @@
  */
 package org.apache.jetspeed.manager;
 
-import java.io.CharArrayWriter;
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
 import org.apache.commons.fileupload.DiskFileUpload;
 import org.apache.commons.fileupload.FileItem;
 import org.apache.commons.fileupload.FileUpload;
@@ -41,6 +29,17 @@ import org.apache.jetspeed.om.portlet.Po
 import org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager;
 import org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult;
 
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.CharArrayWriter;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.List;
+
 /**
  * ManagerServlet ala Tomcat ManagerServlet 
  *
@@ -68,10 +67,10 @@ public class ManagerServlet extends Http
     public void init() throws ServletException
     {
         super.init();
-        asm = (ApplicationServerManager) Jetspeed.getComponentManager().getComponent(ApplicationServerManager.class);
-        registry = (PortletRegistry) Jetspeed.getComponentManager().getComponent(PortletRegistry.class);
-        portletFactory = (PortletFactory) Jetspeed.getComponentManager().getComponent("portletFactory");
-        dm = (DeploymentManager) Jetspeed.getComponentManager().getComponent("deploymentManager");
+        asm = Jetspeed.getComponentManager().lookupComponent(ApplicationServerManager.class);
+        registry = Jetspeed.getComponentManager().lookupComponent(PortletRegistry.class);
+        portletFactory = Jetspeed.getComponentManager().lookupComponent("portletFactory");
+        dm =  Jetspeed.getComponentManager().lookupComponent("deploymentManager");
     }
 
     public void destroy()



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