Author: ehillenius
Date: Fri Feb 16 12:45:53 2007
New Revision: 508574
URL: http://svn.apache.org/viewvc?view=rev&rev=508574
Log:
newRequestCycleProcessor should be in WebApplication as PortletApplication
doesn't use it.
Modified:
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/Application.java
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WebApplication.java
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/portlet/PortletApplication.java
Modified:
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/Application.java
URL:
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/Application.java?view=diff&rev=508574&r1=508573&r2=508574
==============================================================================
---
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/Application.java
(original)
+++
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/Application.java
Fri Feb 16 12:45:53 2007
@@ -43,7 +43,6 @@
import wicket.markup.resolver.WicketMessageResolver;
import wicket.protocol.http.IRequestLogger;
import wicket.protocol.http.RequestLogger;
-import wicket.request.IRequestCycleProcessor;
import wicket.session.ISessionStore;
import wicket.settings.IAjaxSettings;
import wicket.settings.IApplicationSettings;
@@ -216,9 +215,6 @@
current.set(null);
}
- /** the default request cycle processor implementation. */
- private IRequestCycleProcessor requestCycleProcessor;
-
/** list of [EMAIL PROTECTED] IComponentInstantiationListener}s. */
private IComponentInstantiationListener[]
componentInstantiationListeners = new IComponentInstantiationListener[0];
@@ -539,23 +535,6 @@
}
/**
- * Gets the default request cycle processor (with lazy initialization).
This
- * is the [EMAIL PROTECTED] IRequestCycleProcessor} that will be used by
- * [EMAIL PROTECTED] RequestCycle}s when custom implementations of the
request cycle
- * do not provide their own customized versions.
- *
- * @return the default request cycle processor
- */
- public final IRequestCycleProcessor getRequestCycleProcessor()
- {
- if (requestCycleProcessor == null)
- {
- requestCycleProcessor = newRequestCycleProcessor();
- }
- return requestCycleProcessor;
- }
-
- /**
* @return Application's request cycle related settings
* @see IDebugSettings
* @since 1.2
@@ -906,14 +885,6 @@
sessionStore = newSessionStore();
}
-
- /**
- * May be replaced by subclasses which whishes to uses there own
- * implementation of IRequestCycleProcessor
- *
- * @return IRequestCycleProcessor
- */
- protected abstract IRequestCycleProcessor newRequestCycleProcessor();
/**
* creates a new request logger when requests logging is enabled.
Modified:
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WebApplication.java
URL:
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WebApplication.java?view=diff&rev=508574&r1=508573&r2=508574
==============================================================================
---
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WebApplication.java
(original)
+++
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/WebApplication.java
Fri Feb 16 12:45:53 2007
@@ -72,11 +72,11 @@
* override the init() method. For example:
*
* <pre>
- * public void init()
- * {
- * String webXMLParameter =
getInitParameter("myWebXMLParameter");
- * URL schedulersConfig =
getServletContext().getResource("/WEB-INF/schedulers.xml");
- * ...
+ * public void init()
+ * {
+ * String webXMLParameter =
getInitParameter("myWebXMLParameter");
+ * URL schedulersConfig =
getServletContext().getResource("/WEB-INF/schedulers.xml");
+ * ...
* </pre>
*
* @see WicketFilter
@@ -128,6 +128,9 @@
/** The WicketFilter that this application is attached to */
private WicketFilter wicketFilter;
+ /** the default request cycle processor implementation. */
+ private IRequestCycleProcessor requestCycleProcessor;
+
/**
* Constructor. <strong>Use [EMAIL PROTECTED] #init()} for any
configuration of your
* application instead of overriding the constructor.</strong>
@@ -136,6 +139,7 @@
{
}
+
/**
* @see wicket.Application#getApplicationKey()
*/
@@ -150,7 +154,6 @@
return applicationKey;
}
-
/**
* Gets an init parameter from the filter's context.
*
@@ -170,6 +173,23 @@
}
/**
+ * Gets the default request cycle processor (with lazy initialization).
This
+ * is the [EMAIL PROTECTED] IRequestCycleProcessor} that will be used by
+ * [EMAIL PROTECTED] RequestCycle}s when custom implementations of the
request cycle
+ * do not provide their own customized versions.
+ *
+ * @return the default request cycle processor
+ */
+ public final IRequestCycleProcessor getRequestCycleProcessor()
+ {
+ if (requestCycleProcessor == null)
+ {
+ requestCycleProcessor = newRequestCycleProcessor();
+ }
+ return requestCycleProcessor;
+ }
+
+ /**
* Gets the servlet context for this application. Use this to get
references
* to absolute paths, global web.xml parameters (<context-param>), etc.
*
@@ -557,8 +577,13 @@
}
/**
- * May be replaced by subclasses which whishes to uses there own
- * implementation of IRequestCycleProcessor
+ * Gets a new request cycle processor for web requests. May be replaced
by
+ * subclasses which whishes to uses there own implementation of
+ * IRequestCycleProcessor.
+ *
+ * NOTE this can't be moved to application as portlets use two different
+ * request cycle processors, and hence have two different methods for
them,
+ * depending on the kind of request.
*
* @return IRequestCycleProcessor
*/
Modified:
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/portlet/PortletApplication.java
URL:
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/portlet/PortletApplication.java?view=diff&rev=508574&r1=508573&r2=508574
==============================================================================
---
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/portlet/PortletApplication.java
(original)
+++
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/portlet/PortletApplication.java
Fri Feb 16 12:45:53 2007
@@ -33,7 +33,6 @@
import wicket.protocol.http.IRequestLogger;
import wicket.protocol.http.WebRequest;
import wicket.protocol.http.WebRequestCycle;
-import wicket.protocol.http.WebRequestCycleProcessor;
import wicket.protocol.http.WebResponse;
import wicket.protocol.http.WebSession;
import wicket.protocol.http.portlet.pages.AccessDeniedPortletPage;
@@ -410,8 +409,9 @@
}
/**
- * May be replaced by subclasses which whishes to uses there own
- * implementation of IRequestCycleProcessor
+ * Gets a new request cycle processor for an action request. May be
replaced
+ * by subclasses which whishes to uses there own implementation of
+ * IRequestCycleProcessor
*
* @return IRequestCycleProcessor
*/
@@ -420,10 +420,10 @@
return new PortletActionRequestCycleProcessor();
}
-
/**
- * May be replaced by subclasses which whishes to uses there own
- * implementation of IRequestCycleProcessor
+ * Gets a new request cycle processor for an render request. May be
replaced
+ * by subclasses which whishes to uses there own implementation of
+ * IRequestCycleProcessor
*
* @return IRequestCycleProcessor
*/
@@ -433,17 +433,8 @@
}
/**
- * May be replaced by subclasses which whishes to uses there own
- * implementation of IRequestCycleProcessor
- *
- * @return IRequestCycleProcessor
+ * @see wicket.Application#newSessionStore()
*/
- protected IRequestCycleProcessor newRequestCycleProcessor()
- {
- return new WebRequestCycleProcessor();
- }
-
-
protected ISessionStore newSessionStore()
{
return new PortletSessionStore();