|
||||||||||
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. |
java.lang.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. |
java.lang.String |
getName()
Retrieve Name property. |
java.lang.String |
getNameKey()
Return NameKey property. |
java.lang.String |
getWrapperClassName()
Return the WrapperClass property. |
boolean |
isOptional()
Test Optional property. |
boolean |
postprocess(org.apache.commons.chain.Context context,
java.lang.Exception exception)
Process the Exception for any Command that is a filter. |
void |
setCatalogName(java.lang.String catalogName)
Set CatalogName property. |
void |
setName(java.lang.String name)
Set Name property. |
void |
setNameKey(java.lang.String nameKey)
Set NameKey property. |
void |
setOptional(boolean optional)
Set Optional property. |
void |
setWrapperClassName(java.lang.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 java.lang.String getCatalogName()
Return CatalogName property.
public void setCatalogName(java.lang.String catalogName)
Set CatalogName property.
catalogName
- New value for CatalogNamepublic java.lang.String getName()
Retrieve Name property.
public void setName(java.lang.String name)
Set Name property.
name
- New value for Namepublic java.lang.String getNameKey()
Return NameKey property.
public void setNameKey(java.lang.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 java.lang.String getWrapperClassName()
Return the WrapperClass property.
public void setWrapperClassName(java.lang.String wrapperClassName)
Set WrappClassName property.
wrapperClassName
- The name of a WrapperClasspublic boolean execute(org.apache.commons.chain.Context context) throws java.lang.Exception
Invoke the Command for a Context, returning TRUE if processing should halt.
execute
in interface org.apache.commons.chain.Command
context
- Our ActionContext
java.lang.Exception
- On any errorpublic boolean postprocess(org.apache.commons.chain.Context context, java.lang.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 java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException, java.lang.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
java.lang.ClassNotFoundException
- On failed instantiation
java.lang.InstantiationException
- On failed instantiation
java.lang.reflect.InvocationTargetException
- On failed instantiation
java.lang.IllegalAccessException
- On failed instantiation
java.lang.NoSuchMethodException
- On failed instantiation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |