org.apache.commons.chain.web
Class AbstractSetLocaleCommand

java.lang.Object
  extended byorg.apache.commons.chain.web.AbstractSetLocaleCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
FacesSetLocaleCommand, PortletSetLocaleCommand, ServletSetLocaleCommand

public abstract class AbstractSetLocaleCommand
extends Object
implements Command

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: 1.5 $ $Date: 2004/02/25 00:01:06 $
Author:
Craig R. McClanahan

Constructor Summary
AbstractSetLocaleCommand()
           
 
Method Summary
 boolean execute(Context context)
          Retrieve the Locale stored under the specified context attribute key, and establish it on this response.
 String getLocaleKey()
          Return the context attribute key under which we will retrieve the response Locale.
protected abstract  void setLocale(Context context, Locale locale)
          Establish the specified Locale for this response.
 void setLocaleKey(String localeKey)
          Set the context attribute key under which we will retrieve the response Locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSetLocaleCommand

public AbstractSetLocaleCommand()
Method Detail

getLocaleKey

public String getLocaleKey()

Return the context attribute key under which we will retrieve the response Locale.


setLocaleKey

public void setLocaleKey(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 Exception

Retrieve the Locale stored under the specified context attribute key, and establish it on this response.

Specified by:
execute in interface Command
Parameters:
context - The Context we are operating on
Returns:
false so that processng will continue
Throws:
Exception - general purpose exception return to indicate abnormal termination

setLocale

protected abstract void setLocale(Context context,
                                  Locale locale)

Establish the specified Locale for this response.



Copyright © 2003-2005 The Apache Software Foundation. All Rights Reserved.