Package org.apache.commons.chain.web
Class AbstractSetLocaleCommand
- java.lang.Object
-
- org.apache.commons.chain.web.AbstractSetLocaleCommand
-
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
PortletSetLocaleCommand,ServletSetLocaleCommand
public abstract class AbstractSetLocaleCommand extends java.lang.Object implements Command
Abstract base
Commandimplementation for setting the response locale for this response to theLocalestored under the context attribute key returned by thelocaleKeyproperty.- Version:
- $Revision: 480477 $ $Date: 2006-11-29 08:34:52 +0000 (Wed, 29 Nov 2006) $
- Author:
- Craig R. McClanahan
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringlocaleKeyThe context attribute key used to retrieve theLocale.-
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
-
-
Constructor Summary
Constructors Constructor Description AbstractSetLocaleCommand()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanexecute(Context context)Retrieve theLocalestored under the specified context attribute key, and establish it on this response.java.lang.StringgetLocaleKey()Return the context attribute key under which we will retrieve the responseLocale.protected abstract voidsetLocale(Context context, java.util.Locale locale)Establish the specifiedLocalefor this response.voidsetLocaleKey(java.lang.String localeKey)Set the context attribute key under which we will retrieve the responseLocale.
-
-
-
Method Detail
-
getLocaleKey
public java.lang.String getLocaleKey()
Return the context attribute key under which we will retrieve the response
Locale.- Returns:
- The context attribute key of the request
Locale.
-
setLocaleKey
public void setLocaleKey(java.lang.String localeKey)
Set the context attribute key under which we will retrieve the response
Locale.- Parameters:
localeKey- The new context attribute key
-
execute
public boolean execute(Context context) throws java.lang.Exception
Retrieve the
Localestored under the specified context attribute key, and establish it on this response.
-
-