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 [1/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
Author: taylor
Date: Tue Oct 29 17:11:29 2013
New Revision: 1536817

URL: http://svn.apache.org/r1536817
Log:
JS2-874: second checkpoint on generics refactoring. Still ongoing

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/CapabilityMapImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/ClientImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/MediaTypeImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/test/java/org/apache/jetspeed/capabilities/TestCapability.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/general/TestCachingInterceptors.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/db/serializer/JetspeedSerializerApplicationImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/page/serializer/JetspeedPageSerializerApplicationImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-file-cache/src/main/java/org/apache/jetspeed/cache/file/FileCache.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/test/java/org/apache/jetspeed/layout/AbstractTestPageLayout.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BaseElementImpl.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/cache/DatabasePageManagerServer.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ajax/AjaxRequestServiceImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/deployment/simpleregistry/SimpleRegistry.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/AddPortletAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BasePortletAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseSiteUpdateAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseUserAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/ChangePortletAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFolderListAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetFoldersListAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetLinkAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetMenuAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetMenusAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPagesAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletActionsAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetPortletsAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetThemesAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetUserInformationAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/GetUserListAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MovePortletAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/MultipleAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/RemovePortletAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityConstraintsAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/SecurityPermissionAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdateFolderAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdateLinkAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/UpdatePageAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/localization/impl/LocalizationValveImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginErrorServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginProxyServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginRedirectorServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/LoginServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/login/filter/PortalFilter.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/manager/ManagerServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/openid/OpenIDRelayingPartyServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/JetspeedPipelineMapper.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/security/impl/LoginValidationValveImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/security/impl/cas/CASPortalFilter.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/security/impl/shibboleth/ShibbolethPortalFilter.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedVelocityViewServlet.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractRequestContextTestCase.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/aggregator/TestAggregator.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/cluster/TestCluster.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/TestNavigationalState.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/engine/AbstractEngineTest.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/layout/TestConstraintsAction.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/layout/TestLayout.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/services/rest/TestPageLayoutService.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManagerServer.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletApplicationManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestProfiler.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletpreferences/TestPortletPreferencesProvider.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/AbstractRegistryTest.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestRegistryCache.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/BaseJetspeedPrincipalManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/AbstractSecurityTestcase.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestRdbmsPolicy.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-serializer/src/test/java/org/apache/jetspeed/serializer/TestSerializer.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/test/java/org/apache/jetspeed/sso/AbstractSecurityTestCase.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/test/java/org/apache/jetspeed/sso/TestSSOComponent.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/test/java/org/apache/jetspeed/sso/TestSSOManager.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/audit/TestAuditActivity.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/statistics/TestStatistics.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AJAXException.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AJAXRequest.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AJAXResponse.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AJAXService.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxAction.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxBuilder.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/ajax/AjaxRequestService.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/audit/AuditActivity.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/cache/JetspeedCache.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/Capabilities.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/CapabilityMap.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/Client.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/capabilities/MediaType.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/cluster/NodeManager.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/ComponentManagement.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/ContainerManagement.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletpreferences/PortletPreferencesProvider.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/components/portletregistry/PortletRegistry.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/om/page/ContentFragment.java
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/Jetspeed.java
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/PortletObjectProxy.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/CapabilityMapImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/CapabilityMapImpl.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/CapabilityMapImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/CapabilityMapImpl.java Tue Oct 29 17:11:29 2013
@@ -16,19 +16,18 @@
  */
 package org.apache.jetspeed.capabilities.impl;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.jetspeed.capabilities.Capability;
 import org.apache.jetspeed.capabilities.CapabilityMap;
 import org.apache.jetspeed.capabilities.Client;
-import org.apache.jetspeed.capabilities.Capability;
 import org.apache.jetspeed.capabilities.MediaType;
+import org.apache.jetspeed.capabilities.MimeType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.jetspeed.capabilities.MimeType;
-
 /**
  * Implementation for capabilityMap interface
  *
@@ -41,11 +40,11 @@ class CapabilityMapImpl implements Capab
         LoggerFactory.getLogger(JetspeedCapabilities.class);
     
     // Members
-    private String useragent; // User agent for request
-    private Map mimeTypeMap = new HashMap(); // supported Mimetypes for Agent
-    private Map capabilityMap = new HashMap();
+    private String userAgent; // User agent for request
+    private Map<String,MimeType> mimeTypeMap = new HashMap<String,MimeType>(); // supported Mimetypes for Agent
+    private Map<String,Capability> capabilityMap = new HashMap<String,Capability>();
     // supported Capabilities for Agent
-    private Map mediaTypeMap = new HashMap(); // supported MediaTypes for Agent
+    private Map<String,MediaType> mediaTypeMap = new HashMap<String,MediaType>(); // supported MediaTypes for Agent
     private Client client; // client for Agent
     private MediaType preferredMediaType; // Preferred MediaType for client.
 
@@ -136,7 +135,7 @@ class CapabilityMapImpl implements Capab
      * Returns an ordered list of supported media-types, from most preferred
      * to least preferred
      */
-    public Iterator listMediaTypes()
+    public Iterator<MediaType> listMediaTypes()
     {
         return mediaTypeMap.values().iterator();
     }
@@ -146,7 +145,7 @@ class CapabilityMapImpl implements Capab
     */
     public String getAgent()
     {
-        return this.useragent;
+        return this.userAgent;
     }
 
     /**
@@ -154,7 +153,7 @@ class CapabilityMapImpl implements Capab
      */
     public void setAgent(String userAgent)
     {
-        this.useragent = userAgent;
+        this.userAgent = userAgent;
     }
 
     /**
@@ -193,7 +192,7 @@ class CapabilityMapImpl implements Capab
     /**
     Get the mime types that this CapabilityMap supports.
     */
-    public Iterator getMimeTypes()
+    public Iterator<MimeType> getMimeTypes()
     {
         return mimeTypeMap.values().iterator();
     }
@@ -203,10 +202,10 @@ class CapabilityMapImpl implements Capab
     */
     public boolean supportsMimeType(MimeType mimeType)
     {
-        Iterator mimetypes = mimeTypeMap.values().iterator();
+        Iterator<MimeType> mimetypes = mimeTypeMap.values().iterator();
         while (mimetypes.hasNext())
         {
-            if (((MimeType) mimetypes.next()).getName().equals(mimeType.getName()))
+            if (mimetypes.next().getName().equals(mimeType.getName()))
             {
                 return true;
             }
@@ -225,10 +224,10 @@ class CapabilityMapImpl implements Capab
      */
     public boolean supportsMediaType(String media)
     {
-        Iterator mediatypes = mediaTypeMap.values().iterator();
+        Iterator<MediaType> mediatypes = mediaTypeMap.values().iterator();
         while (mediatypes.hasNext())
         {
-            if (((MediaType) mediatypes.next()).getName().equals(media))
+            if (mediatypes.next().getName().equals(media))
             {
                 return true;
             }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/ClientImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/ClientImpl.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/ClientImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/ClientImpl.java Tue Oct 29 17:11:29 2013
@@ -18,7 +18,9 @@
 package org.apache.jetspeed.capabilities.impl;
 
 import org.apache.commons.collections.CollectionUtils;
+import org.apache.jetspeed.capabilities.Capability;
 import org.apache.jetspeed.capabilities.Client;
+import org.apache.jetspeed.capabilities.MimeType;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -37,8 +39,8 @@ public class ClientImpl implements Clien
     private String model = "";
     private String version = "";
     private String name;
-    private Collection mimetypes;
-    private Collection capabilities;
+    private Collection<MimeType> mimetypes;
+    private Collection<Capability> capabilities;
     private int preferredMimeTypeId;
 
     private int clientId;
@@ -161,25 +163,25 @@ public class ClientImpl implements Clien
         version = name;
     }
 
-    public Collection getMimetypes() {
+    public Collection<MimeType> getMimetypes() {
         if (this.mimetypes == null) {
             this.mimetypes = new ArrayList();
         }
         return mimetypes;
     }
 
-    public void setMimetypes(Collection mimetypes) {
+    public void setMimetypes(Collection<MimeType> mimetypes) {
         this.mimetypes = mimetypes;
     }
 
-    public Collection getCapabilities() {
+    public Collection<Capability> getCapabilities() {
         if (capabilities == null) {
             capabilities = new ArrayList();
         }
         return capabilities;
     }
 
-    public void setCapabilities(Collection capabilities) {
+    public void setCapabilities(Collection<Capability> capabilities) {
         this.capabilities = capabilities;
     }
 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/JetspeedCapabilities.java Tue Oct 29 17:11:29 2013
@@ -16,15 +16,6 @@
  */
 package org.apache.jetspeed.capabilities.impl;
 
-import java.util.Collection;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Properties;
-import java.util.Vector;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.capabilities.Capabilities;
 import org.apache.jetspeed.capabilities.CapabilitiesException;
 import org.apache.jetspeed.capabilities.Capability;
@@ -37,10 +28,19 @@ import org.apache.jetspeed.components.da
 import org.apache.ojb.broker.query.Criteria;
 import org.apache.ojb.broker.query.QueryByCriteria;
 import org.apache.ojb.broker.query.QueryFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.BeanFactory;
 import org.springframework.beans.factory.BeanFactoryAware;
 
+import java.util.Collection;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Properties;
+import java.util.Vector;
+
 /**
  * Jetspeed Capabilities
  *
@@ -161,7 +161,6 @@ public class JetspeedCapabilities extend
     /**
      * @param userAgent Agent from the request
      * @throws UnableToBuildCapabilityMapException
-     * @see org.apache.jetspeed.services.capability.CapabilityService#getCapabilityMap(java.lang.String)
      */
     public CapabilityMap getCapabilityMap(String userAgent) throws UnableToBuildCapabilityMapException
     {        
@@ -316,10 +315,10 @@ public class JetspeedCapabilities extend
     /**
      * Returns the client which matches the given useragent string.
      *
-     * @param useragent     the useragent to match
+     * @param userAgent the user agent to match
      * @return the found client or null if the user-agent does not match any
      *  defined client
-     * @see org.apache.jetspeed.capabilities.CapabilityService#findClient(java.lang.String)
+     * @see Capabilities#findClient(String)
      */
 
     public Client findClient(String userAgent)
@@ -341,14 +340,9 @@ public class JetspeedCapabilities extend
             {
                 try
                 {
-                    // Java 1.4 has regular expressions build in
                     String exp = client.getUserAgentPattern();
-                    //RE r = new RE(client.getUserAgentPattern());
-                    //r.setMatchFlags(RE.MATCH_CASEINDEPENDENT);
-                    //if (r.match(userAgent))
                     if (userAgent.matches(exp))
                     {
-
                         if (log.isDebugEnabled())
                         {
                             log.debug(
@@ -357,7 +351,6 @@ public class JetspeedCapabilities extend
                                     + " matches "
                                     + client.getUserAgentPattern());
                         }
-
                         return client;
                     } else
                     {
@@ -388,7 +381,7 @@ public class JetspeedCapabilities extend
     /* 
      * @see org.apache.jetspeed.capabilities.CapabilityService#getClients()
      */
-    public Iterator getClients()
+    public Iterator<Client> getClients()
     {
         if (null == clients)
         {
@@ -413,7 +406,7 @@ public class JetspeedCapabilities extend
     /* 
      * @see org.apache.jetspeed.capabilities.CapabilityService#getMediaTypesForMimeTypes(java.util.Iterator)
      */
-    public Collection getMediaTypesForMimeTypes(Iterator mimetypes)
+    public Collection<MediaType> getMediaTypesForMimeTypes(Iterator mimetypes)
     {
         //Find the MediaType by matching the Mimetype
         
@@ -495,7 +488,7 @@ public class JetspeedCapabilities extend
 
     /**
      * getMediaTypeForMimeType
-     * @param mimeType to use for lookup
+     * @param mimeTypeName to use for lookup
      * @return MediaTypeEntry that matches the lookup in the MEDIATYPE_TO_MIMETYPE table
      */
     public MediaType getMediaTypeForMimeType(String mimeTypeName)
@@ -532,7 +525,7 @@ public class JetspeedCapabilities extend
      * Obtain an iterator of all existing capabilities.
      * @return Returns an iterator for all existing Capabilities of type <code>Capability</code>
      */
-    public Iterator getCapabilities()
+    public Iterator<Capability> getCapabilities()
     {
     	QueryByCriteria query = null;
 		try
@@ -549,12 +542,12 @@ public class JetspeedCapabilities extend
         query.addOrderByAscending("name");
         return getPersistenceBrokerTemplate().getCollectionByQuery(query).iterator();        
     }
-    
+
     /**
      * Obtain an iterator of all existing mime types.
      * @return Returns an iterator for all existing Mime Types of type <code>MimeType</code>
      */
-    public Iterator getMimeTypes()
+    public Iterator<MimeType> getMimeTypes()
     {
 		try
 		{
@@ -575,7 +568,7 @@ public class JetspeedCapabilities extend
      * Obtain an iterator of all existing media types.
      * @return Returns an iterator for all existing media types of type <code>MediaType</code>
      */
-    public Iterator getMediaTypes()
+    public Iterator<MediaType> getMediaTypes()
     {
 		try
 		{

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/MediaTypeImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/MediaTypeImpl.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/MediaTypeImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/capabilities/impl/MediaTypeImpl.java Tue Oct 29 17:11:29 2013
@@ -16,14 +16,14 @@
  */
 package org.apache.jetspeed.capabilities.impl;
 
-import java.util.ArrayList;
-import java.util.Collection;
-
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.jetspeed.capabilities.Capability;
 import org.apache.jetspeed.capabilities.MediaType;
 import org.apache.jetspeed.capabilities.MimeType;
 
+import java.util.ArrayList;
+import java.util.Collection;
+
 /**
  * Default bean like implementation of MediaTypeEntry interface
  * suitable for serializing with Castor
@@ -35,8 +35,8 @@ public class MediaTypeImpl 
     implements MediaType
 {
     protected String characterSet;
-    private Collection capabilities;
-    private Collection mimetypes;
+    private Collection<Capability> capabilities;
+    private Collection<MimeType> mimetypes;
     private int mediatypeId;
     private String title;
     private String description;
@@ -164,23 +164,23 @@ public class MediaTypeImpl 
     }
 
     
-    public Collection getCapabilities()
+    public Collection<Capability> getCapabilities()
     {
         return this.capabilities;
     }
 
-    public void setCapabilities(Collection capabilities)
+    public void setCapabilities(Collection<Capability> capabilities)
     {
         this.capabilities = capabilities;
     }
     
     
-    public Collection getMimetypes()
+    public Collection<MimeType> getMimetypes()
     {
         return this.mimetypes;
     }
     
-    public void setMimetypes(Collection mimetypes)
+    public void setMimetypes(Collection<MimeType> mimetypes)
     {
         this.mimetypes = mimetypes;
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/test/java/org/apache/jetspeed/capabilities/TestCapability.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/test/java/org/apache/jetspeed/capabilities/TestCapability.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/test/java/org/apache/jetspeed/capabilities/TestCapability.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/test/java/org/apache/jetspeed/capabilities/TestCapability.java Tue Oct 29 17:11:29 2013
@@ -17,16 +17,15 @@
 
 package org.apache.jetspeed.capabilities;
 
+import junit.framework.Test;
+import org.apache.jetspeed.components.util.DatasourceEnabledSpringTestCase;
+import org.apache.jetspeed.serializer.JetspeedSerializer;
+
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Set;
 
-import junit.framework.Test;
-
-import org.apache.jetspeed.components.util.DatasourceEnabledSpringTestCase;
-import org.apache.jetspeed.serializer.JetspeedSerializer;
-
 
 /**
  * Test Capability Service
@@ -41,7 +40,7 @@ public class TestCapability extends Data
     protected void setUp() throws Exception
     {
         super.setUp();
-        capabilities = (Capabilities) scm.getComponent("capabilities");
+        capabilities = scm.lookupComponent("capabilities");
     }
 
     public static Test suite()
@@ -51,14 +50,14 @@ public class TestCapability extends Data
 
     public void firstTestSetup() throws Exception
     {
-        JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent("serializer");
+        JetspeedSerializer serializer = scm.lookupComponent("serializer");
         serializer.deleteData();
         serializer.importData(getBaseDir()+"target/test-classes/j2-seed.xml");
     }
 
     public void lastTestTeardown() throws Exception
     {
-        JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent("serializer");
+        JetspeedSerializer serializer = scm.lookupComponent("serializer");
         serializer.deleteData();
     }
     
@@ -172,18 +171,16 @@ public class TestCapability extends Data
         System.out.println("Encoding = " + encoding);
         System.out.println("Supported MediaTypes");
         Iterator cmIterator = cm.listMediaTypes();
-
         while (cmIterator.hasNext())
         {
             System.out.println(((MediaType) cmIterator.next()).getName());
         }
 
         System.out.println("Supported MimeTypes");
-        Iterator mtIterator = cm.getMimeTypes();
-
+        Iterator<MimeType> mtIterator = cm.getMimeTypes();
         while (mtIterator.hasNext())
         {
-            System.out.println(((MimeType) mtIterator.next()).getName());
+            System.out.println(mtIterator.next().getName());
         }
     }
 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/SpringComponentManager.java Tue Oct 29 17:11:29 2013
@@ -16,6 +16,13 @@
  */
 package org.apache.jetspeed.components;
 
+import org.apache.jetspeed.engine.JetspeedEngineConstants;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
+import org.springframework.web.context.WebApplicationContext;
+
+import javax.servlet.ServletContext;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -23,14 +30,6 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.Properties;
 
-import javax.servlet.ServletContext;
-
-import org.apache.jetspeed.engine.JetspeedEngineConstants;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.support.FileSystemXmlApplicationContext;
-import org.springframework.web.context.WebApplicationContext;
-
 /**
  * <p>
  * SpringComponentManager
@@ -47,9 +46,9 @@ public class SpringComponentManager impl
 
     private ConfigurableApplicationContext bootCtx;
 
-    protected ArrayList factories;
+    protected ArrayList<ApplicationContext> factories;
 
-    private Map preconfiguredBeans;
+    private Map<String, Object> preconfiguredBeans;
 
     private boolean started = false;
 
@@ -86,7 +85,7 @@ public class SpringComponentManager impl
         }
         appContext = new FilteringXmlWebApplicationContext(filter, appConfigs, initProperties, servletContext, bootCtx);
 
-        factories = new ArrayList();
+        factories = new ArrayList<ApplicationContext>();
         factories.add(appContext);
 
         servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, appContext);
@@ -163,13 +162,16 @@ public class SpringComponentManager impl
     }
     
     /**
-     * <p>
-     * getComponent
-     * </p>
-     * 
+     * Lookup a Jetspeed Component in the IOC container, returning an un-casted instance of
+     * the component service. Deprecated. Use {@link SpringComponentManager#lookupComponent(String)}
+     *
      * @see org.apache.jetspeed.components.ComponentManagement#getComponent(java.lang.Object)
-     * @param componentName
-     * @return
+     * @param componentName can be either a String or a #{@link @java.lang.Class} If its a Class,
+     *                      the component name must match the toString representation of that class
+     * @deprecated in 2.2.3
+     * @see {@link SpringComponentManager#lookupComponent(String)} or
+     *      {@link SpringComponentManager#lookupComponent(Class)}
+     * @return the component instance of null if not found
      */
     public Object getComponent(Object componentName)
     {
@@ -286,7 +288,7 @@ public class SpringComponentManager impl
     {
         if (preconfiguredBeans == null)
         {
-            preconfiguredBeans = new HashMap();
+            preconfiguredBeans = new HashMap<String, Object>();
         }
         preconfiguredBeans.put(name, bean);
 
@@ -315,4 +317,31 @@ public class SpringComponentManager impl
         
         started = true;
     }
+
+    /**
+     * Lookup a Jetspeed Component in the IOC container, returning an automatically casted instance of
+     * the component service
+     *
+     * @param componentName the name of the component (bean) to lookup
+     * @param <T> the return type of the interface of the component
+     * @return the implementing component service for the given name
+     * @since 2.2.3
+     */
+    public <T> T lookupComponent(String componentName) {
+        return appContext == null ? null : (T) appContext.getBean(componentName);
+    }
+
+    /**
+     * Lookup a Jetspeed Component in the IOC container, returning an automatically casted instance of
+     * the component service
+     *
+     * @param componentClass the class of the component (bean) singleton to lookup
+     * @param <T> the return type of the interface of the component
+     * @return the implementing component service for the given name
+     * @since 2.2.3
+     */
+    public <T> T lookupComponent(Class componentClass) {
+        return appContext == null ? null : (T) appContext.getBean(componentClass.getName());
+    }
+
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/general/TestCachingInterceptors.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/general/TestCachingInterceptors.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/general/TestCachingInterceptors.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/test/java/org/apache/jetspeed/cache/general/TestCachingInterceptors.java Tue Oct 29 17:11:29 2013
@@ -37,8 +37,8 @@ public class TestCachingInterceptors ext
     
     public void testInterceptors() throws Exception
     {
-        MockComponent mc = (MockComponent)scm.getComponent("mockComponent");
-        InvocationCountingCache cache = (InvocationCountingCache) scm.getComponent("systemCache");
+        MockComponent mc = scm.lookupComponent("mockComponent");
+        InvocationCountingCache cache = scm.lookupComponent("systemCache");
         assertNotNull(mc);
         assertNotNull(cache);
         

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/db/serializer/JetspeedSerializerApplicationImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/db/serializer/JetspeedSerializerApplicationImpl.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/db/serializer/JetspeedSerializerApplicationImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/db/serializer/JetspeedSerializerApplicationImpl.java Tue Oct 29 17:11:29 2013
@@ -16,13 +16,6 @@
  */
 package org.apache.jetspeed.tools.db.serializer;
 
-import java.io.File;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.HashMap;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
 import org.apache.commons.configuration.Configuration;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.administration.PortalConfigurationConstants;
@@ -36,6 +29,13 @@ import org.apache.jetspeed.tools.ToolsLo
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.HashMap;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
 /**
  * Jetspeed Serializer Application
  * 
@@ -182,12 +182,12 @@ public class JetspeedSerializerApplicati
             
             scm = new SpringComponentManager(filter, bootConfig, appConfig, applicationRootPath, initProperties, true);
             scm.start();
-            Configuration config = (Configuration)scm.getComponent("portal_configuration");
+            Configuration config = scm.lookupComponent("portal_configuration");
             if (config != null)
             {
             	new JetspeedActions(config.getStringArray(PortalConfigurationConstants.SUPPORTED_PORTLET_MODES), config.getStringArray(PortalConfigurationConstants.SUPPORTED_WINDOW_STATES));
             }
-            JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent(JetspeedSerializer.class.getName());
+            JetspeedSerializer serializer = scm.lookupComponent(JetspeedSerializer.class.getName());
             HashMap settings = new HashMap();
             settings.put(JetspeedSerializer.KEY_LOGGER, logger);
             if (seedFiles != null)
@@ -254,12 +254,12 @@ public class JetspeedSerializerApplicati
             
             scm = new SpringComponentManager(filter, bootConfig, appConfig, applicationRootPath, true);
             scm.start();
-            Configuration config = (Configuration)scm.getComponent("portal_configuration");
+            Configuration config = scm.lookupComponent("portal_configuration");
             if (config != null)
             {
             	new JetspeedActions(config.getStringArray(PortalConfigurationConstants.SUPPORTED_PORTLET_MODES), config.getStringArray(PortalConfigurationConstants.SUPPORTED_WINDOW_STATES));
             }            
-            JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent(JetspeedSerializer.class.getName());
+            JetspeedSerializer serializer = scm.lookupComponent(JetspeedSerializer.class.getName());
             HashMap settings = new HashMap();
             settings.put(JetspeedSerializer.KEY_LOGGER, logger);
             if (exportFile != null)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/page/serializer/JetspeedPageSerializerApplicationImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/page/serializer/JetspeedPageSerializerApplicationImpl.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/page/serializer/JetspeedPageSerializerApplicationImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/page/serializer/JetspeedPageSerializerApplicationImpl.java Tue Oct 29 17:11:29 2013
@@ -17,12 +17,6 @@
 
 package org.apache.jetspeed.tools.page.serializer;
 
-import java.io.File;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Properties;
-
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.components.JetspeedBeanDefinitionFilter;
 import org.apache.jetspeed.components.SpringComponentManager;
 import org.apache.jetspeed.components.util.Slf4JToolsLogger;
@@ -31,6 +25,12 @@ import org.apache.jetspeed.page.Jetspeed
 import org.apache.jetspeed.page.PageSerializer;
 import org.apache.jetspeed.page.PageSerializer.Result;
 import org.apache.jetspeed.tools.ToolsLogger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Properties;
 
 /**
  * Commandline or standalone execution of JetspeedPageSerializer
@@ -183,7 +183,7 @@ public class JetspeedPageSerializerAppli
             scm = new SpringComponentManager(filter, bootConfig, appConfig, applicationRootPath, initProperties, true);
             scm.start();
             
-            PageSerializer serializer = (PageSerializer)scm.getComponent(PageSerializer.class.getName());
+            PageSerializer serializer = scm.lookupComponent(PageSerializer.class.getName());
             if (importing)
             {
                 result = serializer.importPages(logger, rootFolder);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-file-cache/src/main/java/org/apache/jetspeed/cache/file/FileCache.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-file-cache/src/main/java/org/apache/jetspeed/cache/file/FileCache.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-file-cache/src/main/java/org/apache/jetspeed/cache/file/FileCache.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-file-cache/src/main/java/org/apache/jetspeed/cache/file/FileCache.java Tue Oct 29 17:11:29 2013
@@ -17,18 +17,18 @@
 
 package org.apache.jetspeed.cache.file;
 
+import org.apache.jetspeed.cache.CacheElement;
+import org.apache.jetspeed.cache.JetspeedCache;
+import org.apache.jetspeed.cache.JetspeedCacheEventListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileNotFoundException;
 import java.util.Date;
 import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
-import java.io.File;
-import java.io.FileNotFoundException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.jetspeed.cache.CacheElement;
-import org.apache.jetspeed.cache.JetspeedCache;
-import org.apache.jetspeed.cache.JetspeedCacheEventListener;
 
 /**
  * FileCache keeps a cache of files up-to-date with a most simple eviction policy.
@@ -67,7 +67,6 @@ public class FileCache
      *
      * @param cache the physical cache implementation
      * @param scanRate how often in seconds to refresh and evict from the cache
-     * @param maxSize the maximum allowed size of the cache before eviction starts
      */
     public FileCache(JetspeedCache cache, long scanRate)
     {
@@ -154,8 +153,9 @@ public class FileCache
     /**
      * Puts a file entry in the file cache
      *
-     * @param path the full path name of the file
+     * @param key the full path name of the file
      * @param document the cached document
+     * @param rootFile the root file handle
      */
     public void put(String key, Object document, File rootFile)
             throws java.io.IOException

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/test/java/org/apache/jetspeed/layout/AbstractTestPageLayout.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/test/java/org/apache/jetspeed/layout/AbstractTestPageLayout.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/test/java/org/apache/jetspeed/layout/AbstractTestPageLayout.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-layout/src/test/java/org/apache/jetspeed/layout/AbstractTestPageLayout.java Tue Oct 29 17:11:29 2013
@@ -16,17 +16,6 @@
  */
 package org.apache.jetspeed.layout;
 
-import java.security.PrivilegedAction;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-
 import org.apache.jetspeed.components.test.AbstractSpringTestCase;
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.page.ContentFragment;
@@ -46,6 +35,16 @@ import org.apache.jetspeed.security.Secu
 import org.apache.jetspeed.security.User;
 import org.apache.jetspeed.security.impl.TransientJetspeedPrincipal;
 
+import javax.security.auth.Subject;
+import java.security.PrivilegedAction;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 /**
  * AbstractTestPageLayout
  * <P>
@@ -79,8 +78,8 @@ public abstract class AbstractTestPageLa
     {
         // setup components, subjects, and cleanup from previous run
         super.setUp();
-        pageManager = (PageManager) scm.getComponent("pageManager");
-        pageLayout = (PageLayoutComponent) scm.getComponent("pageLayout");
+        pageManager = scm.lookupComponent("pageManager");
+        pageLayout = scm.lookupComponent("pageLayout");
         Set principals = new PrincipalsSet();
         principals.add(new TestUser("user"));
         userSubject = new Subject(true, principals, new HashSet(), new HashSet());

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BaseElementImpl.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/BaseElementImpl.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BaseElementImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/om/page/impl/BaseElementImpl.java Tue Oct 29 17:11:29 2013
@@ -16,15 +16,6 @@
  */
 package org.apache.jetspeed.om.page.impl;
 
-import java.security.AccessController;
-import java.security.Permission;
-import java.security.Principal;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.security.auth.Subject;
-
 import org.apache.jetspeed.Jetspeed;
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.om.common.SecurityConstraint;
@@ -40,6 +31,14 @@ import org.apache.jetspeed.security.Perm
 import org.apache.jetspeed.security.Role;
 import org.apache.jetspeed.security.User;
 
+import javax.security.auth.Subject;
+import java.security.AccessController;
+import java.security.Permission;
+import java.security.Principal;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
 /**
  * BaseElementImpl
  *
@@ -129,7 +128,7 @@ public abstract class BaseElementImpl im
     {
         if (pageManager == null)
         {
-            pageManager = (PageManager)Jetspeed.getComponentManager().getComponent("org.apache.jetspeed.page.PageManager");
+            pageManager = Jetspeed.getComponentManager().lookupComponent("org.apache.jetspeed.page.PageManager");
         }        
         return pageManager;
     }     

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=1536817&r1=1536816&r2=1536817&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 Tue Oct 29 17:11:29 2013
@@ -16,16 +16,7 @@
  */
 package org.apache.jetspeed.page;
 
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-
+import junit.framework.Test;
 import org.apache.jetspeed.components.util.DatasourceEnabledSpringTestCase;
 import org.apache.jetspeed.om.common.SecurityConstraint;
 import org.apache.jetspeed.om.common.SecurityConstraints;
@@ -56,7 +47,14 @@ import org.apache.jetspeed.page.document
 import org.apache.jetspeed.security.JSSubject;
 import org.apache.jetspeed.security.PrincipalsSet;
 
-import junit.framework.Test;
+import javax.security.auth.Subject;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Set;
 
 /**
  * TestPageXmlPersistence
@@ -130,7 +128,7 @@ public class TestDatabasePageManager ext
         System.out.println("Running firstTestSetup");
         try
         {
-            PageManager pageManager = (PageManager)scm.getComponent("pageManager");
+            PageManager pageManager = scm.lookupComponent("pageManager");
 
             Folder removeRootFolder = pageManager.getFolder("/");
             pageManager.removeFolder(removeRootFolder);
@@ -142,7 +140,7 @@ public class TestDatabasePageManager ext
     
     public void testCreates() throws Exception
     {
-        final PageManager pageManager = (PageManager)scm.getComponent("pageManager");
+        final PageManager pageManager = scm.lookupComponent("pageManager");
         PageManagerEventListenerImpl pmel = new PageManagerEventListenerImpl();
         pageManager.addListener(pmel);
 
@@ -674,7 +672,7 @@ public class TestDatabasePageManager ext
 
     public void testGets() throws Exception
     {
-        PageManager pageManager = (PageManager)scm.getComponent("pageManager");
+        PageManager pageManager = scm.lookupComponent("pageManager");
         PageManagerEventListenerImpl pmel = new PageManagerEventListenerImpl();
         pageManager.addListener(pmel);
         
@@ -1139,7 +1137,7 @@ public class TestDatabasePageManager ext
 
     public void testUpdates() throws Exception
     {
-        PageManager pageManager = (PageManager)scm.getComponent("pageManager");
+        PageManager pageManager = scm.lookupComponent("pageManager");
         PageManagerEventListenerImpl pmel = new PageManagerEventListenerImpl();
         pageManager.addListener(pmel);
         
@@ -1243,7 +1241,7 @@ public class TestDatabasePageManager ext
 
     public void testRemoves() throws Exception
     {
-        PageManager pageManager = (PageManager)scm.getComponent("pageManager");
+        PageManager pageManager = scm.lookupComponent("pageManager");
         PageManagerEventListenerImpl pmel = new PageManagerEventListenerImpl();
         pageManager.addListener(pmel);
         

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/DatabasePageManagerServer.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/DatabasePageManagerServer.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/DatabasePageManagerServer.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/cache/DatabasePageManagerServer.java Tue Oct 29 17:11:29 2013
@@ -16,15 +16,6 @@
  */
 package org.apache.jetspeed.page.cache;
 
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.security.PrivilegedAction;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-
 import org.apache.commons.jexl.JexlContext;
 import org.apache.commons.jexl.JexlHelper;
 import org.apache.commons.jexl.Script;
@@ -36,10 +27,17 @@ import org.apache.jetspeed.page.PageMana
 import org.apache.jetspeed.page.PageManagerTestShared;
 import org.apache.jetspeed.security.JSSubject;
 import org.apache.jetspeed.security.PrincipalsSet;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.security.auth.Subject;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.security.PrivilegedAction;
+import java.util.HashSet;
+import java.util.Set;
+
 /**
  * DatabasePageManagerServer
  * 
@@ -92,7 +90,7 @@ public class DatabasePageManagerServer
         scm.start();
 
         // access page manager
-        pageManager = (PageManager)scm.getComponent("pageManager");
+        pageManager = scm.lookupComponent("pageManager");
         
         // create jexl context
         jexlContext = JexlHelper.createContext();

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=1536817&r1=1536816&r2=1536817&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 Tue Oct 29 17:11:29 2013
@@ -16,30 +16,21 @@
  */
 package org.apache.jetspeed.portalsite;
 
-import java.lang.reflect.Proxy;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.jetspeed.components.test.AbstractSpringTestCase;
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.folder.MenuDefinition;
+import org.apache.jetspeed.om.page.BaseConcretePageElement;
 import org.apache.jetspeed.om.page.BaseFragmentsElement;
 import org.apache.jetspeed.om.page.DynamicPage;
 import org.apache.jetspeed.om.page.FragmentDefinition;
 import org.apache.jetspeed.om.page.Link;
-import org.apache.jetspeed.om.page.BaseConcretePageElement;
 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.NodeSet;
 import org.apache.jetspeed.page.document.NodeNotFoundException;
+import org.apache.jetspeed.page.document.NodeSet;
 import org.apache.jetspeed.page.document.proxy.NodeProxy;
 import org.apache.jetspeed.portalsite.impl.MenuImpl;
 import org.apache.jetspeed.portalsite.view.PhysicalSiteView;
@@ -47,6 +38,14 @@ import org.apache.jetspeed.portalsite.vi
 import org.apache.jetspeed.profiler.ProfileLocator;
 import org.apache.jetspeed.profiler.impl.JetspeedProfileLocator;
 
+import java.lang.reflect.Proxy;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
 /**
  * TestPortalSite
  *
@@ -76,8 +75,8 @@ public class TestPortalSite extends Abst
     protected void setUp() throws Exception
     {
         super.setUp();
-        this.pageManager = (PageManager) scm.getComponent("pageManager");
-        this.portalSite = (PortalSite) scm.getComponent("portalSite");
+        this.pageManager = scm.lookupComponent("pageManager");
+        this.portalSite = scm.lookupComponent("portalSite");
         this.defaultLocale = Locale.getDefault();
         Locale.setDefault(Locale.ENGLISH);
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ajax/AjaxRequestServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ajax/AjaxRequestServiceImpl.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ajax/AjaxRequestServiceImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ajax/AjaxRequestServiceImpl.java Tue Oct 29 17:11:29 2013
@@ -16,28 +16,27 @@
  */
 package org.apache.jetspeed.ajax;
 
+import org.apache.jetspeed.layout.impl.Constants;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.VelocityEngine;
+import org.apache.velocity.context.Context;
+import org.apache.velocity.tools.generic.EscapeTool;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.Writer;
 import java.io.OutputStreamWriter;
+import java.io.Reader;
 import java.io.StringWriter;
+import java.io.Writer;
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletResponse;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.jetspeed.layout.impl.Constants;
-import org.apache.jetspeed.request.RequestContext;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.VelocityEngine;
-import org.apache.velocity.context.Context;
-import org.apache.velocity.tools.generic.EscapeTool;
-
 /**
  * 
  * Provides a generic way to handle a Ajax request/response. Useful for AJAX since
@@ -66,12 +65,12 @@ public class AjaxRequestServiceImpl impl
     /** Logger */
     protected Logger log = LoggerFactory.getLogger(AjaxRequestServiceImpl.class);
 
-    // Objects that are available to execution. These objects must
+    // Actions that are available to execution. These actions must
     // implement either the Action interface or the Builder interface
     // or both.
     // If the Action interface is implemented, then the run method is called
     // If the Build interface is implemented, then the build methods are called
-    protected Map objects;
+    protected Map<String,AjaxAction> actions;
 
     // Used to create the response XML
     protected VelocityEngine velocityEngine = null;
@@ -86,18 +85,18 @@ public class AjaxRequestServiceImpl impl
     protected EscapeTool velocityEscTool = null;
     
     // Spring can be used to inject this information
-    public AjaxRequestServiceImpl(Map objects, VelocityEngine velocityEngine)
+    public AjaxRequestServiceImpl(Map<String,AjaxAction> objects, VelocityEngine velocityEngine)
     {
-        this.objects = objects;
+        this.actions = objects;
         this.velocityEngine = velocityEngine;
         this.velocityEscTool = new EscapeTool();
     }
 
     // Spring can be used to inject this information
-    public AjaxRequestServiceImpl(Map objects, VelocityEngine velocityEngine,
+    public AjaxRequestServiceImpl(Map<String,AjaxAction> objects, VelocityEngine velocityEngine,
             String urlParameterName)
     {
-        this.objects = objects;
+        this.actions = objects;
         this.velocityEngine = velocityEngine;
         this.urlParameterName = urlParameterName;
         this.velocityEscTool = new EscapeTool();
@@ -113,21 +112,15 @@ public class AjaxRequestServiceImpl impl
             objectKey = defaultAction;
         }
         // Get the object associated with this key
-        Object object = objects.get(objectKey);
-        if (object != null)
+        AjaxAction action = actions.get(objectKey);
+        if (action != null)
         {
-            Map resultMap = new HashMap();
+            Map<String,Object> resultMap = new HashMap<String,Object>();
 
             boolean success = true;
             try
             {
-                // Check to see if this object implements the action
-                // interface
-                if (object instanceof AjaxAction)
-                {
-                    success = processAction((AjaxAction) object,
-                            requestContext, resultMap);
-                }
+                success = processAction(action, requestContext, resultMap);
             } catch (Exception e)
             {
                 success = false;
@@ -137,9 +130,9 @@ public class AjaxRequestServiceImpl impl
             {
                 // Check to see if this object implements the builder
                 // interface
-                if (object instanceof AjaxBuilder)
+                if (action instanceof AjaxBuilder)
                 {
-                    processBuilder((AjaxBuilder) object, resultMap,
+                    processBuilder((AjaxBuilder) action, resultMap,
                             requestContext, success);
                 }
             } catch (Exception e)
@@ -159,14 +152,14 @@ public class AjaxRequestServiceImpl impl
 
     // Process the action if provided
     protected boolean processAction(AjaxAction action,
-            RequestContext requestContext, Map resultMap)
+            RequestContext requestContext, Map<String,Object> resultMap)
             throws Exception
     {
         return action.run(requestContext, resultMap);
     }
 
     // Process the builder if provided
-    protected void processBuilder(AjaxBuilder builder, Map inputMap,
+    protected void processBuilder(AjaxBuilder builder, Map<String,Object> inputMap,
             RequestContext requestContext, boolean actionSuccessFlag)
     {
         // Response will always be text/xml
@@ -274,11 +267,11 @@ public class AjaxRequestServiceImpl impl
     }
     
     /**
-     * @return Returns the objects.
+     * @return Returns the actions.
      */
-    public Map getActionMap()
+    public Map<String,AjaxAction> getActionMap()
     {
-        return objects;
+        return actions;
     }
 
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/deployment/simpleregistry/SimpleRegistry.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/deployment/simpleregistry/SimpleRegistry.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/deployment/simpleregistry/SimpleRegistry.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/deployment/simpleregistry/SimpleRegistry.java Tue Oct 29 17:11:29 2013
@@ -41,9 +41,8 @@ public interface SimpleRegistry
 	/**
 	 * Registers the entry.
 	 * 
-	 * @throws java.lang.IllegalAgrumentException in <code>entry</code> is null or
 	 * <code>entry.getId()</code> is null
-	 * @throws org.apache.jetspeed.cps.simpleregistry if this <code>entry</code> is 
+	 * @throws SimpleRegistryException if this <code>entry</code> is
 	 * already registered.
 	 * @param entry
 	 */
@@ -52,7 +51,6 @@ public interface SimpleRegistry
 	/**
 	 * De-registers the entry
 	 * @param entry
-	 * @throws java.lang.IllegalAgrumentException in <code>entry</code> is null or
 	 * <code>entry.getId()</code> is null
 	 */
 	public void deRegister(Entry entry);
@@ -63,14 +61,13 @@ public interface SimpleRegistry
 	 * 
 	 * @return boolean <code>true</code> is the <code>entry</code> is registered
 	 * otherwise <code>false</code>.
-	 * @throws java.lang.IllegalAgrumentException in <code>entry</code> is null or
 	 * <code>entry.getId()</code> is null
 	 */
 	public boolean isRegistered(Entry entry);
 	
 	/**
-	 * Provides a Cloolection of <code>org.apache.jetspeed.cps.simpleregistry.Entry</code>
-	 * objects that are currently registered to this registery
+	 * Provides a Collection of <code>org.apache.jetspeed.cps.simpleregistry.Entry</code>
+	 * objects that are currently registered to this registry
 	 * @return
 	 */	
 	public Collection getRegistry();

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedEngine.java Tue Oct 29 17:11:29 2013
@@ -16,15 +16,7 @@
  */
 package org.apache.jetspeed.engine;
 
-import java.text.DateFormat;
-import java.util.Date;
-import java.util.Map;
-
-import javax.servlet.ServletConfig;
-
 import org.apache.commons.configuration.Configuration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jetspeed.JetspeedPortalContext;
 import org.apache.jetspeed.PortalContext;
 import org.apache.jetspeed.PortalReservedParameters;
@@ -40,6 +32,13 @@ import org.apache.jetspeed.statistics.Po
 import org.apache.ojb.broker.util.ClassHelper;
 import org.apache.pluto.container.PortletContainer;
 import org.apache.pluto.container.PortletContainerException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.ServletConfig;
+import java.text.DateFormat;
+import java.util.Date;
+import java.util.Map;
 
 
 /**
@@ -93,11 +92,6 @@ public class JetspeedEngine implements E
      * Initializes the engine with a commons configuration, starting all early
      * initable services.
      * 
-     * @param configuration
-     *                  a commons <code>Configuration</code> set
-     * @param applicationRoot
-     *                  a <code>String</code> path to the application root for
-     *                  resources
      * @param
      * @throws JetspeedException
      *                   when the engine fails to initilialize
@@ -117,11 +111,11 @@ public class JetspeedEngine implements E
             
             //Start the ComponentManager
             componentManager.start();
-            pipelineMapper = (Map)componentManager.getComponent("pipeline-map");
-            ((PortletFactory)componentManager.getComponent("portletFactory")).setPortalContext(context);
+            pipelineMapper = componentManager.lookupComponent("pipeline-map");
+            componentManager.<PortletFactory>lookupComponent("portletFactory").setPortalContext(context);
             try
             {
-                statistics = (PortalStatistics)componentManager.getComponent("PortalStatistics");
+                statistics = componentManager.lookupComponent("PortalStatistics");
             }
             catch (Exception e)
             {
@@ -172,7 +166,7 @@ public class JetspeedEngine implements E
             
             if (componentManager.containsComponent(PortletContainer.class))
             {
-                container = (PortletContainer) componentManager.getComponent(PortletContainer.class);
+                container = componentManager.lookupComponent(PortletContainer.class);
             }
             
             if (container != null)
@@ -269,7 +263,7 @@ public class JetspeedEngine implements E
     
     public Pipeline getPipeline( String pipelineName )
     {
-        return (Pipeline) componentManager.getComponent(pipelineName);
+        return componentManager.lookupComponent(pipelineName);
     }
 
     public Pipeline getPipeline()
@@ -282,8 +276,7 @@ public class JetspeedEngine implements E
      */
     public RequestContext getCurrentRequestContext()
     {
-        RequestContextComponent contextComponent = (RequestContextComponent) getComponentManager()
-            .getComponent(RequestContextComponent.class);
+        RequestContextComponent contextComponent = getComponentManager().lookupComponent(RequestContextComponent.class);
         return contextComponent.getRequestContext();
     }
 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedServlet.java?rev=1536817&r1=1536816&r2=1536817&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedServlet.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/engine/JetspeedServlet.java Tue Oct 29 17:11:29 2013
@@ -16,22 +16,6 @@
  */
 package org.apache.jetspeed.engine;
 
-import java.io.File;
-import java.io.IOException;
-import java.security.Principal;
-import java.util.Properties;
-
-import javax.security.auth.Subject;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-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 javax.servlet.http.HttpSessionEvent;
-import javax.servlet.http.HttpSessionListener;
-
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationUtils;
 import org.apache.commons.configuration.PropertiesConfiguration;
@@ -60,6 +44,21 @@ import org.apache.jetspeed.statistics.Po
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.security.auth.Subject;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+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 javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
+import java.io.File;
+import java.io.IOException;
+import java.security.Principal;
+import java.util.Properties;
+
 /**
  * Jetspeed Servlet entry point.
  * 
@@ -207,7 +206,7 @@ public class JetspeedServlet extends Htt
                 Jetspeed.setEngine(engine);
                 engine.start();                
                 console.info("JetspeedServlet has successfuly started the Jetspeed Portal Engine....");
-                contextComponent = (RequestContextComponent) Jetspeed.getComponentManager().getComponent(RequestContextComponent.class);
+                contextComponent = Jetspeed.getComponentManager().lookupComponent(RequestContextComponent.class);
             }
             catch (Throwable e)
             {
@@ -227,8 +226,9 @@ public class JetspeedServlet extends Htt
      * Initializes the services which need <code>RunData</code> to initialize
      * themselves (post startup).
      * 
-     * @param data
-     *            The first <code>GET</code> request.
+     * @param request The first <code>GET</code> request.
+     * @param response The first <code>GET</code> response.
+     *
      */
     public final void init( HttpServletRequest request, HttpServletResponse response )
     {
@@ -404,11 +404,11 @@ public class JetspeedServlet extends Htt
             return;
         }        
         Principal subjectUserPrincipal = SubjectHelper.getPrincipal(subject, UserSubjectPrincipal.class);
-        PortalStatistics statistics = (PortalStatistics)engine.getComponentManager().getComponent("PortalStatistics");
+        PortalStatistics statistics = engine.getComponentManager().lookupComponent("PortalStatistics");
         long sessionLength = System.currentTimeMillis() - se.getSession().getCreationTime();
         String ipAddress = (String)se.getSession().getAttribute(SecurityValve.IP_ADDRESS);
         statistics.logUserLogout(ipAddress, subjectUserPrincipal.getName(), sessionLength);    
-        UserContentCacheManager userContentCacheManager = (UserContentCacheManager)engine.getComponentManager().getComponent("userContentCacheManager");
+        UserContentCacheManager userContentCacheManager = engine.getComponentManager().lookupComponent("userContentCacheManager");
         userContentCacheManager.evictUserContentCache(subjectUserPrincipal.getName(), se.getSession().getId());
     }
            
@@ -421,7 +421,7 @@ public class JetspeedServlet extends Htt
      * @param req the original portal request
      * @param res the original portal response
      * @param context the context created for handling this request
-     * @param e the exception as occurred 
+     * @param t the exception as occurred
      * @throws IOException
      * @throws ServletException
      */

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/AddPortletAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/AddPortletAction.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/AddPortletAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/AddPortletAction.java Tue Oct 29 17:11:29 2013
@@ -16,9 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.List;
-import java.util.Map;
-
 import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
@@ -29,10 +26,12 @@ 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.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * Add Portlet portlet placement action
  * 
@@ -86,7 +85,7 @@ public class AddPortletAction 
         this.allowDuplicatePortlets = allowDuplicatePortlets;
     }
     
-    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";
@@ -213,10 +212,10 @@ public class AddPortletAction 
     protected void verifyPortletId(RequestContext requestContext, String portletId) throws Exception
     {
     	// Get the list of valid portlets from the getPortletAction
-    	List portletList = getPortletsAction.retrievePortlets(requestContext, null);
+    	List<PortletInfo> portletList = getPortletsAction.retrievePortlets(requestContext, null);
     	if(portletList != null) {
     		for(int i = 0; i < portletList.size(); i++) {
-    			PortletInfo portletInfo = (PortletInfo)portletList.get(i);
+    			PortletInfo portletInfo = portletList.get(i);
     			if(portletInfo != null) {
     				if(portletInfo.getName().equalsIgnoreCase(portletId)) {
     					// A match was found there is no need to continue
@@ -229,7 +228,7 @@ public class AddPortletAction 
     	throw new Exception(portletId + " is not a valid portlet or not allowed for this user");
     }
     
-    protected void checkForDuplicatePortlet(RequestContext requestContext, Map resultMap, String portletId)
+    protected void checkForDuplicatePortlet(RequestContext requestContext, Map<String,Object> resultMap, String portletId)
     throws AJAXException
     {
     	// Look at each portlet currently on the page
@@ -252,11 +251,11 @@ public class AddPortletAction 
 	    		return true;
 	    	} else {
 	    		// Process the child fragments if found
-	    		List childFragments = fragment.getFragments();
+	    		List<ContentFragment> childFragments = fragment.getFragments();
 	    		if(childFragments != null) {
 	    			for(int i = 0; i < childFragments.size(); i++) {
 	    				// Recursively call this method again to process the child fragments
-	    				if(isDuplicateFragment((ContentFragment)childFragments.get(i),portletId) == true) {
+	    				if(isDuplicateFragment(childFragments.get(i),portletId) == true) {
 	    					// No need to continue to loop if a duplicate was found
 	    					return true;
 	    				}

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BasePortletAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BasePortletAction.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/BasePortletAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BasePortletAction.java Tue Oct 29 17:11:29 2013
@@ -16,11 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Iterator;
-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 +24,11 @@ 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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Iterator;
+import java.util.Map;
 
 /**
  * Abstract portlet placement action
@@ -74,13 +74,13 @@ public abstract class BasePortletAction 
         this.pageManager = pageManager;
     }
 
-    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");
 
@@ -156,7 +156,7 @@ public abstract class BasePortletAction 
         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/BaseSiteUpdateAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseSiteUpdateAction.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/BaseSiteUpdateAction.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/layout/impl/BaseSiteUpdateAction.java Tue Oct 29 17:11:29 2013
@@ -16,14 +16,6 @@
  */
 package org.apache.jetspeed.layout.impl;
 
-import java.util.Collection;
-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.jetspeed.ajax.AJAXException;
 import org.apache.jetspeed.ajax.AjaxAction;
 import org.apache.jetspeed.ajax.AjaxBuilder;
@@ -33,6 +25,14 @@ import org.apache.jetspeed.om.portlet.Lo
 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.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
 
 /**
  * Abstract Site update action for folders, pages and links
@@ -68,10 +68,10 @@ public abstract class BaseSiteUpdateActi
         super(template, errorTemplate, pageManager, securityBehavior);        
     }
 
-    protected abstract int updateInformation(RequestContext requestContext, Map resultMap, Node node, String path)
+    protected abstract int updateInformation(RequestContext requestContext, Map<String,Object> resultMap, Node node, String path)
     throws AJAXException;
     
-    protected int insertMetadata(RequestContext requestContext, Map resultMap, Node node)
+    protected int insertMetadata(RequestContext requestContext, Map<String,Object> resultMap, Node node)
     throws AJAXException
     {
         String name = getActionParameter(requestContext, "name");
@@ -84,7 +84,7 @@ public abstract class BaseSiteUpdateActi
         return 1;
     }
 
-    protected int updateMetadata(RequestContext requestContext, Map resultMap, Node node)
+    protected int updateMetadata(RequestContext requestContext, Map<String,Object> resultMap, Node node)
     throws AJAXException
     {
         String name = getActionParameter(requestContext, "name");
@@ -121,7 +121,7 @@ public abstract class BaseSiteUpdateActi
         return 1;
     }
     
-    protected int removeMetadata(RequestContext requestContext, Map resultMap, Node node)
+    protected int removeMetadata(RequestContext requestContext, Map<String,Object> resultMap, Node node)
     throws AJAXException
     {
         String name = getActionParameter(requestContext, "name");
@@ -155,7 +155,7 @@ public abstract class BaseSiteUpdateActi
         return (found) ? 1 : 0;
     }
 
-    protected int insertSecurityReference(RequestContext requestContext, Map resultMap, Node node)
+    protected int insertSecurityReference(RequestContext requestContext, Map<String,Object> resultMap, Node node)
     throws AJAXException
     {
         String name = getActionParameter(requestContext, "name");
@@ -181,7 +181,7 @@ public abstract class BaseSiteUpdateActi
         return 1;        
     }
 
-    protected int updateSecurityReference(RequestContext requestContext, Map resultMap, Node node)
+    protected int updateSecurityReference(RequestContext requestContext, Map<String,Object> resultMap, Node node)
     throws AJAXException
     {
         String name = getActionParameter(requestContext, "name");
@@ -223,7 +223,7 @@ public abstract class BaseSiteUpdateActi
         return 1;
     }
     
-    protected int removeSecurityReference(RequestContext requestContext, Map resultMap, Node node)
+    protected int removeSecurityReference(RequestContext requestContext, Map<String,Object> resultMap, Node node)
     throws AJAXException
     {
         String name = getActionParameter(requestContext, "name");
@@ -248,7 +248,7 @@ public abstract class BaseSiteUpdateActi
         return 1;
     }
 
-    protected int removeSecurityDef(RequestContext requestContext, Map resultMap, Node node)
+    protected int removeSecurityDef(RequestContext requestContext, Map<String,Object> resultMap, Node node)
     throws AJAXException
     {
         String id = getActionParameter(requestContext, "id");



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