|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.chain.commands.generic.WrappingLookupCommand
public class WrappingLookupCommand
Variant on chain LookupCommand which can optionally wrap the context it passes to the looked up command in an alternative class.
Field Summary |
---|
Fields inherited from interface org.apache.commons.chain.Command |
---|
CONTINUE_PROCESSING, PROCESSING_COMPLETE |
Constructor Summary | |
---|---|
WrappingLookupCommand()
Zero-argument constructor. |
Method Summary | |
---|---|
boolean |
execute(org.apache.commons.chain.Context context)
Invoke the Command for a Context, returning TRUE if processing should halt. |
String |
getCatalogName()
Return CatalogName property. |
protected org.apache.commons.chain.Command |
getCommand(org.apache.commons.chain.Context context)
Return the Command to process for this Context. |
protected org.apache.commons.chain.Context |
getContext(org.apache.commons.chain.Context context)
If the wrapperClassName property is not null, return a Context of the type specified by wrapperClassName, instantiated using a single-arg constructor which takes the context passed as an argument to this method. |
String |
getName()
Retrieve Name property. |
String |
getNameKey()
Return NameKey property. |
String |
getWrapperClassName()
Return the WrapperClass property. |
boolean |
isOptional()
Test Optional property. |
boolean |
postprocess(org.apache.commons.chain.Context context,
Exception exception)
Process the Exception for any Command that is a filter. |
void |
setCatalogName(String catalogName)
Set CatalogName property. |
void |
setName(String name)
Set Name property. |
void |
setNameKey(String nameKey)
Set NameKey property. |
void |
setOptional(boolean optional)
Set Optional property. |
void |
setWrapperClassName(String wrapperClassName)
Set WrappClassName property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WrappingLookupCommand()
Zero-argument constructor.
Method Detail |
---|
public String getCatalogName()
Return CatalogName property.
public void setCatalogName(String catalogName)
Set CatalogName property.
catalogName
- New value for CatalogNamepublic String getName()
Retrieve Name property.
public void setName(String name)
Set Name property.
name
- New value for Namepublic String getNameKey()
Return NameKey property.
public void setNameKey(String nameKey)
Set NameKey property.
nameKey
- New value for NameKeypublic boolean isOptional()
Test Optional property.
public void setOptional(boolean optional)
Set Optional property.
optional
- New value for Optionalpublic String getWrapperClassName()
Return the WrapperClass property.
public void setWrapperClassName(String wrapperClassName)
Set WrappClassName property.
wrapperClassName
- The name of a WrapperClasspublic boolean execute(org.apache.commons.chain.Context context) throws Exception
Invoke the Command for a Context, returning TRUE if processing should halt.
execute
in interface org.apache.commons.chain.Command
context
- Our ActionContext
Exception
- On any errorpublic boolean postprocess(org.apache.commons.chain.Context context, Exception exception)
Process the Exception for any Command that is a filter.
postprocess
in interface org.apache.commons.chain.Filter
context
- Our ActionContextexception
- The Exception thrown by another Comamnd in a Chain
protected org.apache.commons.chain.Command getCommand(org.apache.commons.chain.Context context)
Return the Command to process for this Context.
context
- The Context we are processing
protected org.apache.commons.chain.Context getContext(org.apache.commons.chain.Context context) throws ClassNotFoundException, InstantiationException, InvocationTargetException, IllegalAccessException, NoSuchMethodException
If the wrapperClassName property is not null, return a Context of the type specified by wrapperClassName, instantiated using a single-arg constructor which takes the context passed as an argument to this method.
This method throws an exception if the wrapperClass cannot be found, or if there are any errors instantiating the wrapping context.
context
- Context we are processing
ClassNotFoundException
- On failed instantiation
InstantiationException
- On failed instantiation
InvocationTargetException
- On failed instantiation
IllegalAccessException
- On failed instantiation
NoSuchMethodException
- On failed instantiation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |