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 es...@apache.org on 2007/12/29 18:20:42 UTC
svn commit: r607448 [5/36] - in /portals/pluto/branches/pluto-1.1.x: ./
assembly/src/main/assembly/ assembly/src/main/resources/ maven-pluto-plugin/
maven-pluto-plugin/src/main/java/org/apache/pluto/maven/ pluto-ant-tasks/
pluto-ant-tasks/src/assemble/...
Modified: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java Sat Dec 29 09:20:23 2007
@@ -1,356 +1,356 @@
-/*
- * 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.core;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.descriptors.portlet.PortletAppDD;
-import org.apache.pluto.descriptors.portlet.PortletDD;
-import org.apache.pluto.internal.Configuration;
-import org.apache.pluto.internal.InternalPortletConfig;
-import org.apache.pluto.internal.InternalPortletContext;
-import org.apache.pluto.internal.PortletDescriptorRegistry;
-import org.apache.pluto.internal.impl.PortletConfigImpl;
-import org.apache.pluto.internal.impl.PortletContextImpl;
-import org.apache.pluto.spi.optional.PortletRegistryEvent;
-import org.apache.pluto.spi.optional.PortletRegistryListener;
-import org.apache.pluto.spi.optional.PortletRegistryService;
-import org.apache.pluto.util.ClasspathScanner;
-
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletContext;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Manager used to cache the portlet configurations which have
- * been previously parsed.
- *
- * @version 1.0
- * @since Sep 20, 2004
- */
-public class PortletContextManager implements PortletRegistryService {
-
- /**
- * Log Instance
- */
- private static final Log LOG = LogFactory.getLog(PortletContextManager.class);
-
- /**
- * The singleton manager instance.
- */
- private static final PortletContextManager MANAGER = new PortletContextManager();
-
- /**
- * List of application id resolvers. *
- */
- private static final List APP_ID_RESOLVERS = new ArrayList();
-
- // Private Member Variables ------------------------------------------------
-
- /**
- * The PortletContext cache map: key is servlet context, and value is the
- * associated portlet context.
- */
- private final Map portletContexts = new HashMap();
-
-
- private final Map portletConfigs = new HashMap();
-
-
- /**
- * The registered listeners that should be notified upon
- * registry events.
- */
- private final List registryListeners = new ArrayList();
-
- // Constructor -------------------------------------------------------------
-
- /**
- * Private constructor that prevents external instantiation.
- */
- private PortletContextManager() {
- // Do nothing.
- }
-
- /**
- * Returns the singleton manager instance.
- *
- * @return the singleton manager instance.
- */
- public static PortletContextManager getManager() {
- return MANAGER;
- }
-
- // Public Methods ----------------------------------------------------------
-
- /**
- * Retrieves the PortletContext associated with the given ServletContext.
- * If one does not exist, it is created.
- *
- * @param config the servlet config.
- * @return the InternalPortletContext associated with the ServletContext.
- * @throws PortletContainerException
- */
- public String register(ServletConfig config) throws PortletContainerException {
- InternalPortletContext portletContext = register(config.getServletContext());
-
- PortletAppDD portletAppDD =
- portletContext.getPortletApplicationDefinition();
- PortletDD portletDD = null;
-
- LOG.info("Registering "+portletAppDD.getPortlets().size()+" portlets for context "+portletContext.getApplicationId());
-
- for (Iterator it = portletAppDD.getPortlets().iterator(); it.hasNext();) {
- portletDD = (PortletDD) it.next();
- portletConfigs.put(
- portletContext.getApplicationId() + "/" + portletDD.getPortletName(),
- new PortletConfigImpl(config, portletContext, portletDD)
- );
- }
-
- return portletContext.getApplicationId();
- }
-
- /**
- * @param servletContext
- * @return
- * @throws PortletContainerException
- * @deprecated Use {@link #register(ServletConfig)}
- */
- public InternalPortletContext register(ServletContext servletContext)
- throws PortletContainerException {
- String applicationId = getContextPath(servletContext);
- if (!portletContexts.containsKey(applicationId)) {
-
- PortletAppDD portletAppDD = PortletDescriptorRegistry.getRegistry()
- .getPortletAppDD(servletContext);
-
- PortletContextImpl portletContext = new PortletContextImpl(
- applicationId, servletContext, portletAppDD);
-
- if (portletContext.getApplicationId() == null) {
- throw new IllegalStateException("Unable to resolve unique identifier for portletContext.");
- }
- portletContexts.put(applicationId, portletContext);
-
- fireRegistered(portletContext);
-
- if (LOG.isInfoEnabled()) {
- LOG.info("Registered portlet application with application id '" + applicationId + "'");
- }
- } else {
- if (LOG.isInfoEnabled()) {
- LOG.info("Portlet application with application id '" + applicationId + "' already registered.");
- }
- }
-
-
- return (InternalPortletContext) portletContexts.get(applicationId);
- }
-
- public void remove(InternalPortletContext context) {
- portletContexts.remove(context.getApplicationId());
- Iterator configs = portletConfigs.keySet().iterator();
- while (configs.hasNext()) {
- String key = (String) configs.next();
- if (key.startsWith(context.getApplicationId() + "/")) {
- configs.remove();
- }
- }
- fireRemoved(context);
- }
-
- public Iterator getRegisteredPortletApplicationIds() {
- return new HashSet(portletContexts.keySet()).iterator();
-
- }
-
- /**
- * Retrieve an iterator of all PortletContext instances
- * which exist within this application.
- *
- * @return
- */
- public Iterator getRegisteredPortletApplications() {
- return new HashSet(portletContexts.values()).iterator();
- }
-
- public PortletContext getPortletContext(String applicationId)
- throws PortletContainerException {
- return (InternalPortletContext) portletContexts.get(applicationId);
- }
-
- public PortletConfig getPortletConfig(String applicationId, String portletName) {
- String lookup = applicationId + "/" + portletName;
- if(!portletConfigs.containsKey(lookup)) {
- LOG.info("Unable to locate portlet config [applicationId="+applicationId+"]/["+portletName+"].");
- }
- return (InternalPortletConfig) portletConfigs.get(lookup);
- }
-
- public PortletDD getPortletDescriptor(String applicationId, String portletName) {
- InternalPortletConfig ipc = (InternalPortletConfig) portletConfigs.get(applicationId + "/" + portletName);
- if (ipc != null) {
- return ipc.getPortletDefinition();
- }
- LOG.warn("Unable to retrieve portlet descriptor: '"+applicationId+"/"+portletName+"'");
- return null;
-
- }
-
- public PortletAppDD getPortletApplicationDescriptor(String applicationId) throws PortletContainerException {
- InternalPortletContext ipc = (InternalPortletContext) portletContexts.get(applicationId);
- if (ipc != null) {
- return ipc.getPortletApplicationDefinition();
- }
- String msg = "Unable to retrieve portlet application descriptor: '"+applicationId+"'";
- LOG.warn(msg);
- throw new PortletContainerException(msg);
- }
-
- public void addPortletRegistryListener(PortletRegistryListener listener) {
- registryListeners.add(listener);
- }
-
- public void removePortletRegistryListener(PortletRegistryListener listener) {
- registryListeners.remove(listener);
- }
-
- private void fireRegistered(InternalPortletContext context) {
- PortletRegistryEvent event = new PortletRegistryEvent();
- event.setApplicationId(context.getApplicationId());
- event.setPortletApplicationDescriptor(context.getPortletApplicationDefinition());
-
- Iterator i = registryListeners.iterator();
- while (i.hasNext()) {
- ((PortletRegistryListener) i.next()).portletApplicationRegistered(event);
- }
-
- LOG.info("Portlet Context '" + context.getApplicationId() + "' registered.");
- }
-
- private void fireRemoved(InternalPortletContext context) {
- PortletRegistryEvent event = new PortletRegistryEvent();
- event.setApplicationId(context.getApplicationId());
- event.setPortletApplicationDescriptor(context.getPortletApplicationDefinition());
-
- Iterator i = registryListeners.iterator();
- while (i.hasNext()) {
- ((PortletRegistryListener) i.next()).portletApplicationRemoved(event);
- }
-
- LOG.info("Portlet Context '" + context.getApplicationId() + "' removed.");
- }
-
-//
-// Utility
-
- public static ServletContext getPortletContext(ServletContext portalContext, String portletContextPath) {
- if (Configuration.preventUnecessaryCrossContext()) {
- String portalPath = getContextPath(portalContext);
- if (portalPath.equals(portletContextPath)) {
- return portalContext;
- }
- }
- return portalContext.getContext(portletContextPath);
- }
-
- /**
- * Servlet 2.5 ServletContext.getContextPath() method.
- */
- private static Method contextPathGetter;
-
- static {
- try {
- contextPathGetter = ServletContext.class.getMethod("getContextPath", new Class[0]);
- }
- catch (NoSuchMethodException e) {
- LOG.warn("Servlet 2.4 or below detected. Unable to find getContextPath on ServletContext.");
- }
- }
-
- protected static String getContextPath(ServletContext context) {
- String contextPath = null;
- if (contextPathGetter != null) {
- try {
- contextPath = (String) contextPathGetter.invoke(context, new Class[0]);
- } catch (Exception e) {
- LOG.warn("Unable to directly retrieve context path from ServletContext. Computing. . . ");
- }
- }
-
- if (contextPath == null) {
- contextPath = computeContextPath(context);
- }
-
- return contextPath;
- }
-
-
- protected static String computeContextPath(ServletContext context) {
- if (APP_ID_RESOLVERS.size() < 1) {
- List classes = null;
- try {
- classes = ClasspathScanner.findConfiguredImplementations(ApplicationIdResolver.class);
- } catch (IOException e) {
- throw new RuntimeException("Unable to find any ApplicationIdResolvers");
- }
- Iterator i = classes.iterator();
- while (i.hasNext()) {
- Class c = (Class) i.next();
- try {
- APP_ID_RESOLVERS.add(c.newInstance());
- } catch (Exception e) {
- LOG.warn("Unable to instantiate ApplicationIdResolver for class " + c.getName());
- }
- }
- if (LOG.isInfoEnabled()) {
- LOG.info("Found " + APP_ID_RESOLVERS.size() + " application id resolvers.");
- }
- }
-
- String path = null;
- int authority = Integer.MAX_VALUE;
-
- Iterator i = APP_ID_RESOLVERS.iterator();
- while (i.hasNext()) {
- ApplicationIdResolver resolver = (ApplicationIdResolver) i.next();
- if (resolver.getAuthority() < authority || path == null) {
- authority = resolver.getAuthority();
- String temp = resolver.resolveApplicationId(context);
- if (temp != null) {
- path = temp;
- }
- }
- }
- if (LOG.isDebugEnabled()) {
- LOG.debug("Resolved application id '" + path + "' with authority " + authority);
- }
- return path;
- }
-
-}
+/*
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.core;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.pluto.PortletContainerException;
+import org.apache.pluto.descriptors.portlet.PortletAppDD;
+import org.apache.pluto.descriptors.portlet.PortletDD;
+import org.apache.pluto.internal.Configuration;
+import org.apache.pluto.internal.InternalPortletConfig;
+import org.apache.pluto.internal.InternalPortletContext;
+import org.apache.pluto.internal.PortletDescriptorRegistry;
+import org.apache.pluto.internal.impl.PortletConfigImpl;
+import org.apache.pluto.internal.impl.PortletContextImpl;
+import org.apache.pluto.spi.optional.PortletRegistryEvent;
+import org.apache.pluto.spi.optional.PortletRegistryListener;
+import org.apache.pluto.spi.optional.PortletRegistryService;
+import org.apache.pluto.util.ClasspathScanner;
+
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Manager used to cache the portlet configurations which have
+ * been previously parsed.
+ *
+ * @version 1.0
+ * @since Sep 20, 2004
+ */
+public class PortletContextManager implements PortletRegistryService {
+
+ /**
+ * Log Instance
+ */
+ private static final Log LOG = LogFactory.getLog(PortletContextManager.class);
+
+ /**
+ * The singleton manager instance.
+ */
+ private static final PortletContextManager MANAGER = new PortletContextManager();
+
+ /**
+ * List of application id resolvers. *
+ */
+ private static final List APP_ID_RESOLVERS = new ArrayList();
+
+ // Private Member Variables ------------------------------------------------
+
+ /**
+ * The PortletContext cache map: key is servlet context, and value is the
+ * associated portlet context.
+ */
+ private final Map portletContexts = new HashMap();
+
+
+ private final Map portletConfigs = new HashMap();
+
+
+ /**
+ * The registered listeners that should be notified upon
+ * registry events.
+ */
+ private final List registryListeners = new ArrayList();
+
+ // Constructor -------------------------------------------------------------
+
+ /**
+ * Private constructor that prevents external instantiation.
+ */
+ private PortletContextManager() {
+ // Do nothing.
+ }
+
+ /**
+ * Returns the singleton manager instance.
+ *
+ * @return the singleton manager instance.
+ */
+ public static PortletContextManager getManager() {
+ return MANAGER;
+ }
+
+ // Public Methods ----------------------------------------------------------
+
+ /**
+ * Retrieves the PortletContext associated with the given ServletContext.
+ * If one does not exist, it is created.
+ *
+ * @param config the servlet config.
+ * @return the InternalPortletContext associated with the ServletContext.
+ * @throws PortletContainerException
+ */
+ public String register(ServletConfig config) throws PortletContainerException {
+ InternalPortletContext portletContext = register(config.getServletContext());
+
+ PortletAppDD portletAppDD =
+ portletContext.getPortletApplicationDefinition();
+ PortletDD portletDD = null;
+
+ LOG.info("Registering "+portletAppDD.getPortlets().size()+" portlets for context "+portletContext.getApplicationId());
+
+ for (Iterator it = portletAppDD.getPortlets().iterator(); it.hasNext();) {
+ portletDD = (PortletDD) it.next();
+ portletConfigs.put(
+ portletContext.getApplicationId() + "/" + portletDD.getPortletName(),
+ new PortletConfigImpl(config, portletContext, portletDD)
+ );
+ }
+
+ return portletContext.getApplicationId();
+ }
+
+ /**
+ * @param servletContext
+ * @return
+ * @throws PortletContainerException
+ * @deprecated Use {@link #register(ServletConfig)}
+ */
+ public InternalPortletContext register(ServletContext servletContext)
+ throws PortletContainerException {
+ String applicationId = getContextPath(servletContext);
+ if (!portletContexts.containsKey(applicationId)) {
+
+ PortletAppDD portletAppDD = PortletDescriptorRegistry.getRegistry()
+ .getPortletAppDD(servletContext);
+
+ PortletContextImpl portletContext = new PortletContextImpl(
+ applicationId, servletContext, portletAppDD);
+
+ if (portletContext.getApplicationId() == null) {
+ throw new IllegalStateException("Unable to resolve unique identifier for portletContext.");
+ }
+ portletContexts.put(applicationId, portletContext);
+
+ fireRegistered(portletContext);
+
+ if (LOG.isInfoEnabled()) {
+ LOG.info("Registered portlet application with application id '" + applicationId + "'");
+ }
+ } else {
+ if (LOG.isInfoEnabled()) {
+ LOG.info("Portlet application with application id '" + applicationId + "' already registered.");
+ }
+ }
+
+
+ return (InternalPortletContext) portletContexts.get(applicationId);
+ }
+
+ public void remove(InternalPortletContext context) {
+ portletContexts.remove(context.getApplicationId());
+ Iterator configs = portletConfigs.keySet().iterator();
+ while (configs.hasNext()) {
+ String key = (String) configs.next();
+ if (key.startsWith(context.getApplicationId() + "/")) {
+ configs.remove();
+ }
+ }
+ fireRemoved(context);
+ }
+
+ public Iterator getRegisteredPortletApplicationIds() {
+ return new HashSet(portletContexts.keySet()).iterator();
+
+ }
+
+ /**
+ * Retrieve an iterator of all PortletContext instances
+ * which exist within this application.
+ *
+ * @return
+ */
+ public Iterator getRegisteredPortletApplications() {
+ return new HashSet(portletContexts.values()).iterator();
+ }
+
+ public PortletContext getPortletContext(String applicationId)
+ throws PortletContainerException {
+ return (InternalPortletContext) portletContexts.get(applicationId);
+ }
+
+ public PortletConfig getPortletConfig(String applicationId, String portletName) {
+ String lookup = applicationId + "/" + portletName;
+ if(!portletConfigs.containsKey(lookup)) {
+ LOG.info("Unable to locate portlet config [applicationId="+applicationId+"]/["+portletName+"].");
+ }
+ return (InternalPortletConfig) portletConfigs.get(lookup);
+ }
+
+ public PortletDD getPortletDescriptor(String applicationId, String portletName) {
+ InternalPortletConfig ipc = (InternalPortletConfig) portletConfigs.get(applicationId + "/" + portletName);
+ if (ipc != null) {
+ return ipc.getPortletDefinition();
+ }
+ LOG.warn("Unable to retrieve portlet descriptor: '"+applicationId+"/"+portletName+"'");
+ return null;
+
+ }
+
+ public PortletAppDD getPortletApplicationDescriptor(String applicationId) throws PortletContainerException {
+ InternalPortletContext ipc = (InternalPortletContext) portletContexts.get(applicationId);
+ if (ipc != null) {
+ return ipc.getPortletApplicationDefinition();
+ }
+ String msg = "Unable to retrieve portlet application descriptor: '"+applicationId+"'";
+ LOG.warn(msg);
+ throw new PortletContainerException(msg);
+ }
+
+ public void addPortletRegistryListener(PortletRegistryListener listener) {
+ registryListeners.add(listener);
+ }
+
+ public void removePortletRegistryListener(PortletRegistryListener listener) {
+ registryListeners.remove(listener);
+ }
+
+ private void fireRegistered(InternalPortletContext context) {
+ PortletRegistryEvent event = new PortletRegistryEvent();
+ event.setApplicationId(context.getApplicationId());
+ event.setPortletApplicationDescriptor(context.getPortletApplicationDefinition());
+
+ Iterator i = registryListeners.iterator();
+ while (i.hasNext()) {
+ ((PortletRegistryListener) i.next()).portletApplicationRegistered(event);
+ }
+
+ LOG.info("Portlet Context '" + context.getApplicationId() + "' registered.");
+ }
+
+ private void fireRemoved(InternalPortletContext context) {
+ PortletRegistryEvent event = new PortletRegistryEvent();
+ event.setApplicationId(context.getApplicationId());
+ event.setPortletApplicationDescriptor(context.getPortletApplicationDefinition());
+
+ Iterator i = registryListeners.iterator();
+ while (i.hasNext()) {
+ ((PortletRegistryListener) i.next()).portletApplicationRemoved(event);
+ }
+
+ LOG.info("Portlet Context '" + context.getApplicationId() + "' removed.");
+ }
+
+//
+// Utility
+
+ public static ServletContext getPortletContext(ServletContext portalContext, String portletContextPath) {
+ if (Configuration.preventUnecessaryCrossContext()) {
+ String portalPath = getContextPath(portalContext);
+ if (portalPath.equals(portletContextPath)) {
+ return portalContext;
+ }
+ }
+ return portalContext.getContext(portletContextPath);
+ }
+
+ /**
+ * Servlet 2.5 ServletContext.getContextPath() method.
+ */
+ private static Method contextPathGetter;
+
+ static {
+ try {
+ contextPathGetter = ServletContext.class.getMethod("getContextPath", new Class[0]);
+ }
+ catch (NoSuchMethodException e) {
+ LOG.warn("Servlet 2.4 or below detected. Unable to find getContextPath on ServletContext.");
+ }
+ }
+
+ protected static String getContextPath(ServletContext context) {
+ String contextPath = null;
+ if (contextPathGetter != null) {
+ try {
+ contextPath = (String) contextPathGetter.invoke(context, new Class[0]);
+ } catch (Exception e) {
+ LOG.warn("Unable to directly retrieve context path from ServletContext. Computing. . . ");
+ }
+ }
+
+ if (contextPath == null) {
+ contextPath = computeContextPath(context);
+ }
+
+ return contextPath;
+ }
+
+
+ protected static String computeContextPath(ServletContext context) {
+ if (APP_ID_RESOLVERS.size() < 1) {
+ List classes = null;
+ try {
+ classes = ClasspathScanner.findConfiguredImplementations(ApplicationIdResolver.class);
+ } catch (IOException e) {
+ throw new RuntimeException("Unable to find any ApplicationIdResolvers");
+ }
+ Iterator i = classes.iterator();
+ while (i.hasNext()) {
+ Class c = (Class) i.next();
+ try {
+ APP_ID_RESOLVERS.add(c.newInstance());
+ } catch (Exception e) {
+ LOG.warn("Unable to instantiate ApplicationIdResolver for class " + c.getName());
+ }
+ }
+ if (LOG.isInfoEnabled()) {
+ LOG.info("Found " + APP_ID_RESOLVERS.size() + " application id resolvers.");
+ }
+ }
+
+ String path = null;
+ int authority = Integer.MAX_VALUE;
+
+ Iterator i = APP_ID_RESOLVERS.iterator();
+ while (i.hasNext()) {
+ ApplicationIdResolver resolver = (ApplicationIdResolver) i.next();
+ if (resolver.getAuthority() < authority || path == null) {
+ authority = resolver.getAuthority();
+ String temp = resolver.resolveApplicationId(context);
+ if (temp != null) {
+ path = temp;
+ }
+ }
+ }
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Resolved application id '" + path + "' with authority " + authority);
+ }
+ return path;
+ }
+
+}
Propchange: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/PortletContextManager.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/PortletServlet.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/PortletServlet.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/PortletServlet.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/PortletServlet.java Sat Dec 29 09:20:23 2007
@@ -1,294 +1,294 @@
-/*
- * 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.core;
-
-import org.apache.pluto.Constants;
-import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.PortletWindow;
-import org.apache.pluto.descriptors.portlet.PortletDD;
-import org.apache.pluto.internal.InternalPortletConfig;
-import org.apache.pluto.internal.InternalPortletContext;
-import org.apache.pluto.internal.InternalPortletRequest;
-import org.apache.pluto.internal.InternalPortletResponse;
-import org.apache.pluto.internal.impl.ActionRequestImpl;
-import org.apache.pluto.internal.impl.ActionResponseImpl;
-import org.apache.pluto.internal.impl.RenderRequestImpl;
-import org.apache.pluto.internal.impl.RenderResponseImpl;
-import org.apache.pluto.spi.optional.AdministrativeRequestListener;
-import org.apache.pluto.spi.optional.PortalAdministrationService;
-import org.apache.pluto.spi.optional.PortletInvocationEvent;
-import org.apache.pluto.spi.optional.PortletInvocationListener;
-
-import javax.portlet.Portlet;
-import javax.portlet.PortletException;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.Iterator;
-
-/**
- * Portlet Invocation Servlet. This servlet recieves cross context requests from
- * the the container and services the portlet request for the specified method.
- *
- * @version 1.1
- * @since 09/22/2004
- */
-public class PortletServlet extends HttpServlet {
-
- // Private Member Variables ------------------------------------------------
-
- /**
- * The portlet name as defined in the portlet app descriptor.
- */
- private String portletName;
-
- /**
- * The portlet instance wrapped by this servlet.
- */
- private Portlet portlet;
-
- /**
- * The internal portlet context instance.
- */
- private InternalPortletContext portletContext;
-
- /**
- * The internal portlet config instance.
- */
- private InternalPortletConfig portletConfig;
-
- // HttpServlet Impl --------------------------------------------------------
-
- public String getServletInfo() {
- return "Pluto PortletServlet [" + portletName + "]";
- }
-
- /**
- * Initialize the portlet invocation servlet.
- *
- * @throws ServletException if an error occurs while loading portlet.
- */
- public void init() throws ServletException {
-
- // Call the super initialization method.
- super.init();
-
- // Retrieve portlet name as defined as an initialization parameter.
- portletName = getInitParameter("portlet-name");
-
- // Retrieve the associated internal portlet context.
- PortletContextManager mgr = PortletContextManager.getManager();
- try {
- String applicationId = mgr.register(getServletConfig());
- portletContext = (InternalPortletContext) mgr.getPortletContext(applicationId);
- portletConfig = (InternalPortletConfig) mgr.getPortletConfig(applicationId, portletName);
-
- } catch (PortletContainerException ex) {
- throw new ServletException(ex);
- }
-
- PortletDD portletDD = portletConfig.getPortletDefinition();
- // Create and initialize the portlet wrapped in the servlet.
- try {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- Class clazz = loader.loadClass((portletDD.getPortletClass()));
- portlet = (Portlet) clazz.newInstance();
- portlet.init(portletConfig);
- } catch (ClassNotFoundException ex) {
- ex.printStackTrace();
- throw new ServletException(ex);
- } catch (IllegalAccessException ex) {
- ex.printStackTrace();
- throw new ServletException(ex);
- } catch (InstantiationException ex) {
- ex.printStackTrace();
- throw new ServletException(ex);
- } catch (PortletException ex) {
- ex.printStackTrace();
- throw new ServletException(ex);
- }
- }
-
- public void destroy() {
- PortletContextManager.getManager().remove(portletContext);
- if (portlet != null) {
- portlet.destroy();
- }
- super.destroy();
- }
-
- protected void doGet(HttpServletRequest request,
- HttpServletResponse response)
- throws ServletException, IOException {
- dispatch(request, response);
- }
-
- protected void doPost(HttpServletRequest request,
- HttpServletResponse response)
- throws ServletException, IOException {
- dispatch(request, response);
- }
-
- protected void doPut(HttpServletRequest request,
- HttpServletResponse response)
- throws ServletException, IOException {
- dispatch(request, response);
- }
-
- // Private Methods ---------------------------------------------------------
-
- /**
- * Dispatch the request to the appropriate portlet methods. This method
- * assumes that the following attributes are set in the servlet request
- * scope:
- * <ul>
- * <li>METHOD_ID: indicating which method to dispatch.</li>
- * <li>PORTLET_REQUEST: the internal portlet request.</li>
- * <li>PORTLET_RESPONSE: the internal portlet response.</li>
- * </ul>
- *
- * @param request the servlet request.
- * @param response the servlet response.
- * @throws ServletException
- * @throws IOException
- */
- private void dispatch(HttpServletRequest request,
- HttpServletResponse response)
- throws ServletException, IOException {
- InternalPortletRequest portletRequest = null;
- InternalPortletResponse portletResponse = null;
-
- // Save portlet config into servlet request.
- request.setAttribute(Constants.PORTLET_CONFIG, portletConfig);
-
- // Retrieve attributes from the servlet request.
- Integer methodId = (Integer) request.getAttribute(
- Constants.METHOD_ID);
-
- portletRequest = (InternalPortletRequest) request.getAttribute(
- Constants.PORTLET_REQUEST);
-
- portletResponse = (InternalPortletResponse) request.getAttribute(
- Constants.PORTLET_RESPONSE);
-
- portletRequest.init(portletContext, request);
-
- PortletWindow window =
- ContainerInvocation.getInvocation().getPortletWindow();
-
- PortletInvocationEvent event =
- new PortletInvocationEvent(portletRequest, window, methodId.intValue());
-
- notify(event, true, null);
-
- try {
-
- // The requested method is RENDER: call Portlet.render(..)
- if (methodId == Constants.METHOD_RENDER) {
- RenderRequestImpl renderRequest =
- (RenderRequestImpl) portletRequest;
- RenderResponseImpl renderResponse =
- (RenderResponseImpl) portletResponse;
- portlet.render(renderRequest, renderResponse);
-
- }
-
- // The requested method is ACTION: call Portlet.processAction(..)
- else if (methodId == Constants.METHOD_ACTION) {
- ActionRequestImpl actionRequest =
- (ActionRequestImpl) portletRequest;
- ActionResponseImpl actionResponse =
- (ActionResponseImpl) portletResponse;
- portlet.processAction(actionRequest, actionResponse);
- }
-
- // The requested method is ADMIN: call handlers.
- else if (methodId == Constants.METHOD_ADMIN) {
- ContainerInvocation inv = ContainerInvocation.getInvocation();
- PortalAdministrationService pas =
- inv.getPortletContainer()
- .getOptionalContainerServices()
- .getPortalAdministrationService();
-
- Iterator it = pas.getAdministrativeRequestListeners().iterator();
- while (it.hasNext()) {
- AdministrativeRequestListener l = (AdministrativeRequestListener) it.next();
- l.administer(portletRequest, portletResponse);
- }
- }
-
- // The requested method is NOOP: do nothing.
- else if (methodId == Constants.METHOD_NOOP) {
- // Do nothing.
- }
-
- notify(event, false, null);
-
- } catch (javax.portlet.UnavailableException ex) {
- ex.printStackTrace();
- /*
- if (e.isPermanent()) {
- throw new UnavailableException(e.getMessage());
- } else {
- throw new UnavailableException(e.getMessage(), e.getUnavailableSeconds());
- }*/
-
- // Portlet.destroy() isn't called by Tomcat, so we have to fix it.
- try {
- portlet.destroy();
- } catch (Throwable th) {
- // Don't care for Exception
- }
-
- // TODO: Handle everything as permanently for now.
- throw new javax.servlet.UnavailableException(ex.getMessage());
-
- } catch (PortletException ex) {
- notify(event, false, ex);
- ex.printStackTrace();
- throw new ServletException(ex);
-
- } finally {
- request.removeAttribute(Constants.PORTLET_CONFIG);
- if (portletRequest != null) {
- portletRequest.release();
- }
- }
- }
-
- protected void notify(PortletInvocationEvent event, boolean pre, Throwable e) {
- ContainerInvocation inv = ContainerInvocation.getInvocation();
- PortalAdministrationService pas = inv.getPortletContainer()
- .getOptionalContainerServices()
- .getPortalAdministrationService();
-
- Iterator i = pas.getPortletInvocationListeners().iterator();
- while (i.hasNext()) {
- PortletInvocationListener listener = (PortletInvocationListener) i.next();
- if (pre) {
- listener.onBegin(event);
- } else if (e == null) {
- listener.onEnd(event);
- } else {
- listener.onError(event, e);
- }
- }
-
- }
-}
+/*
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.core;
+
+import org.apache.pluto.Constants;
+import org.apache.pluto.PortletContainerException;
+import org.apache.pluto.PortletWindow;
+import org.apache.pluto.descriptors.portlet.PortletDD;
+import org.apache.pluto.internal.InternalPortletConfig;
+import org.apache.pluto.internal.InternalPortletContext;
+import org.apache.pluto.internal.InternalPortletRequest;
+import org.apache.pluto.internal.InternalPortletResponse;
+import org.apache.pluto.internal.impl.ActionRequestImpl;
+import org.apache.pluto.internal.impl.ActionResponseImpl;
+import org.apache.pluto.internal.impl.RenderRequestImpl;
+import org.apache.pluto.internal.impl.RenderResponseImpl;
+import org.apache.pluto.spi.optional.AdministrativeRequestListener;
+import org.apache.pluto.spi.optional.PortalAdministrationService;
+import org.apache.pluto.spi.optional.PortletInvocationEvent;
+import org.apache.pluto.spi.optional.PortletInvocationListener;
+
+import javax.portlet.Portlet;
+import javax.portlet.PortletException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Iterator;
+
+/**
+ * Portlet Invocation Servlet. This servlet recieves cross context requests from
+ * the the container and services the portlet request for the specified method.
+ *
+ * @version 1.1
+ * @since 09/22/2004
+ */
+public class PortletServlet extends HttpServlet {
+
+ // Private Member Variables ------------------------------------------------
+
+ /**
+ * The portlet name as defined in the portlet app descriptor.
+ */
+ private String portletName;
+
+ /**
+ * The portlet instance wrapped by this servlet.
+ */
+ private Portlet portlet;
+
+ /**
+ * The internal portlet context instance.
+ */
+ private InternalPortletContext portletContext;
+
+ /**
+ * The internal portlet config instance.
+ */
+ private InternalPortletConfig portletConfig;
+
+ // HttpServlet Impl --------------------------------------------------------
+
+ public String getServletInfo() {
+ return "Pluto PortletServlet [" + portletName + "]";
+ }
+
+ /**
+ * Initialize the portlet invocation servlet.
+ *
+ * @throws ServletException if an error occurs while loading portlet.
+ */
+ public void init() throws ServletException {
+
+ // Call the super initialization method.
+ super.init();
+
+ // Retrieve portlet name as defined as an initialization parameter.
+ portletName = getInitParameter("portlet-name");
+
+ // Retrieve the associated internal portlet context.
+ PortletContextManager mgr = PortletContextManager.getManager();
+ try {
+ String applicationId = mgr.register(getServletConfig());
+ portletContext = (InternalPortletContext) mgr.getPortletContext(applicationId);
+ portletConfig = (InternalPortletConfig) mgr.getPortletConfig(applicationId, portletName);
+
+ } catch (PortletContainerException ex) {
+ throw new ServletException(ex);
+ }
+
+ PortletDD portletDD = portletConfig.getPortletDefinition();
+ // Create and initialize the portlet wrapped in the servlet.
+ try {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ Class clazz = loader.loadClass((portletDD.getPortletClass()));
+ portlet = (Portlet) clazz.newInstance();
+ portlet.init(portletConfig);
+ } catch (ClassNotFoundException ex) {
+ ex.printStackTrace();
+ throw new ServletException(ex);
+ } catch (IllegalAccessException ex) {
+ ex.printStackTrace();
+ throw new ServletException(ex);
+ } catch (InstantiationException ex) {
+ ex.printStackTrace();
+ throw new ServletException(ex);
+ } catch (PortletException ex) {
+ ex.printStackTrace();
+ throw new ServletException(ex);
+ }
+ }
+
+ public void destroy() {
+ PortletContextManager.getManager().remove(portletContext);
+ if (portlet != null) {
+ portlet.destroy();
+ }
+ super.destroy();
+ }
+
+ protected void doGet(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException {
+ dispatch(request, response);
+ }
+
+ protected void doPost(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException {
+ dispatch(request, response);
+ }
+
+ protected void doPut(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException {
+ dispatch(request, response);
+ }
+
+ // Private Methods ---------------------------------------------------------
+
+ /**
+ * Dispatch the request to the appropriate portlet methods. This method
+ * assumes that the following attributes are set in the servlet request
+ * scope:
+ * <ul>
+ * <li>METHOD_ID: indicating which method to dispatch.</li>
+ * <li>PORTLET_REQUEST: the internal portlet request.</li>
+ * <li>PORTLET_RESPONSE: the internal portlet response.</li>
+ * </ul>
+ *
+ * @param request the servlet request.
+ * @param response the servlet response.
+ * @throws ServletException
+ * @throws IOException
+ */
+ private void dispatch(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException {
+ InternalPortletRequest portletRequest = null;
+ InternalPortletResponse portletResponse = null;
+
+ // Save portlet config into servlet request.
+ request.setAttribute(Constants.PORTLET_CONFIG, portletConfig);
+
+ // Retrieve attributes from the servlet request.
+ Integer methodId = (Integer) request.getAttribute(
+ Constants.METHOD_ID);
+
+ portletRequest = (InternalPortletRequest) request.getAttribute(
+ Constants.PORTLET_REQUEST);
+
+ portletResponse = (InternalPortletResponse) request.getAttribute(
+ Constants.PORTLET_RESPONSE);
+
+ portletRequest.init(portletContext, request);
+
+ PortletWindow window =
+ ContainerInvocation.getInvocation().getPortletWindow();
+
+ PortletInvocationEvent event =
+ new PortletInvocationEvent(portletRequest, window, methodId.intValue());
+
+ notify(event, true, null);
+
+ try {
+
+ // The requested method is RENDER: call Portlet.render(..)
+ if (methodId == Constants.METHOD_RENDER) {
+ RenderRequestImpl renderRequest =
+ (RenderRequestImpl) portletRequest;
+ RenderResponseImpl renderResponse =
+ (RenderResponseImpl) portletResponse;
+ portlet.render(renderRequest, renderResponse);
+
+ }
+
+ // The requested method is ACTION: call Portlet.processAction(..)
+ else if (methodId == Constants.METHOD_ACTION) {
+ ActionRequestImpl actionRequest =
+ (ActionRequestImpl) portletRequest;
+ ActionResponseImpl actionResponse =
+ (ActionResponseImpl) portletResponse;
+ portlet.processAction(actionRequest, actionResponse);
+ }
+
+ // The requested method is ADMIN: call handlers.
+ else if (methodId == Constants.METHOD_ADMIN) {
+ ContainerInvocation inv = ContainerInvocation.getInvocation();
+ PortalAdministrationService pas =
+ inv.getPortletContainer()
+ .getOptionalContainerServices()
+ .getPortalAdministrationService();
+
+ Iterator it = pas.getAdministrativeRequestListeners().iterator();
+ while (it.hasNext()) {
+ AdministrativeRequestListener l = (AdministrativeRequestListener) it.next();
+ l.administer(portletRequest, portletResponse);
+ }
+ }
+
+ // The requested method is NOOP: do nothing.
+ else if (methodId == Constants.METHOD_NOOP) {
+ // Do nothing.
+ }
+
+ notify(event, false, null);
+
+ } catch (javax.portlet.UnavailableException ex) {
+ ex.printStackTrace();
+ /*
+ if (e.isPermanent()) {
+ throw new UnavailableException(e.getMessage());
+ } else {
+ throw new UnavailableException(e.getMessage(), e.getUnavailableSeconds());
+ }*/
+
+ // Portlet.destroy() isn't called by Tomcat, so we have to fix it.
+ try {
+ portlet.destroy();
+ } catch (Throwable th) {
+ // Don't care for Exception
+ }
+
+ // TODO: Handle everything as permanently for now.
+ throw new javax.servlet.UnavailableException(ex.getMessage());
+
+ } catch (PortletException ex) {
+ notify(event, false, ex);
+ ex.printStackTrace();
+ throw new ServletException(ex);
+
+ } finally {
+ request.removeAttribute(Constants.PORTLET_CONFIG);
+ if (portletRequest != null) {
+ portletRequest.release();
+ }
+ }
+ }
+
+ protected void notify(PortletInvocationEvent event, boolean pre, Throwable e) {
+ ContainerInvocation inv = ContainerInvocation.getInvocation();
+ PortalAdministrationService pas = inv.getPortletContainer()
+ .getOptionalContainerServices()
+ .getPortalAdministrationService();
+
+ Iterator i = pas.getPortletInvocationListeners().iterator();
+ while (i.hasNext()) {
+ PortletInvocationListener listener = (PortletInvocationListener) i.next();
+ if (pre) {
+ listener.onBegin(event);
+ } else if (e == null) {
+ listener.onEnd(event);
+ } else {
+ listener.onError(event, e);
+ }
+ }
+
+ }
+}
Propchange: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/PortletServlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/UserInfoAttribute.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/UserInfoAttribute.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/UserInfoAttribute.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/UserInfoAttribute.java Sat Dec 29 09:20:23 2007
@@ -1,32 +1,32 @@
-/*
+/*
* 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.core;
-
-/**
- * Encapsulates a user information attribute as described in
- * PLT.17 of the JSR-168 specification.
- *
- */
-public interface UserInfoAttribute {
-
- String getName();
-
- String getValue();
-
- String getAuthUser();
-
-}
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.core;
+
+/**
+ * Encapsulates a user information attribute as described in
+ * PLT.17 of the JSR-168 specification.
+ *
+ */
+public interface UserInfoAttribute {
+
+ String getName();
+
+ String getValue();
+
+ String getAuthUser();
+
+}
Propchange: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/core/UserInfoAttribute.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/Configuration.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/Configuration.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/Configuration.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/Configuration.java Sat Dec 29 09:20:23 2007
@@ -1,90 +1,90 @@
-/*
+/*
* 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.internal;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.util.MissingResourceException;
-import java.util.PropertyResourceBundle;
-import java.util.ResourceBundle;
-
-/**
- * Central location for Configuration info.
- *
- * @since Jul 2, 2005
- */
-public class Configuration {
-
- private static final Log LOG =
- LogFactory.getLog(Configuration.class);
-
- public static final ResourceBundle BUNDLE =
- PropertyResourceBundle.getBundle("org.apache.pluto.core.pluto-configuration");
-
- private static final String DESCRIPTOR_SERVICE =
- "org.apache.pluto.descriptors.services.PortletAppDescriptorService";
-
-
- /**
- * org.apache.pluto.ALLOW_BUFFER
- */
- private static final String BUFFER_SUPPORT =
- "org.apache.pluto.ALLOW_BUFFER";
-
- /**
- * org.apache.pluto.PREVENT_UNECESSARY_CROSS_CONTEXT
- */
- private static final String PREVENT_UNECESSARY_CROSS_CONTEXT =
- "org.apache.pluto.PREVENT_UNECESSARY_CROSS_CONTEXT";
-
-
- public static String getPortletAppDescriptorServiceImpl() {
- String impl = BUNDLE.getString(DESCRIPTOR_SERVICE);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Using Descriptor Service Impl: " + impl);
- }
- return impl;
- }
-
- private static Boolean buffering;
- public static boolean isBufferingSupported() {
- if (buffering == null) {
- try {
- String buffer = BUNDLE.getString(BUFFER_SUPPORT);
- buffering = new Boolean(buffer);
- } catch (MissingResourceException mre) {
- buffering = Boolean.FALSE;
- }
- }
- return buffering.booleanValue();
- }
-
- private static Boolean prevent;
-
- public static boolean preventUnecessaryCrossContext() {
- if (prevent == null) {
- try {
- String test = BUNDLE.getString(PREVENT_UNECESSARY_CROSS_CONTEXT);
- prevent = new Boolean(test);
- } catch (MissingResourceException mre) {
- prevent = Boolean.FALSE;
- }
- }
- return prevent.booleanValue();
- }
-}
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.internal;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.util.MissingResourceException;
+import java.util.PropertyResourceBundle;
+import java.util.ResourceBundle;
+
+/**
+ * Central location for Configuration info.
+ *
+ * @since Jul 2, 2005
+ */
+public class Configuration {
+
+ private static final Log LOG =
+ LogFactory.getLog(Configuration.class);
+
+ public static final ResourceBundle BUNDLE =
+ PropertyResourceBundle.getBundle("org.apache.pluto.core.pluto-configuration");
+
+ private static final String DESCRIPTOR_SERVICE =
+ "org.apache.pluto.descriptors.services.PortletAppDescriptorService";
+
+
+ /**
+ * org.apache.pluto.ALLOW_BUFFER
+ */
+ private static final String BUFFER_SUPPORT =
+ "org.apache.pluto.ALLOW_BUFFER";
+
+ /**
+ * org.apache.pluto.PREVENT_UNECESSARY_CROSS_CONTEXT
+ */
+ private static final String PREVENT_UNECESSARY_CROSS_CONTEXT =
+ "org.apache.pluto.PREVENT_UNECESSARY_CROSS_CONTEXT";
+
+
+ public static String getPortletAppDescriptorServiceImpl() {
+ String impl = BUNDLE.getString(DESCRIPTOR_SERVICE);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Using Descriptor Service Impl: " + impl);
+ }
+ return impl;
+ }
+
+ private static Boolean buffering;
+ public static boolean isBufferingSupported() {
+ if (buffering == null) {
+ try {
+ String buffer = BUNDLE.getString(BUFFER_SUPPORT);
+ buffering = new Boolean(buffer);
+ } catch (MissingResourceException mre) {
+ buffering = Boolean.FALSE;
+ }
+ }
+ return buffering.booleanValue();
+ }
+
+ private static Boolean prevent;
+
+ public static boolean preventUnecessaryCrossContext() {
+ if (prevent == null) {
+ try {
+ String test = BUNDLE.getString(PREVENT_UNECESSARY_CROSS_CONTEXT);
+ prevent = new Boolean(test);
+ } catch (MissingResourceException mre) {
+ prevent = Boolean.FALSE;
+ }
+ }
+ return prevent.booleanValue();
+ }
+}
Propchange: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/Configuration.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionRequest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionRequest.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionRequest.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionRequest.java Sat Dec 29 09:20:23 2007
@@ -1,29 +1,29 @@
-/*
+/*
* 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.internal;
-
-import javax.portlet.ActionRequest;
-
-/**
- * The internal action request extends the internal portlet request and provides
- * some action-specific methods (currently, no specific methods are declared).
- * @since 2006-02-17
- */
-public interface InternalActionRequest extends InternalPortletRequest, ActionRequest {
-
-
-}
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.internal;
+
+import javax.portlet.ActionRequest;
+
+/**
+ * The internal action request extends the internal portlet request and provides
+ * some action-specific methods (currently, no specific methods are declared).
+ * @since 2006-02-17
+ */
+public interface InternalActionRequest extends InternalPortletRequest, ActionRequest {
+
+
+}
Propchange: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionRequest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionResponse.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionResponse.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionResponse.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionResponse.java Sat Dec 29 09:20:23 2007
@@ -1,61 +1,61 @@
-/*
+/*
* 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.internal;
-
-import java.util.Map;
-
-import javax.portlet.PortletMode;
-import javax.portlet.WindowState;
-import javax.portlet.ActionResponse;
-
-/**
- * The internal action response interface extends the internal portlet response
- * interface and provides some action-specific methods.
- */
-public interface InternalActionResponse extends InternalPortletResponse, ActionResponse {
-
- /**
- * Retrieves the render parameters associated with this response.
- * @return map of all render parameters associated with this request.
- */
- public Map getRenderParameters();
-
- /**
- * Retrieve the portlet mode.
- * @return the changed portlet mode.
- */
- public PortletMode getChangedPortletMode();
-
- /**
- * Retrieve the window state.
- * @return the changed window state.
- */
- public WindowState getChangedWindowState();
-
- /**
- * Retreive the location for which the action should
- * be redirected.
- * @return the redirect location.
- */
- public String getRedirectLocation();
-
-
- public String encodeRedirectURL(String url);
-
-}
-
-
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.internal;
+
+import java.util.Map;
+
+import javax.portlet.PortletMode;
+import javax.portlet.WindowState;
+import javax.portlet.ActionResponse;
+
+/**
+ * The internal action response interface extends the internal portlet response
+ * interface and provides some action-specific methods.
+ */
+public interface InternalActionResponse extends InternalPortletResponse, ActionResponse {
+
+ /**
+ * Retrieves the render parameters associated with this response.
+ * @return map of all render parameters associated with this request.
+ */
+ public Map getRenderParameters();
+
+ /**
+ * Retrieve the portlet mode.
+ * @return the changed portlet mode.
+ */
+ public PortletMode getChangedPortletMode();
+
+ /**
+ * Retrieve the window state.
+ * @return the changed window state.
+ */
+ public WindowState getChangedWindowState();
+
+ /**
+ * Retreive the location for which the action should
+ * be redirected.
+ * @return the redirect location.
+ */
+ public String getRedirectLocation();
+
+
+ public String encodeRedirectURL(String url);
+
+}
+
+
Propchange: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalActionResponse.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletConfig.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletConfig.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletConfig.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletConfig.java Sat Dec 29 09:20:23 2007
@@ -1,31 +1,31 @@
-/*
+/*
* 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.internal;
-
-import javax.portlet.PortletConfig;
-import javax.servlet.ServletConfig;
-
-import org.apache.pluto.descriptors.portlet.PortletDD;
-
-public interface InternalPortletConfig extends PortletConfig {
-
- public ServletConfig getServletConfig();
-
- public PortletDD getPortletDefinition();
-}
-
-
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.internal;
+
+import javax.portlet.PortletConfig;
+import javax.servlet.ServletConfig;
+
+import org.apache.pluto.descriptors.portlet.PortletDD;
+
+public interface InternalPortletConfig extends PortletConfig {
+
+ public ServletConfig getServletConfig();
+
+ public PortletDD getPortletDefinition();
+}
+
+
Propchange: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletConfig.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletContext.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletContext.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletContext.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletContext.java Sat Dec 29 09:20:23 2007
@@ -1,45 +1,45 @@
-/*
+/*
* 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.internal;
-
-import javax.portlet.PortletContext;
-import javax.servlet.ServletContext;
-
-import org.apache.pluto.descriptors.portlet.PortletAppDD;
-
-public interface InternalPortletContext extends PortletContext {
-
- /**
- * Retrieve the unique identifier for the portlet context.
- * @return unique identifier.
- */
- public String getApplicationId();
-
- /**
- *
- * @return servlet context within which we belong
- */
- public ServletContext getServletContext();
-
- /**
- *
- * @return application config
- */
- public PortletAppDD getPortletApplicationDefinition();
-}
-
-
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.internal;
+
+import javax.portlet.PortletContext;
+import javax.servlet.ServletContext;
+
+import org.apache.pluto.descriptors.portlet.PortletAppDD;
+
+public interface InternalPortletContext extends PortletContext {
+
+ /**
+ * Retrieve the unique identifier for the portlet context.
+ * @return unique identifier.
+ */
+ public String getApplicationId();
+
+ /**
+ *
+ * @return servlet context within which we belong
+ */
+ public ServletContext getServletContext();
+
+ /**
+ *
+ * @return application config
+ */
+ public PortletAppDD getPortletApplicationDefinition();
+}
+
+
Propchange: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletContext.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletPreference.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletPreference.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletPreference.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletPreference.java Sat Dec 29 09:20:23 2007
@@ -1,54 +1,54 @@
-/*
+/*
* 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.internal;
-
-/**
- * This class represents a portlet preference, which is a name-value pair.
- *
- */
-public interface InternalPortletPreference {
-
- /**
- * Returns the name of this portlet preference.
- * @return the name of this portlet preference.
- */
- String getName();
-
- /**
- * Returns the values of this portlet preference, which is a string array.
- * @return the values of this portlet preference as a string array.
- */
- String[] getValues();
-
- /**
- * Sets values of this portlet preference.
- * @param values values of this portlet preference to set.
- */
- void setValues(String[] values);
-
- /**
- * Returns true if this portlet preference is marked as read-only.
- * @return true if this portlet preference is marked as read-only.
- */
- boolean isReadOnly();
-
- /**
- * Clone a copy of itself.
- * @return a copy of itself.
- */
- Object clone();
-}
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.internal;
+
+/**
+ * This class represents a portlet preference, which is a name-value pair.
+ *
+ */
+public interface InternalPortletPreference {
+
+ /**
+ * Returns the name of this portlet preference.
+ * @return the name of this portlet preference.
+ */
+ String getName();
+
+ /**
+ * Returns the values of this portlet preference, which is a string array.
+ * @return the values of this portlet preference as a string array.
+ */
+ String[] getValues();
+
+ /**
+ * Sets values of this portlet preference.
+ * @param values values of this portlet preference to set.
+ */
+ void setValues(String[] values);
+
+ /**
+ * Returns true if this portlet preference is marked as read-only.
+ * @return true if this portlet preference is marked as read-only.
+ */
+ boolean isReadOnly();
+
+ /**
+ * Clone a copy of itself.
+ * @return a copy of itself.
+ */
+ Object clone();
+}
Propchange: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletPreference.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java Sat Dec 29 09:20:23 2007
@@ -1,56 +1,56 @@
-/*
+/*
* 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.internal;
-
-import org.apache.pluto.PortletContainer;
-
-import javax.portlet.PortletRequest;
-import javax.portlet.PortletContext;
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * The internal portlet request interface extends PortletRequest and adds
- * some methods used by Pluto.
- *
- */
-public interface InternalPortletRequest extends PortletRequest {
-
- /**
- * Initializes the portlet request for use within the target context.
- * This method ensures that the portlet utilizes resources from the
- * <b>included</b> context, and not those from the intiating (portal)
- * context.
- *
- * @param context the target portlet context.
- * @param request the servlet request.
- */
- void init(PortletContext context, HttpServletRequest request);
-
- /**
- * Recycle the request by rolling the underlying request
- * back to the originating request.
- */
- void release();
-
- InternalPortletWindow getInternalPortletWindow();
-
- PortletContainer getPortletContainer();
-
- HttpServletRequest getHttpServletRequest();
-}
-
-
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.internal;
+
+import org.apache.pluto.PortletContainer;
+
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletContext;
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * The internal portlet request interface extends PortletRequest and adds
+ * some methods used by Pluto.
+ *
+ */
+public interface InternalPortletRequest extends PortletRequest {
+
+ /**
+ * Initializes the portlet request for use within the target context.
+ * This method ensures that the portlet utilizes resources from the
+ * <b>included</b> context, and not those from the intiating (portal)
+ * context.
+ *
+ * @param context the target portlet context.
+ * @param request the servlet request.
+ */
+ void init(PortletContext context, HttpServletRequest request);
+
+ /**
+ * Recycle the request by rolling the underlying request
+ * back to the originating request.
+ */
+ void release();
+
+ InternalPortletWindow getInternalPortletWindow();
+
+ PortletContainer getPortletContainer();
+
+ HttpServletRequest getHttpServletRequest();
+}
+
+
Propchange: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletRequest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java Sat Dec 29 09:20:23 2007
@@ -1,30 +1,30 @@
-/*
+/*
* 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
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.internal;
-
-import javax.portlet.PortletResponse;
-
-/**
- * The internal portlet response interface extends PortletResponse and adds
- * some methods used by Pluto.
- *
- */
-public interface InternalPortletResponse extends PortletResponse {
-
- InternalPortletWindow getInternalPortletWindow();
-
-}
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.internal;
+
+import javax.portlet.PortletResponse;
+
+/**
+ * The internal portlet response interface extends PortletResponse and adds
+ * some methods used by Pluto.
+ *
+ */
+public interface InternalPortletResponse extends PortletResponse {
+
+ InternalPortletWindow getInternalPortletWindow();
+
+}
Propchange: portals/pluto/branches/pluto-1.1.x/pluto-container/src/main/java/org/apache/pluto/internal/InternalPortletResponse.java
------------------------------------------------------------------------------
svn:eol-style = native