Package org.apache.commons.chain.web
Class AbstractGetLocaleCommand
java.lang.Object
org.apache.commons.chain.web.AbstractGetLocaleCommand
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
PortletGetLocaleCommand
,ServletGetLocaleCommand
Abstract base Command
implementation for retrieving the
requested Locale from our Context
, and storing it 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 store theLocale
.Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Retrieve theLocale
for this request, and store it under the specified context attribute.protected abstract Locale
Retrieve and return theLocale
for this request.Return the context attribute key under which we will store the requestLocale
.void
setLocaleKey
(String localeKey) Set the context attribute key under which we will store the requestLocale
.
-
Field Details
-
localeKey
The context attribute key used to store the
Locale
.
-
-
Constructor Details
-
AbstractGetLocaleCommand
public AbstractGetLocaleCommand()
-
-
Method Details
-
getLocaleKey
Return the context attribute key under which we will store the request
Locale
.- Returns:
- The context attribute key of the request
Locale
.
-
setLocaleKey
Set the context attribute key under which we will store the request
Locale
.- Parameters:
localeKey
- The new context attribute key
-
execute
Retrieve the
Locale
for this request, and store it under the specified context attribute. -
getLocale
Retrieve and return the
Locale
for this request.- Parameters:
context
- TheContext
we are operating on.- Returns:
- The Locale for the request.
-