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
Abstract base Command
implementation for setting the
response locale for this response to the Locale
stored
under the context attribute key returned by the localeKey
property.
- Version:
- $Revision: 480477 $ $Date: 2006-11-29 08:34:52 +0000 (Wed, 29 Nov 2006) $
- Author:
- Craig R. McClanahan
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
The context attribute key used to retrieve theLocale
.Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Retrieve theLocale
stored under the specified context attribute key, and establish it on this response.Return the context attribute key under which we will retrieve the responseLocale
.protected abstract void
Establish the specifiedLocale
for this response.void
setLocaleKey
(String localeKey) Set the context attribute key under which we will retrieve the responseLocale
.
-
Field Details
-
localeKey
The context attribute key used to retrieve the
Locale
.
-
-
Constructor Details
-
AbstractSetLocaleCommand
public AbstractSetLocaleCommand()
-
-
Method Details
-
getLocaleKey
Return the context attribute key under which we will retrieve the response
Locale
.- Returns:
- The context attribute key of the request
Locale
.
-
setLocaleKey
Set the context attribute key under which we will retrieve the response
Locale
.- Parameters:
localeKey
- The new context attribute key
-
execute
Retrieve the
Locale
stored under the specified context attribute key, and establish it on this response. -
setLocale
Establish the specified
Locale
for this response.- Parameters:
context
- TheContext
we are operating on.locale
- The Locale for the request.
-