Author: mrdon
Date: Thu Jul 13 18:09:55 2006
New Revision: 421778
URL: http://svn.apache.org/viewvc?rev=421778&view=rev
Log:
More cleanups - Javadocs, empty packages, unused methods, unused imports,
accessors, etc
WW-1349
Removed:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/spring/interceptor/
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSetupInterceptor.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusFilter.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusLifecycleListener.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusThreadLocal.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusUtils.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletApplicationMap.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletRequestMap.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletSessionMap.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/context/ServletContextHolderListener.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/spring/lifecycle/SpringExternalReferenceResolverSetupListener.java
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
Thu Jul 13 18:09:55 2006
@@ -214,7 +214,7 @@
ActionContext ctx = ActionContext.getContext();
writer.startNode(DEBUG_PARAM);
serializeIt(ctx.getParameters(), "parameters", writer,
- new ArrayList());
+ new ArrayList<Object>());
writer.startNode("context");
String key;
Map ctxMap = ctx.getContextMap();
@@ -229,15 +229,15 @@
}
}
if (print) {
- serializeIt(ctxMap.get(key), key, writer, new ArrayList());
+ serializeIt(ctxMap.get(key), key, writer, new
ArrayList<Object>());
}
}
writer.endNode();
- serializeIt(ctx.getSession(), "request", writer, new ArrayList());
- serializeIt(ctx.getSession(), "session", writer, new ArrayList());
+ serializeIt(ctx.getSession(), "request", writer, new
ArrayList<Object>());
+ serializeIt(ctx.getSession(), "session", writer, new
ArrayList<Object>());
OgnlValueStack stack = (OgnlValueStack)
ctx.get(ActionContext.VALUE_STACK);
- serializeIt(stack.getRoot(), "valueStack", writer, new ArrayList());
+ serializeIt(stack.getRoot(), "valueStack", writer, new
ArrayList<Object>());
writer.endNode();
}
@@ -256,7 +256,7 @@
* of this function (to prevent looping on circular
references).
*/
protected void serializeIt(Object bean, String name,
- PrettyPrintWriter writer, List stack) {
+ PrettyPrintWriter writer, List<Object> stack) {
writer.flush();
// Check stack for this object
if ((bean != null) && (stack.contains(bean))) {
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSetupInterceptor.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSetupInterceptor.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSetupInterceptor.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/jsf/FacesSetupInterceptor.java
Thu Jul 13 18:09:55 2006
@@ -41,16 +41,13 @@
private static final long serialVersionUID = -621512342655103941L;
private String lifecycleId = LifecycleFactory.DEFAULT_LIFECYCLE;
-
private FacesContextFactory facesContextFactory;
-
private Lifecycle lifecycle;
/**
* Sets the lifecycle id
*
- * @param id
- * The id
+ * @param id The id
*/
public void setLifecycleId(String id) {
this.lifecycleId = id;
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusFilter.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusFilter.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusFilter.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusFilter.java
Thu Jul 13 18:09:55 2006
@@ -28,20 +28,34 @@
import java.util.Collections;
/**
+ * Creates a plexus container for the application, session, and request
*/
public class PlexusFilter implements Filter {
private static final Log log =
LogFactory.getLog(PlexusObjectFactory.class);
private static final String CHILD_CONTAINER_NAME = "request";
- public static boolean loaded = false;
+ private static boolean loaded = false;
private ServletContext ctx;
+ /**
+ * @return Returns if the container is loaded.
+ */
+ public static boolean isLoaded() {
+ return loaded;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
+ */
public void init(FilterConfig filterConfig) throws ServletException {
ctx = filterConfig.getServletContext();
loaded = true;
}
+ /* (non-Javadoc)
+ * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest,
javax.servlet.ServletResponse, javax.servlet.FilterChain)
+ */
public void doFilter(ServletRequest req, ServletResponse res, FilterChain
chain) throws IOException, ServletException {
PlexusContainer child = null;
try {
@@ -83,6 +97,9 @@
}
}
+ /* (non-Javadoc)
+ * @see javax.servlet.Filter#destroy()
+ */
public void destroy() {
}
}
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusLifecycleListener.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusLifecycleListener.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusLifecycleListener.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusLifecycleListener.java
Thu Jul 13 18:09:55 2006
@@ -31,14 +31,24 @@
import java.util.Collections;
/**
- *
+ * Manages the Plexus lifecycle for the servlet and session contexts
*/
public class PlexusLifecycleListener implements ServletContextListener,
HttpSessionListener {
private static final Log log =
LogFactory.getLog(PlexusObjectFactory.class);
- public static boolean loaded = false;
+ private static boolean loaded = false;
public static final String KEY = "struts.plexus.container";
+ /**
+ * @return Returns if the container is loaded.
+ */
+ public static boolean isLoaded() {
+ return loaded;
+ }
+
+ /* (non-Javadoc)
+ * @see
javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
+ */
public void contextInitialized(ServletContextEvent servletContextEvent) {
loaded = true;
@@ -55,6 +65,9 @@
}
}
+ /* (non-Javadoc)
+ * @see
javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.ServletContextEvent)
+ */
public void contextDestroyed(ServletContextEvent servletContextEvent) {
try {
ServletContext ctx = servletContextEvent.getServletContext();
@@ -65,6 +78,9 @@
}
}
+ /* (non-Javadoc)
+ * @see
javax.servlet.http.HttpSessionListener#sessionCreated(javax.servlet.http.HttpSessionEvent)
+ */
public void sessionCreated(HttpSessionEvent httpSessionEvent) {
try {
HttpSession session = httpSessionEvent.getSession();
@@ -80,6 +96,9 @@
}
}
+ /* (non-Javadoc)
+ * @see
javax.servlet.http.HttpSessionListener#sessionDestroyed(javax.servlet.http.HttpSessionEvent)
+ */
public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
try {
HttpSession session = httpSessionEvent.getSession();
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java
Thu Jul 13 18:09:55 2006
@@ -70,18 +70,13 @@
private static final String PLEXUS_COMPONENT_TYPE =
"plexus.component.type";
- // ----------------------------------------------------------------------
- // Privates
- // ----------------------------------------------------------------------
-
private PlexusContainer base;
- // ----------------------------------------------------------------------
- // ObjectFactory overrides
- // ----------------------------------------------------------------------
-
+ /* (non-Javadoc)
+ * @see
org.apache.struts2.util.ObjectFactoryInitializable#init(javax.servlet.ServletContext)
+ */
public void init(ServletContext servletContext) {
- if (!PlexusLifecycleListener.loaded || !PlexusFilter.loaded) {
+ if (!PlexusLifecycleListener.isLoaded() || !PlexusFilter.isLoaded()) {
// uh oh! looks like the lifecycle listener wasn't installed.
Let's inform the user
String message = "********** FATAL ERROR STARTING UP PLEXUS-STRUTS
INTEGRATION **********\n" +
"Looks like the Plexus listener was not configured for
your web app! \n" +
@@ -113,6 +108,9 @@
base = (PlexusContainer)
servletContext.getAttribute(PlexusLifecycleListener.KEY);
}
+ /* (non-Javadoc)
+ * @see
com.opensymphony.xwork2.ObjectFactory#buildAction(java.lang.String,
java.lang.String, com.opensymphony.xwork2.config.entities.ActionConfig,
java.util.Map)
+ */
public Object buildAction(String actionName, String namespace,
ActionConfig config, Map extraContext)
throws Exception {
if (extraContext == null) {
@@ -124,6 +122,9 @@
return super.buildAction(actionName, namespace, config, extraContext);
}
+ /* (non-Javadoc)
+ * @see
com.opensymphony.xwork2.ObjectFactory#buildInterceptor(com.opensymphony.xwork2.config.entities.InterceptorConfig,
java.util.Map)
+ */
public Interceptor buildInterceptor(InterceptorConfig interceptorConfig,
Map interceptorRefParams)
throws ConfigurationException {
String interceptorClassName = interceptorConfig.getClassName();
@@ -167,6 +168,9 @@
throw new ConfigurationException(message, cause);
}
+ /* (non-Javadoc)
+ * @see
com.opensymphony.xwork2.ObjectFactory#buildResult(com.opensymphony.xwork2.config.entities.ResultConfig,
java.util.Map)
+ */
public Result buildResult(ResultConfig resultConfig, Map extraContext)
throws Exception {
if (extraContext == null) {
@@ -178,6 +182,9 @@
return super.buildResult(resultConfig, extraContext);
}
+ /* (non-Javadoc)
+ * @see
com.opensymphony.xwork2.ObjectFactory#buildValidator(java.lang.String,
java.util.Map, java.util.Map)
+ */
public Validator buildValidator(String className, Map params, Map
extraContext)
throws Exception {
Map context = new HashMap();
@@ -188,6 +195,9 @@
return validator;
}
+ /* (non-Javadoc)
+ * @see com.opensymphony.xwork2.ObjectFactory#buildBean(java.lang.Class,
java.util.Map)
+ */
public Object buildBean(Class clazz, Map extraContext)
throws Exception {
try {
@@ -206,6 +216,9 @@
}
}
+ /* (non-Javadoc)
+ * @see
com.opensymphony.xwork2.ObjectFactory#getClassInstance(java.lang.String)
+ */
public Class getClassInstance(String className)
throws ClassNotFoundException {
PlexusContainer pc = PlexusThreadLocal.getPlexusContainer();
@@ -242,21 +255,28 @@
}
}
- private Object lookup(String role)
- throws Exception {
- return lookup(role, null, null);
- }
-
+ /**
+ * Looks up an object
+ *
+ * @param role The role name
+ * @param extraContext The extra context
+ * @return The object
+ * @throws Exception If the lookup fails
+ */
private Object lookup(String role, Map extraContext)
throws Exception {
return lookup(role, null, extraContext);
}
- private Object lookup(String role, String roleHint)
- throws Exception {
- return lookup(role, roleHint, null);
- }
-
+ /**
+ * Looks up an object
+ *
+ * @param role The role name
+ * @param roleHint The role hint
+ * @param extraContext The extra context
+ * @return The object
+ * @throws Exception If the lookup fails
+ */
private Object lookup(String role, String roleHint, Map extraContext)
throws Exception {
PlexusContainer pc = PlexusThreadLocal.getPlexusContainer();
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusThreadLocal.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusThreadLocal.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusThreadLocal.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusThreadLocal.java
Thu Jul 13 18:09:55 2006
@@ -20,15 +20,22 @@
import org.codehaus.plexus.PlexusContainer;
/**
+ * Stores and retrieves the plexus container in the thread
*/
public class PlexusThreadLocal {
- static ThreadLocal ptl = new ThreadLocal();
+ private static ThreadLocal<PlexusContainer> ptl = new
ThreadLocal<PlexusContainer>();
+ /**
+ * @param pc The plexus container for this thread
+ */
public static void setPlexusContainer(PlexusContainer pc) {
ptl.set(pc);
}
+ /**
+ * @return The plexus container for this thread
+ */
public static PlexusContainer getPlexusContainer() {
- return (PlexusContainer) ptl.get();
+ return ptl.get();
}
}
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusUtils.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusUtils.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusUtils.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/plexus/PlexusUtils.java
Thu Jul 13 18:09:55 2006
@@ -27,10 +27,18 @@
import java.io.ByteArrayInputStream;
/**
+ * Utility methods for dealing with Plexus
*/
public class PlexusUtils {
private static final Log log =
LogFactory.getLog(PlexusObjectFactory.class);
+ /**
+ * Configures the container with the configuration file
+ *
+ * @param pc The plexus container
+ * @param file The file path
+ * @throws PlexusConfigurationResourceException If the plexus
configuration can't be loaded
+ */
public static void configure(PlexusContainer pc, String file) throws
PlexusConfigurationResourceException {
InputStream is =
Thread.currentThread().getContextClassLoader().getResourceAsStream(file);
if (is == null) {
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletApplicationMap.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletApplicationMap.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletApplicationMap.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletApplicationMap.java
Thu Jul 13 18:09:55 2006
@@ -33,9 +33,9 @@
*/
public class PortletApplicationMap extends AbstractMap implements Serializable
{
- PortletContext context;
+ private PortletContext context;
- Set entries;
+ private Set<Object> entries;
/**
* Creates a new map object given the [EMAIL PROTECTED] PortletContext}.
@@ -69,7 +69,7 @@
*/
public Set entrySet() {
if (entries == null) {
- entries = new HashSet();
+ entries = new HashSet<Object>();
// Add portlet context attributes
Enumeration enumeration = context.getAttributeNames();
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletRequestMap.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletRequestMap.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletRequestMap.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletRequestMap.java
Thu Jul 13 18:09:55 2006
@@ -36,8 +36,7 @@
private static final Log LOG = LogFactory.getLog(PortletRequestMap.class);
- private Set entries = null;
-
+ private Set<Object> entries = null;
private PortletRequest request = null;
/**
@@ -79,7 +78,7 @@
*/
public Set entrySet() {
if (entries == null) {
- entries = new HashSet();
+ entries = new HashSet<Object>();
Enumeration enumeration = request.getAttributeNames();
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletSessionMap.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletSessionMap.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletSessionMap.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/PortletSessionMap.java
Thu Jul 13 18:09:55 2006
@@ -40,8 +40,7 @@
private static final Log LOG = LogFactory.getLog(PortletSessionMap.class);
private PortletSession session = null;
-
- private Set entries = null;
+ private Set<Object> entries = null;
/**
* Creates a new session map given a portlet request.
@@ -67,7 +66,7 @@
public Set entrySet() {
synchronized (session) {
if (entries == null) {
- entries = new HashSet();
+ entries = new HashSet<Object>();
Enumeration enumeration = session.getAttributeNames();
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/context/ServletContextHolderListener.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/context/ServletContextHolderListener.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/context/ServletContextHolderListener.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/context/ServletContextHolderListener.java
Thu Jul 13 18:09:55 2006
@@ -33,6 +33,9 @@
private static ServletContext context = null;
+ /**
+ * @return The current servlet context
+ */
public static ServletContext getServletContext() {
return context;
}
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
Thu Jul 13 18:09:55 2006
@@ -161,9 +161,9 @@
private ActionProxyFactory factory = null;
- private Map modeMap = new HashMap(3);
+ private Map<PortletMode,String> modeMap = new
HashMap<PortletMode,String>(3);
- private Map actionMap = new HashMap(3);
+ private Map<PortletMode,ActionMapping> actionMap = new
HashMap<PortletMode,ActionMapping>(3);
private String portletNamespace = null;
@@ -352,7 +352,7 @@
// TODO Must put http request/response objects into map for use with
// ServletActionContext
- HashMap extraContext = new HashMap();
+ HashMap<String,Object> extraContext = new HashMap<String,Object>();
extraContext.put(ActionContext.PARAMETERS, parameterMap);
extraContext.put(ActionContext.SESSION, sessionMap);
extraContext.put(ActionContext.APPLICATION, applicationMap);
@@ -411,7 +411,6 @@
HashMap extraContext = createContextMap(requestMap, parameterMap,
sessionMap, applicationMap, request, response,
getPortletConfig(), phase);
- PortletMode mode = request.getPortletMode();
String actionName = mapping.getName();
String namespace = mapping.getNamespace();
try {
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java
Thu Jul 13 18:09:55 2006
@@ -94,6 +94,9 @@
private static final Log log = LogFactory
.getLog(PortletVelocityResult.class);
+ /* (non-Javadoc)
+ * @see
org.apache.struts2.dispatcher.StrutsResultSupport#doExecute(java.lang.String,
com.opensymphony.xwork2.ActionInvocation)
+ */
public void doExecute(String location, ActionInvocation invocation)
throws Exception {
if (PortletActionContext.isEvent()) {
@@ -104,8 +107,10 @@
}
/**
- * @param location
- * @param invocation
+ * Executes the result
+ *
+ * @param location The location string
+ * @param invocation The action invocation
*/
private void executeActionResult(String location,
ActionInvocation invocation) {
@@ -268,7 +273,7 @@
}
/**
- *
+ * Prepares the servlet action context for this request
*/
private void prepareServletActionContext() throws PortletException,
IOException {
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java
Thu Jul 13 18:09:55 2006
@@ -17,7 +17,6 @@
*/
package org.apache.struts2.portlet.util;
-import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Iterator;
@@ -30,12 +29,10 @@
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.WindowState;
-import javax.servlet.jsp.JspException;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
import org.apache.struts2.portlet.PortletActionConstants;
import org.apache.struts2.portlet.context.PortletActionContext;
@@ -49,18 +46,6 @@
*/
public class PortletUrlHelper {
private static final Log LOG = LogFactory.getLog(PortletUrlHelper.class);
-
- /**
- * Default HTTP port (80).
- */
- private static final int DEFAULT_HTTP_PORT = 80;
-
- /**
- * Default HTTPS port (443).
- */
- private static final int DEFAULT_HTTPS_PORT = 443;
-
- private static final String AMP = "&";
/**
* Create a portlet URL with for the specified action and namespace.
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
Thu Jul 13 18:09:55 2006
@@ -41,6 +41,9 @@
public class StrutsSpringObjectFactory extends SpringObjectFactory implements
ObjectFactoryInitializable {
private static final Log log =
LogFactory.getLog(StrutsSpringObjectFactory.class);
+ /* (non-Javadoc)
+ * @see
org.apache.struts2.util.ObjectFactoryInitializable#init(javax.servlet.ServletContext)
+ */
public void init(ServletContext servletContext) {
log.info("Initializing Struts-Spring integration...");
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/spring/lifecycle/SpringExternalReferenceResolverSetupListener.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/spring/lifecycle/SpringExternalReferenceResolverSetupListener.java?rev=421778&r1=421777&r2=421778&view=diff
==============================================================================
---
struts/struts2/trunk/core/src/main/java/org/apache/struts2/spring/lifecycle/SpringExternalReferenceResolverSetupListener.java
(original)
+++
struts/struts2/trunk/core/src/main/java/org/apache/struts2/spring/lifecycle/SpringExternalReferenceResolverSetupListener.java
Thu Jul 13 18:09:55 2006
@@ -48,26 +48,45 @@
private Map<ServletContext,Listener> listeners = new
HashMap<ServletContext,Listener>();
+ /* (non-Javadoc)
+ * @see
javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.ServletContextEvent)
+ */
public synchronized void contextDestroyed(ServletContextEvent event) {
Listener l = listeners.get(event.getServletContext());
Dispatcher.removeDispatcherListener(l);
listeners.remove(event.getServletContext());
}
+ /* (non-Javadoc)
+ * @see
javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
+ */
public synchronized void contextInitialized(ServletContextEvent event) {
Listener l = new Listener(event.getServletContext());
Dispatcher.addDispatcherListener(l);
listeners.put(event.getServletContext(), l);
}
+ /**
+ * Handles initializing and cleaning up the dispatcher
+ * @author brownd
+ *
+ */
private class Listener implements DispatcherListener {
private ServletContext servletContext;
+ /**
+ * Constructs the listener
+ *
+ * @param ctx The servlet context
+ */
public Listener(ServletContext ctx) {
this.servletContext = ctx;
}
+ /* (non-Javadoc)
+ * @see
org.apache.struts2.dispatcher.DispatcherListener#dispatcherInitialized(org.apache.struts2.dispatcher.Dispatcher)
+ */
public void dispatcherInitialized(Dispatcher du) {
ApplicationContext appContext = WebApplicationContextUtils
.getWebApplicationContext(servletContext);
@@ -87,6 +106,9 @@
}
+ /* (non-Javadoc)
+ * @see
org.apache.struts2.dispatcher.DispatcherListener#dispatcherDestroyed(org.apache.struts2.dispatcher.Dispatcher)
+ */
public void dispatcherDestroyed(Dispatcher du) {
}
}