Author: simonetripodi
Date: Sun Sep 4 15:38:38 2011
New Revision: 1165048
URL: http://svn.apache.org/viewvc?rev=1165048&view=rev
Log:
Command requires the <C extends Context> generic type
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/RequestParameterMapper.java
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/RequestParameterMapper.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/RequestParameterMapper.java?rev=1165048&r1=1165047&r2=1165048&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/RequestParameterMapper.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/RequestParameterMapper.java
Sun Sep 4 15:38:38 2011
@@ -34,10 +34,11 @@ import org.apache.commons.chain.generic.
* "/foo.execute?command=bar" would cause the "/bar" command to be loaded
* and executed.</p>
*
+ * @param <C> Type of the context associated with this command
* @author Craig R. McClanahan
*/
-public class RequestParameterMapper extends LookupCommand implements Command {
+public class RequestParameterMapper<C extends Context> extends
LookupCommand<C> implements Command<C> {
// ------------------------------------------------------ Instance
Variables
@@ -120,7 +121,7 @@ public class RequestParameterMapper exte
*
* @since Chain 1.2
*/
- protected String getCommandName(Context context) {
+ protected String getCommandName(C context) {
// Look up the specified request parameter for this request
ServletWebContext swcontext = (ServletWebContext) context;
@@ -141,7 +142,7 @@ public class RequestParameterMapper exte
*
* @since Chain 1.2
*/
- protected Catalog getCatalog(Context context) {
+ protected Catalog getCatalog(C context) {
Catalog catalog = (Catalog) context.get(getCatalogKey());
if (catalog == null) {
catalog = super.getCatalog(context);