org.apache.struts.chain
Class AbstractSelectModule

java.lang.Object
  extended byorg.apache.struts.chain.AbstractSelectModule
All Implemented Interfaces:
org.apache.commons.chain.Command
Direct Known Subclasses:
SelectModule

public abstract class AbstractSelectModule
extends java.lang.Object
implements org.apache.commons.chain.Command

Cache the ModuleConfig and MessageResources instances for the sub-application module to be used for processing this request.

Version:
$Rev: 54933 $ $Date: 2004-10-16 18:04:52 +0100 (Sat, 16 Oct 2004) $
Author:
Craig R. McClanahan

Field Summary
private  java.lang.String messageResourcesKey
           
private  java.lang.String moduleConfigKey
           
 
Constructor Summary
AbstractSelectModule()
           
 
Method Summary
 boolean execute(org.apache.commons.chain.Context context)
          Cache the ModuleConfig and MessageResources instances for the sub-application module to be used for processing this request.
 java.lang.String getMessageResourcesKey()
          Return the context attribute key under which the default MessageResources for the currently selected application module will be stored.
 java.lang.String getModuleConfigKey()
          Return the context attribute key under which the ModuleConfig for the currently selected application module will be stored.
protected abstract  java.lang.String getPrefix(org.apache.commons.chain.Context context)
          Calculate and return the module prefix for the module to be selected for this request.
 void setMessageResourcesKey(java.lang.String messageResourcesKey)
          Set the context attribute key under which the default MessageResources for the currently selected application module will be stored.
 void setModuleConfigKey(java.lang.String moduleConfigKey)
          Set the context attribute key under which the ModuleConfig for the currently selected application module will be stored.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageResourcesKey

private java.lang.String messageResourcesKey

moduleConfigKey

private java.lang.String moduleConfigKey
Constructor Detail

AbstractSelectModule

public AbstractSelectModule()
Method Detail

getMessageResourcesKey

public java.lang.String getMessageResourcesKey()

Return the context attribute key under which the default MessageResources for the currently selected application module will be stored.


setMessageResourcesKey

public void setMessageResourcesKey(java.lang.String messageResourcesKey)

Set the context attribute key under which the default MessageResources for the currently selected application module will be stored.

Parameters:
messageResourcesKey - The new context attribute key

getModuleConfigKey

public java.lang.String getModuleConfigKey()

Return the context attribute key under which the ModuleConfig for the currently selected application module will be stored.


setModuleConfigKey

public void setModuleConfigKey(java.lang.String moduleConfigKey)

Set the context attribute key under which the ModuleConfig for the currently selected application module will be stored.

Parameters:
moduleConfigKey - The new context attribute key

execute

public boolean execute(org.apache.commons.chain.Context context)
                throws java.lang.Exception

Cache the ModuleConfig and MessageResources instances for the sub-application module to be used for processing this request.

Specified by:
execute in interface org.apache.commons.chain.Command
Parameters:
context - The Context for the current request
Returns:
false so that processing continues
Throws:
java.lang.IllegalArgumentException - if no valid ModuleConfig or MessageResources can be identified for this request
java.lang.Exception

getPrefix

protected abstract java.lang.String getPrefix(org.apache.commons.chain.Context context)

Calculate and return the module prefix for the module to be selected for this request.

Parameters:
context - The Context for this request
Throws:
java.lang.IllegalArgumentException - if no valid ModuleConfig or MessageResources can be identified for this request


Copyright ? 2003 - Apache Software Foundation