You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by cd...@apache.org on 2007/11/06 15:18:52 UTC

svn commit: r592432 [1/3] - in /portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto: ./ core/ internal/ internal/impl/ spi/ spi/optional/ util/ util/impl/ wrappers/

Author: cdoremus
Date: Tue Nov  6 06:18:47 2007
New Revision: 592432

URL: http://svn.apache.org/viewvc?rev=592432&view=rev
Log:
Applied container_trunk_branch.patch in PLUTO-404 with some fixes. There are still compile errors in PortletContextManager and PortletContainerImpl. 

Removed:
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/PortletInvoker.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletWindowImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/UserInfoAttributesServiceImpl.java
Modified:
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/Constants.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/OptionalContainerServices.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PlutoConfigurationException.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainer.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerException.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerFactory.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerRuntimeException.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletWindow.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletWindowID.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/RequiredContainerServices.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/ApplicationIdResolver.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/AttributeApplicationIdResolver.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/ContainerInvocation.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultApplicationIdResolver.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortalAdministrationService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletEnvironmentService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInfoService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInvokerService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletPreferencesService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultUserInfoService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/InitParameterApplicationIdResolver.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/PortletServlet.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/UserInfoAttribute.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/Configuration.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionRequest.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionResponse.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletConfig.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletContext.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletPreference.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletWindow.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/InternalRenderRequest.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/InternalRenderResponse.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/PortletDescriptorRegistry.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/PortletEntity.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/PreferencesValidatorRegistry.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/ActionRequestImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/BaseURLImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/CombinedPortletResourceBundle.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/Environment.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/InlinePortletResourceBundle.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/InternalImplConverter.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/InternalPortletWindowImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletConfigImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletContextImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletEntityImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferenceImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletPreferencesImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestDispatcherImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletResponseImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletSessionImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletURLImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/RandomStringUtils.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/RenderRequestImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/RenderResponseImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/ResourceBundleFactory.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/package.html
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/ContainerService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/PortalCallbackService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/PortletURLProvider.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/ResourceURLProvider.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/AdministrativeRequestListener.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/P3PAttributes.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortalAdministrationService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletEnvironmentService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletInfoService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletInvocationEvent.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletInvocationListener.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletInvokerService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletPreferencesService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletRegistryEvent.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletRegistryListener.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/PortletRegistryService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/UserInfoAttributesService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/spi/optional/UserInfoService.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/util/ArgumentUtility.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/util/Enumerator.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/util/NamespaceMapper.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/util/PrintWriterServletOutputStream.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/util/StringManager.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/util/StringUtils.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/util/impl/NamespaceMapperImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/wrappers/ActionRequestWrapper.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/wrappers/PortletRequestWrapper.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/wrappers/PortletResponseWrapper.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/wrappers/RenderRequestWrapper.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/wrappers/RenderResponseWrapper.java

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/Constants.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/Constants.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/Constants.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/Constants.java Tue Nov  6 06:18:47 2007
@@ -62,6 +62,7 @@
      */
     public final static String METHOD_ID = "org.apache.pluto.core.method";
 
