Author: simonetripodi
Date: Wed Aug 31 14:26:26 2011
New Revision: 1163636
URL: http://svn.apache.org/viewvc?rev=1163636&view=rev
Log:
replaced <T> generic with <C> that stands for 'Context', it is more intuitive
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Chain.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Command.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Filter.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/CopyCommand.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/DispatchCommand.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/DispatchLookupCommand.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/LookupCommand.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/RemoveCommand.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/AbstractGetLocaleCommand.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/AbstractSetLocaleCommand.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/faces/FacesGetLocaleCommand.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/faces/FacesSetLocaleCommand.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/portlet/PortletGetLocaleCommand.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/portlet/PortletSetLocaleCommand.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletGetLocaleCommand.java
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletSetLocaleCommand.java
commons/proper/chain/branches/version-2.0-work/src/test/java/org/apache/commons/chain/generic/DispatchLookupCommandTestCase.java
commons/proper/chain/branches/version-2.0-work/src/test/java/org/apache/commons/chain/impl/NonDelegatingCommand.java
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Chain.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Chain.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Chain.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Chain.java
Wed Aug 31 14:26:26 2011
@@ -47,13 +47,13 @@ package org.apache.commons.chain;
* the <code>execute()</code> method of the {@link Chain} is first called.
* After that, the configuration of the {@link Chain} is frozen.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
* @author Craig R. McClanahan
* @version $Revision$ $Date$
*/
-public interface Chain<T extends Context> extends Command<T> {
+public interface Chain<C extends Context> extends Command<C> {
/**
@@ -70,7 +70,7 @@ public interface Chain<T extends Context
* @exception IllegalStateException if this {@link Chain} has already
* been executed at least once, so no further configuration is allowed
*/
- void addCommand(Command<T> command);
+ void addCommand(Command<C> command);
/**
@@ -115,7 +115,7 @@ public interface Chain<T extends Context
* {@link Command} in an enclosing {@link Chain}
*/
@Override
- boolean execute(T context) throws Exception;
+ boolean execute(C context) throws Exception;
}
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Command.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Command.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Command.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Command.java
Wed Aug 31 14:26:26 2011
@@ -73,13 +73,13 @@ package org.apache.commons.chain;
* being used in this fashion, as opposed to JavaBeans properties that simply
* configure the internal operation of this {@link Command}.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
* @author Craig R. McClanahan
* @version $Revision$ $Date$
*/
-public interface Command<T extends Context> {
+public interface Command<C extends Context> {
/**
* <p>Commands should return <code>CONTINUE_PROCESSING</code> if the
processing
@@ -119,7 +119,7 @@ public interface Command<T extends Conte
* {@link Command} in an enclosing {@link Chain}
*/
- boolean execute(T context) throws Exception;
+ boolean execute(C context) throws Exception;
}
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Filter.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Filter.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Filter.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/Filter.java
Wed Aug 31 14:26:26 2011
@@ -37,13 +37,13 @@ package org.apache.commons.chain;
* can reliably release such resources in the <code>postprocess()</code>
* method, which is guaranteed to be called by the owning {@link Chain}.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
* @author Craig R. McClanahan
* @version $Revision$ $Date$
*/
-public interface Filter<T extends Context> extends Command<T> {
+public interface Filter<C extends Context> extends Command<C> {
/**
@@ -64,7 +64,7 @@ public interface Filter<T extends Contex
* method (and therefore need not be rethrown), return <code>true</code>;
* otherwise return <code>false</code>
*/
- boolean postprocess(T context, Exception exception);
+ boolean postprocess(C context, Exception exception);
}
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/CopyCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/CopyCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/CopyCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/CopyCommand.java
Wed Aug 31 14:26:26 2011
@@ -25,13 +25,13 @@ import org.apache.commons.chain.Context;
* <p>Copy a specified literal value, or a context attribute stored under
* the <code>fromKey</code> (if any), to the <code>toKey</code>.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
* @author Craig R. McClanahan
* @version $Revision$ $Date$
*/
-public class CopyCommand<T extends Context> implements Command<T> {
+public class CopyCommand<C extends Context> implements Command<C> {
// --------------------------------------------------------------
Properties
@@ -128,7 +128,7 @@ public class CopyCommand<T extends Conte
* @throws Exception in the if an error occurs during execution.
*/
@Override
- public boolean execute(T context) throws Exception {
+ public boolean execute(C context) throws Exception {
Object value = this.value;
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/DispatchCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/DispatchCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/DispatchCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/DispatchCommand.java
Wed Aug 31 14:26:26 2011
@@ -29,11 +29,11 @@ import java.util.WeakHashMap;
* For use by developers who prefer to group related functionality into a
single class
* rather than an inheritance family.
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
* @since Chain 1.1
*/
-public abstract class DispatchCommand<T extends Context> implements Command<T>
{
+public abstract class DispatchCommand<C extends Context> implements Command<C>
{
/** Cache of methods */
private final Map<String, Method> methods = new WeakHashMap<String,
Method>();
@@ -62,7 +62,7 @@ public abstract class DispatchCommand<T
* the exception itself, unless the cause is an <code>Error</code> or
other <code>Throwable</code>
* which is not an <code>Exception</code>.
*/
- public boolean execute(T context) throws Exception {
+ public boolean execute(C context) throws Exception {
if (this.getMethod() == null && this.getMethodKey() == null) {
throw new IllegalStateException("Neither 'method' nor 'methodKey'
properties are defined ");
@@ -91,7 +91,7 @@ public abstract class DispatchCommand<T
* @throws NoSuchMethodException if no method can be found under the
specified name.
* @throws NullPointerException if no methodName cannot be determined
*/
- protected Method extractMethod(T context) throws NoSuchMethodException {
+ protected Method extractMethod(C context) throws NoSuchMethodException {
String methodName = this.getMethod();
@@ -149,7 +149,7 @@ public abstract class DispatchCommand<T
* @param context The Context being processed by this Command.
* @return The method arguments.
*/
- protected Object[] getArguments(T context) {
+ protected Object[] getArguments(C context) {
return new Object[] {context};
}
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/DispatchLookupCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/DispatchLookupCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/DispatchLookupCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/DispatchLookupCommand.java
Wed Aug 31 14:26:26 2011
@@ -47,14 +47,14 @@ import java.util.WeakHashMap;
* silently ignored. Otherwise, a lookup failure will trigger an
* <code>IllegalArgumentException</code>.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
* @author Sean Schofield
* @version $Revision$
* @since Chain 1.1
*/
-public class DispatchLookupCommand<T extends Context> extends LookupCommand<T>
implements Filter<T> {
+public class DispatchLookupCommand<C extends Context> extends LookupCommand<C>
implements Filter<C> {
// --------------------------------------------------------------
Constructors
@@ -140,7 +140,7 @@ public class DispatchLookupCommand<T ext
* <code>optional</code> property is set to <code>false</code>
*/
@Override
- public boolean execute(T context) throws Exception {
+ public boolean execute(C context) throws Exception {
if (this.getMethod() == null && this.getMethodKey() == null) {
throw new IllegalStateException(
@@ -148,7 +148,7 @@ public class DispatchLookupCommand<T ext
);
}
- Command<T> command = getCommand(context);
+ Command<C> command = getCommand(context);
if (command != null) {
Method methodObject = extractMethod(command, context);
@@ -188,7 +188,7 @@ public class DispatchLookupCommand<T ext
* @param context The context associated with the request
* @return the method arguments to be used
*/
- protected Object[] getArguments(T context) {
+ protected Object[] getArguments(C context) {
return (Object[])new Object[] {context};
}
@@ -211,7 +211,7 @@ public class DispatchLookupCommand<T ext
* specified name.
* @throws NullPointerException if no methodName can be determined
*/
- private Method extractMethod(Command command, T context)
+ private Method extractMethod(Command command, C context)
throws NoSuchMethodException {
String methodName = this.getMethod();
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/LookupCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/LookupCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/LookupCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/LookupCommand.java
Wed Aug 31 14:26:26 2011
@@ -40,13 +40,13 @@ import org.apache.commons.chain.Filter;
* silently ignored. Otherwise, a lookup failure will trigger an
* <code>IllegalArgumentException</code>.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
* @author Craig R. McClanahan
* @version $Revision$ $Date$
*/
-public class LookupCommand<T extends Context> implements Filter<T> {
+public class LookupCommand<C extends Context> implements Filter<C> {
// --------------------------------------------------------------
Constructors
@@ -301,7 +301,7 @@ public class LookupCommand<T extends Con
* @throws Exception if and error occurs in the looked-up Command.
*/
@Override
- public boolean execute(T context) throws Exception {
+ public boolean execute(C context) throws Exception {
Command command = getCommand(context);
if (command != null) {
@@ -331,7 +331,7 @@ public class LookupCommand<T extends Con
* case <code>IllegalArgumentException</code> will be thrown.
*/
@Override
- public boolean postprocess(T context, Exception exception) {
+ public boolean postprocess(C context, Exception exception) {
Command command = getCommand(context);
if (command != null) {
@@ -361,7 +361,7 @@ public class LookupCommand<T extends Con
*
* @since Chain 1.2
*/
- protected Catalog getCatalog(T context) {
+ protected Catalog getCatalog(C context) {
CatalogFactory lookupFactory = this.catalogFactory;
if (lookupFactory == null) {
lookupFactory = CatalogFactory.getInstance();
@@ -397,7 +397,7 @@ public class LookupCommand<T extends Con
* can be found and the <code>optional</code> property is set
* to <code>false</code>
*/
- protected Command getCommand(T context) {
+ protected Command getCommand(C context) {
Catalog catalog = getCatalog(context);
@@ -431,7 +431,7 @@ public class LookupCommand<T extends Con
*
* @since Chain 1.2
*/
- protected String getCommandName(T context) {
+ protected String getCommandName(C context) {
String name = getName();
if (name == null) {
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/RemoveCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/RemoveCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/RemoveCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/generic/RemoveCommand.java
Wed Aug 31 14:26:26 2011
@@ -24,13 +24,13 @@ import org.apache.commons.chain.Context;
/**
* <p>Remove any context attribute stored under the <code>fromKey</code>.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
* @author Craig R. McClanahan
* @version $Revision$ $Date$
*/
-public class RemoveCommand<T extends Context> implements Command<T> {
+public class RemoveCommand<C extends Context> implements Command<C> {
// --------------------------------------------------------------
Properties
@@ -74,7 +74,7 @@ public class RemoveCommand<T extends Con
* @return <code>false</code> so that processing will continue
* @throws Exception if and error occurs.
*/
- public boolean execute(T context) throws Exception {
+ public boolean execute(C context) throws Exception {
context.remove(getFromKey());
return (false);
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java
Wed Aug 31 14:26:26 2011
@@ -28,13 +28,13 @@ import org.apache.commons.chain.Filter;
/**
* <p>Convenience base class for {@link Chain} implementations.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
* @author Craig R. McClanahan
* @version $Revision$ $Date$
*/
-public class ChainBase<T extends Context> implements Chain<T> {
+public class ChainBase<C extends Context> implements Chain<C> {
// ----------------------------------------------------------- Constructors
@@ -57,7 +57,7 @@ public class ChainBase<T extends Context
* @exception IllegalArgumentException if <code>command</code>
* is <code>null</code>
*/
- public ChainBase(Command<T> command) {
+ public ChainBase(Command<C> command) {
addCommand(command);
@@ -74,7 +74,7 @@ public class ChainBase<T extends Context
* or one of the individual {@link Command} elements,
* is <code>null</code>
*/
- public ChainBase(Command<T>[] commands) {
+ public ChainBase(Command<C>[] commands) {
if (commands == null) {
throw new IllegalArgumentException();
@@ -96,12 +96,12 @@ public class ChainBase<T extends Context
* or one of the individual {@link Command} elements,
* is <code>null</code>
*/
- public ChainBase(Collection<Command<T>> commands) {
+ public ChainBase(Collection<Command<C>> commands) {
if (commands == null) {
throw new IllegalArgumentException();
}
- Iterator<Command<T>> elements = commands.iterator();
+ Iterator<Command<C>> elements = commands.iterator();
while (elements.hasNext()) {
addCommand(elements.next());
}
@@ -117,7 +117,7 @@ public class ChainBase<T extends Context
* the order in which they may delegate processing to the remainder of
* the {@link Chain}.</p>
*/
- protected Command<T>[] commands = new Command[0];
+ protected Command<C>[] commands = new Command[0];
/**
@@ -140,7 +140,7 @@ public class ChainBase<T extends Context
* @exception IllegalStateException if no further configuration is allowed
*/
@Override
- public void addCommand(Command<T> command) {
+ public void addCommand(Command<C> command) {
if (command == null) {
throw new IllegalArgumentException();
@@ -174,7 +174,7 @@ public class ChainBase<T extends Context
* {@link Command} in an enclosing {@link Chain}
*/
@Override
- public boolean execute(T context) throws Exception {
+ public boolean execute(C context) throws Exception {
// Verify our parameters
if (context == null) {
@@ -241,7 +241,7 @@ public class ChainBase<T extends Context
* {@link Chain}. This method is package private, and is used only
* for the unit tests.</p>
*/
- Command<T>[] getCommands() {
+ Command<C>[] getCommands() {
return (commands);
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/AbstractGetLocaleCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/AbstractGetLocaleCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/AbstractGetLocaleCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/AbstractGetLocaleCommand.java
Wed Aug 31 14:26:26 2011
@@ -27,13 +27,13 @@ import org.apache.commons.chain.Context;
* requested Locale from our {@link Context}, and storing it under the
* context attribute key returned by the <code>localeKey</code> property.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
* @author Craig R. McClanahan
* @version $Revision$ $Date$
*/
-public abstract class AbstractGetLocaleCommand<T extends Context> implements
Command<T> {
+public abstract class AbstractGetLocaleCommand<C extends Context> implements
Command<C> {
// --------------------------------------------------------------
Properties
@@ -84,7 +84,7 @@ public abstract class AbstractGetLocaleC
* @throws Exception If an error occurs during execution.
*/
@Override
- public boolean execute(T context) throws Exception {
+ public boolean execute(C context) throws Exception {
context.put(getLocaleKey(), getLocale(context));
return (false);
@@ -100,7 +100,7 @@ public abstract class AbstractGetLocaleC
* @param context The {@link Context} we are operating on.
* @return The Locale for the request.
*/
- protected abstract Locale getLocale(T context);
+ protected abstract Locale getLocale(C context);
}
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/AbstractSetLocaleCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/AbstractSetLocaleCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/AbstractSetLocaleCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/AbstractSetLocaleCommand.java
Wed Aug 31 14:26:26 2011
@@ -28,13 +28,13 @@ import org.apache.commons.chain.Context;
* under the context attribute key returned by the <code>localeKey</code>
* property.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
* @author Craig R. McClanahan
* @version $Revision$ $Date$
*/
-public abstract class AbstractSetLocaleCommand<T extends Context> implements
Command<T> {
+public abstract class AbstractSetLocaleCommand<C extends Context> implements
Command<C> {
// --------------------------------------------------------------
Properties
@@ -84,7 +84,7 @@ public abstract class AbstractSetLocaleC
* @return <code>false</code> so that processng will continue
* @throws Exception If an error occurs during execution.
*/
- public boolean execute(T context) throws Exception {
+ public boolean execute(C context) throws Exception {
setLocale(context,
(Locale) context.get(getLocaleKey()));
@@ -102,7 +102,7 @@ public abstract class AbstractSetLocaleC
* @param context The {@link Context} we are operating on.
* @param locale The Locale for the request.
*/
- protected abstract void setLocale(T context, Locale locale);
+ protected abstract void setLocale(C context, Locale locale);
}
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/faces/FacesGetLocaleCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/faces/FacesGetLocaleCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/faces/FacesGetLocaleCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/faces/FacesGetLocaleCommand.java
Wed Aug 31 14:26:26 2011
@@ -27,10 +27,10 @@ import org.apache.commons.chain.web.Abst
* <p>Concrete implementation of {@link AbstractGetLocaleCommand} for
* the JavaServer Faces API.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*/
-public class FacesGetLocaleCommand<T extends Context> extends
AbstractGetLocaleCommand<T> {
+public class FacesGetLocaleCommand<C extends Context> extends
AbstractGetLocaleCommand<C> {
// ------------------------------------------------------- Protected
Methods
@@ -43,7 +43,7 @@ public class FacesGetLocaleCommand<T ext
* @return The Locale for the request.
*/
@Override
- protected Locale getLocale(T context) {
+ protected Locale getLocale(C context) {
FacesContext fcontext = (FacesContext)
context.get("context");
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/faces/FacesSetLocaleCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/faces/FacesSetLocaleCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/faces/FacesSetLocaleCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/faces/FacesSetLocaleCommand.java
Wed Aug 31 14:26:26 2011
@@ -27,11 +27,11 @@ import org.apache.commons.chain.web.Abst
* <p>Concrete implementation of {@link AbstractSetLocaleCommand} for
* the JavaServer Faces API.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
*/
-public class FacesSetLocaleCommand<T extends Context> extends
AbstractSetLocaleCommand<T> {
+public class FacesSetLocaleCommand<C extends Context> extends
AbstractSetLocaleCommand<C> {
// ------------------------------------------------------- Protected
Methods
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/portlet/PortletGetLocaleCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/portlet/PortletGetLocaleCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/portlet/PortletGetLocaleCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/portlet/PortletGetLocaleCommand.java
Wed Aug 31 14:26:26 2011
@@ -27,10 +27,10 @@ import org.apache.commons.chain.web.Abst
* <p>Concrete implementation of {@link AbstractGetLocaleCommand} for
* the Portlet API.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*/
-public class PortletGetLocaleCommand<T extends Context> extends
AbstractGetLocaleCommand<T> {
+public class PortletGetLocaleCommand<C extends Context> extends
AbstractGetLocaleCommand<C> {
// ------------------------------------------------------- Protected
Methods
@@ -42,7 +42,7 @@ public class PortletGetLocaleCommand<T e
* @param context The {@link Context} we are operating on.
* @return The Locale for the request.
*/
- protected Locale getLocale(T context) {
+ protected Locale getLocale(C context) {
PortletRequest request = (PortletRequest)
context.get("request");
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/portlet/PortletSetLocaleCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/portlet/PortletSetLocaleCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/portlet/PortletSetLocaleCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/portlet/PortletSetLocaleCommand.java
Wed Aug 31 14:26:26 2011
@@ -27,11 +27,11 @@ import org.apache.commons.chain.web.Abst
* <p>Concrete implementation of {@link AbstractSetLocaleCommand} for
* the Portlet API.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
*/
-public class PortletSetLocaleCommand<T extends Context> extends
AbstractSetLocaleCommand<T> {
+public class PortletSetLocaleCommand<C extends Context> extends
AbstractSetLocaleCommand<C> {
// ------------------------------------------------------- Protected
Methods
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletGetLocaleCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletGetLocaleCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletGetLocaleCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletGetLocaleCommand.java
Wed Aug 31 14:26:26 2011
@@ -27,11 +27,11 @@ import org.apache.commons.chain.web.Abst
* <p>Concrete implementation of {@link AbstractGetLocaleCommand} for
* the Servlet API.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
*/
-public class ServletGetLocaleCommand<T extends Context> extends
AbstractGetLocaleCommand<T> {
+public class ServletGetLocaleCommand<C extends Context> extends
AbstractGetLocaleCommand<C> {
// ------------------------------------------------------- Protected
Methods
@@ -43,7 +43,7 @@ public class ServletGetLocaleCommand<T e
* @param context The {@link Context} we are operating on.
* @return The Locale for the request.
*/
- protected Locale getLocale(T context) {
+ protected Locale getLocale(C context) {
HttpServletRequest request = (HttpServletRequest)
context.get("request");
Modified:
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletSetLocaleCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletSetLocaleCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletSetLocaleCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/web/servlet/ServletSetLocaleCommand.java
Wed Aug 31 14:26:26 2011
@@ -27,11 +27,11 @@ import org.apache.commons.chain.web.Abst
* <p>Concrete implementation of {@link AbstractSetLocaleCommand} for
* the Servlet API.</p>
*
- * @param <T> Type of the context associated with this command
+ * @param <C> Type of the context associated with this command
*
*/
-public class ServletSetLocaleCommand<T extends Context> extends
AbstractSetLocaleCommand<T> {
+public class ServletSetLocaleCommand<C extends Context> extends
AbstractSetLocaleCommand<C> {
// ------------------------------------------------------- Protected
Methods
@@ -43,7 +43,7 @@ public class ServletSetLocaleCommand<T e
* @param context The {@link Context} we are operating on.
* @param locale The Locale for the request.
*/
- protected void setLocale(T context, Locale locale) {
+ protected void setLocale(C context, Locale locale) {
HttpServletResponse response = (HttpServletResponse)
context.get("response");
Modified:
commons/proper/chain/branches/version-2.0-work/src/test/java/org/apache/commons/chain/generic/DispatchLookupCommandTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/test/java/org/apache/commons/chain/generic/DispatchLookupCommandTestCase.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/test/java/org/apache/commons/chain/generic/DispatchLookupCommandTestCase.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/test/java/org/apache/commons/chain/generic/DispatchLookupCommandTestCase.java
Wed Aug 31 14:26:26 2011
@@ -209,19 +209,19 @@ public class DispatchLookupCommandTestCa
// ---------------------------------------------------------- Inner Classes
- class TestCommand<T extends Context> extends NonDelegatingCommand<T> {
+ class TestCommand<C extends Context> extends NonDelegatingCommand<C> {
public TestCommand(String id)
{
super(id);
}
- public boolean fooMethod(T context) {
+ public boolean fooMethod(C context) {
log(context, id);
return true;
}
- public boolean barMethod(T context) {
+ public boolean barMethod(C context) {
log(context, id);
return true;
}
Modified:
commons/proper/chain/branches/version-2.0-work/src/test/java/org/apache/commons/chain/impl/NonDelegatingCommand.java
URL:
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/test/java/org/apache/commons/chain/impl/NonDelegatingCommand.java?rev=1163636&r1=1163635&r2=1163636&view=diff
==============================================================================
---
commons/proper/chain/branches/version-2.0-work/src/test/java/org/apache/commons/chain/impl/NonDelegatingCommand.java
(original)
+++
commons/proper/chain/branches/version-2.0-work/src/test/java/org/apache/commons/chain/impl/NonDelegatingCommand.java
Wed Aug 31 14:26:26 2011
@@ -29,7 +29,7 @@ import org.apache.commons.chain.Context;
* @version $Revision$ $Date$
*/
-public class NonDelegatingCommand<T extends Context> implements Command<T> {
+public class NonDelegatingCommand<C extends Context> implements Command<C> {
// ------------------------------------------------------------ Constructor
@@ -65,7 +65,7 @@ public class NonDelegatingCommand<T exte
// Execution method for this Command
- public boolean execute(T context) throws Exception {
+ public boolean execute(C context) throws Exception {
if (context == null) {
throw new IllegalArgumentException();