+
     /**
      * The unique method identifier for render requests.  Render requests are
      * requested through a call to the {@link PortletContainer#doRender(org.apache.pluto.PortletWindow,
@@ -79,7 +80,7 @@
     public final static Integer METHOD_ACTION = new Integer(3);
 
     /**
-     * The unique method identifier for render requests.  Render requests are
+     * The unique method identifier for noop (load) requests.  Load requests are
      * requested through a call to the {@link PortletContainer#doLoad(org.apache.pluto.PortletWindow,
         * javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}
      * method.

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/OptionalContainerServices.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/OptionalContainerServices.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/OptionalContainerServices.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/OptionalContainerServices.java Tue Nov  6 06:18:47 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -18,29 +19,80 @@
 import org.apache.pluto.spi.optional.PortletPreferencesService;
 import org.apache.pluto.spi.optional.PortletEnvironmentService;
 import org.apache.pluto.spi.optional.PortletInvokerService;
-import org.apache.pluto.internal.InternalPortletWindow;
+import org.apache.pluto.spi.optional.PortletRegistryService;
+import org.apache.pluto.spi.optional.PortletInfoService;
+import org.apache.pluto.spi.optional.PortalAdministrationService;
+import org.apache.pluto.spi.optional.UserInfoService;
 
 /**
  * Defines the services necessary for integration between the Pluto Container
  * and a Portal.
- * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
+ *
+ * <p>NOTE: Backwards compatibility is not garaunteed against
+ * this interface as additional services may be needed.
+ * Please extend the DefaultOptionalContainerServices
+ * class to ensure your implementation can be used without
+ * modicications in the future.</p>
+ *
+ * @since 1.1.0
  */
 public interface OptionalContainerServices {
 
     /**
-     * Returns the portlet preferences service implementation.
-     * @return the portlet preferences service implementation.
+     * Returns the portlet preferences service implementation
+     * used by the container.
+     *
+     * @return portlet preferences service implementation.
+     */
+    PortletPreferencesService getPortletPreferencesService();
+
+    /**
+     * Returns the environment services implementation
+     * used by the container.
+     *
+     * @return portlet environment services implementation.
      */
-    public PortletPreferencesService getPortletPreferencesService();
+    PortletEnvironmentService getPortletEnvironmentService();
+
+    /**
+     * Returns the portlet registry services implementation
+     * used by the container.
+     *
+     * @return registry service implementation
+     */
+    PortletRegistryService getPortletRegistryService();
+
 
-    public PortletEnvironmentService getPortletEnvironmentService();
-    
     /**
      * Returns an invoker for the specified PortletWindow.
-     * @param portletWindow  the InternalPortletWindow used for invocation.
+     *
      * @return an invoker which can be used to service the indicated portlet.
      */
-    public PortletInvokerService getPortletInvokerService(
-    		InternalPortletWindow portletWindow);
+    PortletInvokerService getPortletInvokerService();
+
+    /**
+     * Returns the portlet info service implementation used
+     * by the container.
+     *
+     * @return portlet info service implementation.
+     */
+    PortletInfoService getPortletInfoService();
+
+    /**
+     * Returns the admin service implementation used by
+     * the container.
+     *
+     * @return portal admin service
+     */
+    PortalAdministrationService getPortalAdministrationService();
+
+
+    /**
+     * Returns the user info service implementation used
+     * by the container.
+     *
+     * @return user info service
+     */
+    UserInfoService getUserInfoService();
 
 }

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PlutoConfigurationException.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PlutoConfigurationException.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PlutoConfigurationException.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PlutoConfigurationException.java Tue Nov  6 06:18:47 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -18,7 +19,6 @@
 /**
  * Exception thrown when Pluto configuration fails.
  *
- * @author ddewolf@apache.org
  * @since Jul 2, 2005
  */
 public class PlutoConfigurationException extends RuntimeException {

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainer.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainer.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainer.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainer.java Tue Nov  6 06:18:47 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2003,2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  * 
  *      http://www.apache.org/licenses/LICENSE-2.0
  * 
@@ -46,8 +47,6 @@
  * <p/>
  * <TR><TD>{@link #destroy()}</TD> <TD>Destroy and remove container from
  * service.</TD> <TD>Performed only once per container lifecylce</TD></TR>
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
- * @author <a href="mailto:esm@apache.org">Elliot Metsger</a>
  * @version $Id: PortletContainer.java 36010 2004-07-30 14:16:06Z ddewolf $
  */
 public interface PortletContainer {
@@ -57,7 +56,7 @@
      * @param servletContext  the servlet context.
      * @throws PortletContainerException if an error occurs.
      */
-    public void init(ServletContext servletContext)
+    void init(ServletContext servletContext)
     throws PortletContainerException;
 
     /**
@@ -66,7 +65,7 @@
      * @throws PortletContainerException if an error occurs while shutting down
      *                                   the container
      */
-    public void destroy() throws PortletContainerException;
+    void destroy() throws PortletContainerException;
 
     /**
      * Calls the render method of the given portlet window.
@@ -79,7 +78,7 @@
      * @throws PortletContainerException if the portlet container implementation
      *                                   has trouble fulfilling the request
      */
-    public void doRender(PortletWindow internalPortletWindow,
+    void doRender(PortletWindow internalPortletWindow,
                          HttpServletRequest request,
                          HttpServletResponse response)
         throws PortletException, IOException, PortletContainerException;
@@ -95,7 +94,7 @@
      * @throws PortletContainerException if the portlet container implementation
      *                                   has trouble fulfilling the request
      */
-    public void doServeResource(PortletWindow internalPortletWindow,
+    void doServeResource(PortletWindow internalPortletWindow,
                          HttpServletRequest request,
                          HttpServletResponse response)
         throws PortletException, IOException, PortletContainerException;
@@ -111,7 +110,7 @@
      * @throws PortletContainerException if the portlet container implementation
      *                                   has trouble fulfilling the request
      */
-    public void doAction(PortletWindow internalPortletWindow,
+    void doAction(PortletWindow internalPortletWindow,
                          HttpServletRequest request,
                          HttpServletResponse response)
         throws PortletException, IOException, PortletContainerException;
@@ -126,34 +125,49 @@
      * @throws PortletContainerException if the portlet container implementation
      *                                   has trouble fulfilling the request
      */
-    public void doLoad(PortletWindow internalPortletWindow,
+    void doLoad(PortletWindow internalPortletWindow,
                        HttpServletRequest servletRequest,
                        HttpServletResponse servletResponse)
         throws PortletException, IOException, PortletContainerException;
 
     /**
+     * Indicates that the portal needs to perform administrative
+     * actions upon the portlet and/or portlet application.  An
+     * administrative request will be spawned and any registered
+     * handlers invoked.
+     * @param portletWindow   the portlet window
+     * @param servletRequest  the servlet request
+     * @param servletResponse the servlet response
+     * @throws PortletContainerException if the request can not be fullfilled.
+     */
+    void doAdmin(PortletWindow portletWindow,
+                 HttpServletRequest servletRequest,
+                 HttpServletResponse servletResponse)
+    throws PortletException, IOException, PortletContainerException;
+
+    /**
      * Returns whether the container is already initialized or not.
      * @return <code>true</code> if the container is initialized
      */
-    public boolean isInitialized();
+    boolean isInitialized();
 
     /**
      * Retrieve the unique container name
      * @return the container name.
      */
-    public String getName();
+    String getName();
 
     /**
      * Retreive the required container services associated with this container.
      * @return the required container services associated with this container.
      */
-    public RequiredContainerServices getRequiredContainerServices();
+    RequiredContainerServices getRequiredContainerServices();
 
     /**
      * Retrieve the optional container services associated with this contianer.
      * @return the container services provided by either the portal or the defaults.
      */
-    public OptionalContainerServices getOptionalContainerServices();
+    OptionalContainerServices getOptionalContainerServices();
     
     /**
      * Retrieve the {@link PortletAppDD} for the portlet
@@ -167,7 +181,7 @@
      *                                   the context of the portlet, or retrieving
      *                                   the <code>PortletAppDD</code>
      */    
-    public PortletAppDD getPortletApplicationDescriptor(String context)
+    PortletAppDD getPortletApplicationDescriptor(String context)
         throws PortletContainerException;
 
 	public ServletContext getServletContext();

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerException.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerException.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerException.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerException.java Tue Nov  6 06:18:47 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2003,2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  * 
  *      http://www.apache.org/licenses/LICENSE-2.0
  * 

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerFactory.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerFactory.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerFactory.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerFactory.java Tue Nov  6 06:18:47 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -17,8 +18,8 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.pluto.core.DefaultOptionalContainerServices;
 import org.apache.pluto.core.PortletContainerImpl;
+import org.apache.pluto.core.DefaultOptionalContainerServices;
 import org.apache.pluto.util.ArgumentUtility;
 
 /**
@@ -26,7 +27,6 @@
  * the underlying pluto container implementation by using the the given
  * container services.
  *
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
  * @version 1.0
  * @since Sep 18, 2004
  */
@@ -77,15 +77,15 @@
     		String containerName,
     		RequiredContainerServices requiredServices,
     		OptionalContainerServices optionalServices) {
-    	
+
         ArgumentUtility.validateNotNull("requiredServices", requiredServices);
         ArgumentUtility.validateNotEmpty("containerName", containerName);
-        
+
         DefaultOptionalContainerServices optionalServicesWrapper =
         		new DefaultOptionalContainerServices(optionalServices);
         PortletContainer container = new PortletContainerImpl(
         		containerName, requiredServices, optionalServicesWrapper);
-        
+
         if (LOG.isInfoEnabled()) {
             LOG.info("Portlet Container [" + containerName + "] created.");
         }

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerRuntimeException.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerRuntimeException.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerRuntimeException.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletContainerRuntimeException.java Tue Nov  6 06:18:47 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletWindow.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletWindow.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletWindow.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletWindow.java Tue Nov  6 06:18:47 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -23,11 +24,9 @@
  * request should be processed.  The PortletWindow is used internally
  * to map the request to the configured Portlet Application and Portlet.
  *
- * @see org.apache.pluto.core.PortletWindowImpl
+ * @see org.apache.pluto.internal.impl.InternalPortletWindowImpl
  * @see org.apache.pluto.descriptors.portlet.PortletDD
  *
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
  * @version 1.0
  * @since Sep 22, 2004
  */
@@ -64,5 +63,5 @@
      * @return the current portlet mode.
      */
     public PortletMode getPortletMode();
-    
+
 }

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletWindowID.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletWindowID.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletWindowID.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/PortletWindowID.java Tue Nov  6 06:18:47 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -17,11 +18,10 @@
 
 /**
  * The portlet window ID.
- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
  * @version 1.0
  */
 public interface PortletWindowID {
-	
+
 	/**
 	 * Returns the unique string ID of the portlet window.
 	 * <p>
@@ -31,6 +31,6 @@
 	 * </p>
 	 * @return the unique string ID of the portlet window.
 	 */
-	public String getStringId();
-	
+	String getStringId();
+
 }

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/RequiredContainerServices.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/RequiredContainerServices.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/RequiredContainerServices.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/RequiredContainerServices.java Tue Nov  6 06:18:47 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -23,8 +24,7 @@
 /**
  * This interface defines the services required for integration between the
  * Pluto Portlet Container and a Portal.
- * 
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
+ *
  */
 public interface RequiredContainerServices {
 
@@ -33,19 +33,19 @@
      * portlet container services.
      * @return a PortalContext implementation.
      */
-    public PortalContext getPortalContext();
+    PortalContext getPortalContext();
 
     /**
      * Returns the portal callback service implementation instance associated
      * with this group of portlet container services. 
      * @return a PortalCallbackService implementation.
      */
-    public PortalCallbackService getPortalCallbackService();
+    PortalCallbackService getPortalCallbackService();
     
     /**
      * Returns the CC/PP profile service implementation
      * @return a CCPPProfileServiceImplementation
      */
-    public CCPPProfileService getCCPPProfileService();
+    CCPPProfileService getCCPPProfileService();
     
 }

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/ApplicationIdResolver.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/ApplicationIdResolver.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/ApplicationIdResolver.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/ApplicationIdResolver.java Tue Nov  6 06:18:47 2007
@@ -1,4 +1,5 @@
 /*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -43,4 +44,4 @@
      */
     int getAuthority();
 
-}
+}
\ No newline at end of file

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/AttributeApplicationIdResolver.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/AttributeApplicationIdResolver.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/AttributeApplicationIdResolver.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/AttributeApplicationIdResolver.java Tue Nov  6 06:18:47 2007
@@ -1,4 +1,5 @@
 /*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -30,4 +31,4 @@
     public int getAuthority() {
         return MANUAL;
     }
-}
+}
\ No newline at end of file

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/ContainerInvocation.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/ContainerInvocation.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/ContainerInvocation.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/ContainerInvocation.java Tue Nov  6 06:18:47 2007
@@ -1,4 +1,5 @@
 /*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -87,4 +88,4 @@
     public void setContainer(PortletContainer container) {
         this.container = container;
     }
-}
+}
\ No newline at end of file

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultApplicationIdResolver.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultApplicationIdResolver.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultApplicationIdResolver.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultApplicationIdResolver.java Tue Nov  6 06:18:47 2007
@@ -1,4 +1,5 @@
 /*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -51,4 +52,4 @@
     public int getAuthority() {
         return DEFAULT;
     }
-}
+}
\ No newline at end of file

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultOptionalContainerServices.java Tue Nov  6 06:18:47 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -16,38 +17,45 @@
 package org.apache.pluto.core;
 
 import org.apache.pluto.OptionalContainerServices;
-import org.apache.pluto.internal.InternalPortletWindow;
 import org.apache.pluto.spi.optional.PortletPreferencesService;
 import org.apache.pluto.spi.optional.PortletEnvironmentService;
 import org.apache.pluto.spi.optional.PortletInvokerService;
+import org.apache.pluto.spi.optional.PortletRegistryService;
+import org.apache.pluto.spi.optional.PortletInfoService;
+import org.apache.pluto.spi.optional.PortalAdministrationService;
+import org.apache.pluto.spi.optional.UserInfoService;
 
 /**
  * Default Optional Container Services implementation.
  *
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
  * @version 1.0
  * @since Sep 18, 2004
  */
-public class DefaultOptionalContainerServices
-implements OptionalContainerServices {
-	
-	// Private Member Variables ------------------------------------------------
-	
-    /** The portlet preferences service implementation. */
-    private PortletPreferencesService preferenceService = null;
-    
-    
-    // Constructors ------------------------------------------------------------
-    
+public class DefaultOptionalContainerServices implements OptionalContainerServices {
+
+    private PortletPreferencesService portletPreferencesService;
+    private PortletRegistryService portletRegistryService;
+    private PortletInvokerService portletInvokerService;
+    private PortletEnvironmentService portletEnvironmentService;
+    private PortletInfoService portletInfoService;
+    private PortalAdministrationService portalAdministrationService;
+    private UserInfoService userInfoService;
+
+
     /**
      * Constructs an instance using the default portlet preferences service
      * implementation.
      */
     public DefaultOptionalContainerServices() {
-        preferenceService = new DefaultPortletPreferencesService();
+        portletPreferencesService = new DefaultPortletPreferencesService();
+        portletRegistryService = PortletContextManager.getManager();
+        portletInvokerService = new DefaultPortletInvokerService();
+        portletEnvironmentService = new DefaultPortletEnvironmentService();
+        portletInfoService = new DefaultPortletInfoService();
+        portalAdministrationService = new DefaultPortalAdministrationService();
+        userInfoService = new DefaultUserInfoService();
     }
-    
+
     /**
      * Constructs an instance using specified optional container services
      * implementation. If the portlet preferences service is provided, it will
@@ -55,34 +63,72 @@
      * @param root  the root optional container services implementation.
      */
     public DefaultOptionalContainerServices(OptionalContainerServices root) {
+        this();
         if (root.getPortletPreferencesService() != null) {
-            preferenceService = root.getPortletPreferencesService();
-        } else {
-        	preferenceService = new DefaultPortletPreferencesService();
+            portletPreferencesService = root.getPortletPreferencesService();
         }
+
+        if (root.getPortletRegistryService() != null) {
+            portletRegistryService = root.getPortletRegistryService();
+        }
+
+        if(root.getPortletEnvironmentService() != null) {
+            portletEnvironmentService = root.getPortletEnvironmentService();
+        }
+
+        if(root.getPortletInvokerService() != null) {
+            portletInvokerService = root.getPortletInvokerService();
+        }
+
+        if(root.getPortletEnvironmentService() != null) {
+            portletEnvironmentService = root.getPortletEnvironmentService();
+        }
+
+        if(root.getPortletInfoService() != null) {
+            portletInfoService = root.getPortletInfoService();
+        }
+
+        if(root.getPortalAdministrationService() != null) {
+            portalAdministrationService = root.getPortalAdministrationService();
+        }
+
+		 if(root.getUserInfoService() != null) {
+			 userInfoService = root.getUserInfoService();
+		 }
+
     }
-    
-    
+
+
     // OptionalContainerServices Impl ------------------------------------------
-    
+
     public PortletPreferencesService getPortletPreferencesService() {
-        return preferenceService;
+        return portletPreferencesService;
     }
-    
-    /**
-     * TODO:
-     */
+
+
+    public PortletRegistryService getPortletRegistryService() {
+        return portletRegistryService;
+    }
+
     public PortletEnvironmentService getPortletEnvironmentService() {
-        return null;
+        return portletEnvironmentService;
     }
-    
-    /**
-     * TODO:
-     */
-    public PortletInvokerService getPortletInvokerService(
-    		InternalPortletWindow window) {
-        return null;
+
+    public PortletInvokerService getPortletInvokerService() {
+        return portletInvokerService;
     }
-    
+
+    public PortletInfoService getPortletInfoService() {
+        return portletInfoService;
+    }
+
+    public PortalAdministrationService getPortalAdministrationService() {
+        return portalAdministrationService;
+    }
+
+    public UserInfoService getUserInfoService() {
+        return userInfoService;
+    }
+
 }
 

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortalAdministrationService.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortalAdministrationService.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortalAdministrationService.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortalAdministrationService.java Tue Nov  6 06:18:47 2007
@@ -1,4 +1,5 @@
 /*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -54,4 +55,4 @@
     public void addPortletInvocationListener(PortletInvocationListener listener) {
         portletInvocationListeners.add(listener);
     }
-}
+}
\ No newline at end of file

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletEnvironmentService.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletEnvironmentService.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletEnvironmentService.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletEnvironmentService.java Tue Nov  6 06:18:47 2007
@@ -1,4 +1,5 @@
 /*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -66,4 +67,4 @@
     }
 
 
-}
+}
\ No newline at end of file

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInfoService.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInfoService.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInfoService.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInfoService.java Tue Nov  6 06:18:47 2007
@@ -1,4 +1,5 @@
 /*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -51,4 +52,4 @@
     private PortletDD getPortletDefinition(InternalPortletWindow window) {
         return window.getPortletEntity().getPortletDefinition();
     }
-}
+}
\ No newline at end of file

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInvokerService.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInvokerService.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInvokerService.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletInvokerService.java Tue Nov  6 06:18:47 2007
@@ -1,4 +1,5 @@
 /*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -210,4 +211,4 @@
         }
     }
 
-}
+}
\ No newline at end of file

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletPreferencesService.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletPreferencesService.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletPreferencesService.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultPortletPreferencesService.java Tue Nov  6 06:18:47 2007
@@ -1,9 +1,10 @@
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
@@ -30,49 +31,46 @@
 /**
  * Default implementation of the portlet preferences service. The portlet
  * preferences service is a singleton held by the pluto portlet container.
- * 
+ *
+ * @see javax.portlet.PortletPreferences
+ * @see org.apache.pluto.internal.impl.PortletPreferencesImpl
  * @see javax.portlet.PortletPreferences
- * @see org.apache.pluto.core.impl.PortletPreferencesImpl
- * @see org.apache.pluto.core.PortletPreference
- * 
- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
+ *
  */
 public class DefaultPortletPreferencesService
 implements PortletPreferencesService {
-	
+
 	/** Logger. */
 	private static final Log LOG = LogFactory.getLog(
 			DefaultPortletPreferencesService.class);
-	
-	
+
+
 	// Private Member Variables ------------------------------------------------
-	
+
 	/**
 	 * The in-memory portlet preferences storage: key is the preference name as
 	 * a string, value is an array of PortletPreference objects.
 	 */
 	private Map storage = new HashMap();
-	
-	
+
+
 	// Constructor -------------------------------------------------------------
-	
+
 	/**
 	 * Default no-arg constructor.
 	 */
 	public DefaultPortletPreferencesService() {
 		// Do nothing.
 	}
-	
-	
+
+
 	// PortletPreferencesService Impl ------------------------------------------
-	
+
 	/**
 	 * Returns the stored portlet preferences array. The preferences managed by
 	 * this service should be protected from being directly accessed, so this
 	 * method returns a cloned copy of the stored preferences.
-	 * 
-	 * @see org.apache.pluto.core.PortletPreference#clone()
-	 * 
+	 *
 	 * @param portletWindow  the portlet window.
 	 * @param request  the portlet request from which the remote user is retrieved.
 	 * @return a copy of the stored portlet preferences array.
@@ -97,7 +95,7 @@
         	return clonePreferences(preferences);
         }
     }
-	
+
 	/**
 	 * Stores the portlet preferences to the in-memory storage. This method
 	 * should be invoked after the portlet preferences are validated by the
@@ -107,10 +105,9 @@
 	 * directly accessed, so this method clones the passed-in preferences array
 	 * and saves it.
 	 * </p>
-	 * 
+	 *
 	 * @see javax.portlet.PortletPreferences#store()
-	 * @see org.apache.pluto.core.PortletPreference#clone()
-	 * 
+	 *
 	 * @param portletWindow  the portlet window
 	 * @param request  the portlet request from which the remote user is retrieved.
 	 * @param preferences  the portlet preferences to store.
@@ -126,15 +123,15 @@
             LOG.debug("Portlet preferences stored for: " + key);
         }
     }
-    
-    
+
+
     // Private Methods ---------------------------------------------------------
-    
+
     /**
      * Formats the preference key for the portlet preference using specified
      * portlet window and remote user.
      * @param portletWindow  the portlet window.
-     * @param user  the remote user.
+     * @param request  the remote request.
      */
     private String getFormattedKey(PortletWindow portletWindow,
                                    PortletRequest request) {
@@ -143,15 +140,13 @@
     	buffer.append("portletName=").append(portletWindow.getPortletName());
     	return buffer.toString();
     }
-    
+
     /**
      * Clones a PortletPreference array. This method performs a deep clone on
      * the passed-in portlet preferences array. Every PortletPreference object
      * in the array are cloned (via the <code>PortletPreference.clone()</code>
      * method) and injected into the new array.
-     * 
-     * @see org.apache.pluto.core.PortletPreference#clone()
-     * 
+     *
      * @param preferences  the portlet preferences array to clone.
      * @return a deep-cloned copy of the portlet preferences array.
      */
@@ -171,7 +166,7 @@
     	}
     	return copy;
     }
-    
+
 }
 
 

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultUserInfoService.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultUserInfoService.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultUserInfoService.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/DefaultUserInfoService.java Tue Nov  6 06:18:47 2007
@@ -1,4 +1,5 @@
 /*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -60,4 +61,4 @@
         userInfoMap.remove(userName);
     }
     
-}
+}
\ No newline at end of file

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/InitParameterApplicationIdResolver.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/InitParameterApplicationIdResolver.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/InitParameterApplicationIdResolver.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/InitParameterApplicationIdResolver.java Tue Nov  6 06:18:47 2007
@@ -1,4 +1,5 @@
 /*
+/*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -37,4 +38,4 @@
     public int getAuthority() {
         return MANUAL;
     }
-}
+}
\ No newline at end of file

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java?rev=592432&r1=592431&r2=592432&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java Tue Nov  6 06:18:47 2007
@@ -22,6 +22,7 @@
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
 import javax.portlet.PortletException;
+import javax.portlet.PortletPreferences;
 import javax.portlet.PortletRequest;
 import javax.portlet.PortletSecurityException;
 import javax.portlet.RenderRequest;
@@ -41,28 +42,35 @@
 import org.apache.pluto.PortletWindow;
 import org.apache.pluto.RequiredContainerServices;
 import org.apache.pluto.descriptors.portlet.PortletAppDD;
-import org.apache.pluto.internal.InternalPortletWindow;
+import org.apache.pluto.driver.core.PortletWindowImpl;
 import org.apache.pluto.internal.PortletDescriptorRegistry;
-import org.apache.pluto.internal.impl.ActionRequestImpl;
-import org.apache.pluto.internal.impl.ActionResponseImpl;
-import org.apache.pluto.internal.impl.EventRequestImpl;
-import org.apache.pluto.internal.impl.EventResponseImpl;
-import org.apache.pluto.internal.impl.PortletWindowImpl;
-import org.apache.pluto.internal.impl.RenderRequestImpl;
-import org.apache.pluto.internal.impl.RenderResponseImpl;
-import org.apache.pluto.internal.impl.ResourceRequestImpl;
-import org.apache.pluto.internal.impl.ResourceResponseImpl;
+import org.apache.pluto.internal.InternalPortletRequest;
+import org.apache.pluto.internal.InternalPortletResponse;
+import org.apache.pluto.internal.InternalActionRequest;
+import org.apache.pluto.internal.InternalActionResponse;
+import org.apache.pluto.internal.InternalEventRequest;
+import org.apache.pluto.internal.InternalEventResponse;
+import org.apache.pluto.internal.InternalPortletWindow;
+import org.apache.pluto.internal.InternalRenderRequest;
+import org.apache.pluto.internal.InternalRenderResponse;
+import org.apache.pluto.internal.InternalResourceRequest;
+import org.apache.pluto.internal.InternalResourceResponse;
 import org.apache.pluto.internal.impl.StateAwareResponseImpl;
 import org.apache.pluto.spi.EventProvider;
 import org.apache.pluto.spi.PortletURLProvider;
+import org.apache.pluto.spi.optional.PortletInvokerService;
+import org.apache.pluto.internal.impl.InternalPortletWindowImpl;
+import org.apache.pluto.internal.impl.PortletRequestImpl;
+import org.apache.pluto.internal.impl.PortletResponseImpl;
+import org.apache.pluto.internal.impl.PortletWindowImpl;
+import org.apache.pluto.internal.impl.ResourceRequestImpl;
+import org.apache.pluto.internal.impl.ResourceResponseImpl;
+import org.apache.pluto.util.StringManager;
+
 
 /**
  * Default Pluto Container implementation.
  *
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
- * @author <a href="mailto:esm@apache.org">Elliot Metsger</a>
- * @author <a href="mailto:chrisra@cs.uni-jena.de">Christian Raschka</a>
  * @version 1.0
  * @since Sep 18, 2004
  */
@@ -75,17 +83,20 @@
     
     // Private Member Variables ------------------------------------------------
     
+    private static final StringManager EXCEPTIONS = StringManager.getManager(
+    		    		PortletContainerImpl.class.getPackage().getName());
+    
     /** The portlet container name. */
-    private String name = null;
+    private final String name;
     
     /** The required container services associated with this container. */
-    private RequiredContainerServices requiredContainerServices = null;
+    private final RequiredContainerServices requiredContainerServices;
     
     /** The optional container services associated with this container. */
-    private OptionalContainerServices optionalContainerServices = null;
+    private final OptionalContainerServices optionalContainerServices;
     
     /** The servlet context associated with this container. */
-    private ServletContext servletContext = null;
+    private ServletContext servletContext;
 
     /** Flag indicating whether or not we've been initialized. */
     private boolean initialized = false;
@@ -165,17 +176,28 @@
     	ensureInitialized();
     	
         InternalPortletWindow internalPortletWindow =
-        		new PortletWindowImpl(servletContext, portletWindow);
+        	new InternalPortletWindowImpl(
+		                    PortletContextManager.getPortletContext(servletContext,
+		                        portletWindow.getContextPath()),
+		                    portletWindow);
         debugWithName("Render request received for portlet: "
         		+ portletWindow.getPortletName());
         
-        RenderRequestImpl renderRequest = new RenderRequestImpl(
-        		this, internalPortletWindow, request);
-        RenderResponseImpl renderResponse = new RenderResponseImpl(
-        		this, internalPortletWindow, request, response);
+        InternalRenderRequest renderRequest = getOptionalContainerServices().getPortletEnvironmentService()
+            .createRenderRequest(this, request, response, internalPortletWindow);
+
+        InternalRenderResponse renderResponse = getOptionalContainerServices().getPortletEnvironmentService()
+            .createRenderResponse(this, request, response, internalPortletWindow);
 
-        PortletInvoker invoker = new PortletInvoker(internalPortletWindow);
-        invoker.render(renderRequest, renderResponse);
+        PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
+
+        try {
+            ContainerInvocation.setInvocation(this, internalPortletWindow);
+            invoker.render(renderRequest, renderResponse, internalPortletWindow);
+        } finally {
+            ContainerInvocation.clearInvocation();
+        }
+        
         debugWithName("Portlet rendered for: "
         		+ portletWindow.getPortletName());
     }
@@ -199,17 +221,28 @@
     	ensureInitialized();
     	
         InternalPortletWindow internalPortletWindow =
-        		new PortletWindowImpl(servletContext, portletWindow);
+        	new InternalPortletWindowImpl(
+                    PortletContextManager.getPortletContext(servletContext,
+                        portletWindow.getContextPath()),
+                    portletWindow);
         debugWithName("Resource request received for portlet: "
         		+ portletWindow.getPortletName());
         
-        ResourceRequestImpl renderRequest = new ResourceRequestImpl(
-        		this, internalPortletWindow, request);
-        ResourceResponseImpl renderResponse = new ResourceResponseImpl(
-        		this, internalPortletWindow, request, response);
+        InternalResourceRequest resourceRequest = getOptionalContainerServices().getPortletEnvironmentService()
+            .createResourceRequest(this, request, response, internalPortletWindow);
 
-        PortletInvoker invoker = new PortletInvoker(internalPortletWindow);
-        invoker.resource(renderRequest, renderResponse);
+        InternalResourceResponse resourceResponse = getOptionalContainerServices().getPortletEnvironmentService()
+            .createResourceResponse(this, request, response, internalPortletWindow);
+
+        PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
+
+        try {
+            ContainerInvocation.setInvocation(this, internalPortletWindow);
+            invoker.render(resourceRequest, resourceResponse, internalPortletWindow);
+        } finally {
+            ContainerInvocation.clearInvocation();
+        }
+        
         debugWithName("Portlet resource for: "
         		+ portletWindow.getPortletName());
 	}
@@ -233,17 +266,29 @@
     	ensureInitialized();
     	
         InternalPortletWindow internalPortletWindow =
-            	new PortletWindowImpl(servletContext, portletWindow);
-    	debugWithName("Action request received for portlet: "
+        	new InternalPortletWindowImpl(
+                    PortletContextManager.getPortletContext(servletContext,
+                        portletWindow.getContextPath()), portletWindow);
+
+        debugWithName("Action request received for portlet: "
     			+ portletWindow.getPortletName());
     	
-        ActionRequestImpl actionRequest = new ActionRequestImpl(
-        		this, internalPortletWindow, request);
-        ActionResponseImpl actionResponse = new ActionResponseImpl(
-        		this, internalPortletWindow, request, response);
-        
-        PortletInvoker invoker = new PortletInvoker(internalPortletWindow);
-        invoker.action(actionRequest, actionResponse);
+        InternalActionRequest actionRequest = getOptionalContainerServices().getPortletEnvironmentService()
+            .createActionRequest(this, request, response, internalPortletWindow);
+
+        InternalActionResponse actionResponse = getOptionalContainerServices().getPortletEnvironmentService()
+            .createActionResponse(this, request, response, internalPortletWindow);
+
+        PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
+
+        try {
+            ContainerInvocation.setInvocation(this, internalPortletWindow);
+            invoker.action(actionRequest, actionResponse, internalPortletWindow);
+        }
+        finally {
+            ContainerInvocation.clearInvocation();
+        }
+
         debugWithName("Portlet action processed for: "
         		+ portletWindow.getPortletName());
         
@@ -296,19 +341,69 @@
     	ensureInitialized();
     	
         InternalPortletWindow internalPortletWindow =
-        		new PortletWindowImpl(servletContext, portletWindow);
+        		new InternalPortletWindowImpl(
+                    PortletContextManager.getPortletContext(servletContext,
+                        portletWindow.getContextPath()),
+                    portletWindow);
+
         debugWithName("Load request received for portlet: "
         		+ portletWindow.getPortletName());
         
-        RenderRequestImpl renderRequest = new RenderRequestImpl(
-        		this, internalPortletWindow, request);
-        RenderResponseImpl renderResponse = new RenderResponseImpl(
-        		this, internalPortletWindow, request, response);
-        
-        PortletInvoker invoker = new PortletInvoker(internalPortletWindow);
-        invoker.load(renderRequest, renderResponse);
+
+        InternalRenderRequest renderRequest =
+            getOptionalContainerServices().getPortletEnvironmentService()
+                .createRenderRequest(this, request, response, internalPortletWindow);
+
+        InternalRenderResponse renderResponse =
+            getOptionalContainerServices().getPortletEnvironmentService()
+                .createRenderResponse(this, request, response, internalPortletWindow);
+
+        PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();
+
+        try {
+            ContainerInvocation.setInvocation(this, internalPortletWindow);
+            invoker.load(renderRequest, renderResponse, internalPortletWindow);
+        } finally {
+            ContainerInvocation.clearInvocation();
+        }
+
         debugWithName("Portlet loaded for: " + portletWindow.getPortletName());
     }
+    
+
+    public void doAdmin(PortletWindow portletWindow,
+                        HttpServletRequest servletRequest,
+                        HttpServletResponse servletResponse)
+    throws PortletException, IOException, PortletContainerException {
+        ensureInitialized();
+
+        InternalPortletWindow internalPortletWindow =
+            new InternalPortletWindowImpl(
+                PortletContextManager.getPortletContext(servletContext,
+                    portletWindow.getContextPath()), portletWindow);
+
+        debugWithName("Admin request received for portlet: "
+            +portletWindow.getPortletName());
+
+        InternalPortletRequest internalRequest =
+            new AdminRequest(this, internalPortletWindow, servletRequest) { };
+
+        InternalPortletResponse internalResponse =
+            new AdminResponse(this, internalPortletWindow, servletRequest, servletResponse);
+
+        PortletInvokerService invoker =
+            optionalContainerServices.getPortletInvokerService();
+
+        try {
+            ContainerInvocation.setInvocation(this, internalPortletWindow);
+            invoker.admin(internalRequest, internalResponse, internalPortletWindow);
+        } finally {
+            ContainerInvocation.clearInvocation();
+        }
+
+        debugWithName("Admin request complete.");
+    }
+
 
     public String getName() {
         return name;
@@ -318,6 +413,13 @@
         return requiredContainerServices;
     }
 
+    /**
+     * Retrieve the optional container services used by the container.
+     * If no implementation was provided during construction, the default
+     * instance will be returned.
+     *
+     * @return services used by the container.
+     */
     public OptionalContainerServices getOptionalContainerServices() {
         return optionalContainerServices;
     }
@@ -336,7 +438,7 @@
         }
         
         // obtain the context of the portlet
-        ServletContext portletCtx = servletContext.getContext(context);
+        ServletContext portletCtx = PortletContextManager.getPortletContext(servletContext, context);
         if (portletCtx == null) {
             final String msg = "Unable to obtain the servlet context for " +
                 "portlet context [" + context + "].  Ensure the portlet has " +
@@ -522,5 +624,27 @@
 		}
 		return true;
 	}    
+	class AdminRequest extends PortletRequestImpl {
+
+        public AdminRequest(PortletContainer container,
+                            InternalPortletWindow internalPortletWindow,
+                            HttpServletRequest servletRequest) {
+            super(container, internalPortletWindow, servletRequest);
+        }
+
+        public PortletPreferences getPreferences() {
+            throw new IllegalStateException("Can not access preferences during admin request.");
+        }
+    }
+
+    class AdminResponse extends PortletResponseImpl {
+
+        public AdminResponse(PortletContainer container,
+                             InternalPortletWindow internalPortletWindow,
+                             HttpServletRequest servletRequest,
+                             HttpServletResponse servletResponse) {
+            super(container, internalPortletWindow, servletRequest, servletResponse);
+        }
+    }
 }