public class ExceptionConfig extends BaseConfig
A JavaBean representing the configuration information of an
<exception>
element from a Struts configuration
file.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
bundle
The servlet context attribute under which the message resources bundle
to be used for this exception is located.
|
protected boolean |
extensionProcessed
Have the inheritance values for this class been applied?
|
protected java.lang.String |
handler
The fully qualified Java class name of the exception handler class
which should be instantiated to handle this exception.
|
protected java.lang.String |
inherit
The type of the ExceptionConfig that this object should inherit
properties from.
|
protected java.lang.String |
key
The message resources key specifying the error message associated with
this exception.
|
protected java.lang.String |
path
The module-relative path of the resource to forward to if this
exception occurs during an
Action . |
protected java.lang.String |
scope
The scope in which we should expose the ActionMessage for this
exception handler.
|
protected java.lang.String |
type
The fully qualified Java class name of the exception that is to be
handled by this handler.
|
configured
Constructor and Description |
---|
ExceptionConfig() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkCircularInheritance(ModuleConfig moduleConfig,
ActionConfig actionConfig)
Traces the hierarchy of this object to check if any of the ancestors
are extending this instance.
|
java.lang.String |
getBundle() |
java.lang.String |
getExtends() |
java.lang.String |
getHandler() |
java.lang.String |
getKey() |
java.lang.String |
getPath() |
java.lang.String |
getScope() |
java.lang.String |
getType() |
void |
inheritFrom(ExceptionConfig config)
Inherit values that have not been overridden from the provided
config object.
|
boolean |
isExtensionProcessed() |
void |
processExtends(ModuleConfig moduleConfig,
ActionConfig actionConfig)
Inherit configuration information from the ExceptionConfig that this
instance is extending.
|
void |
setBundle(java.lang.String bundle) |
void |
setExtends(java.lang.String inherit) |
void |
setHandler(java.lang.String handler) |
void |
setKey(java.lang.String key) |
void |
setPath(java.lang.String path) |
void |
setScope(java.lang.String scope) |
void |
setType(java.lang.String type) |
java.lang.String |
toString()
Return a String representation of this object.
|
copyProperties, freeze, getProperties, getProperty, inheritProperties, setProperties, setProperty, throwIfConfigured
protected java.lang.String bundle
protected java.lang.String inherit
protected boolean extensionProcessed
protected java.lang.String handler
protected java.lang.String key
protected java.lang.String path
Action
.protected java.lang.String scope
protected java.lang.String type
public java.lang.String getBundle()
public void setBundle(java.lang.String bundle)
public java.lang.String getExtends()
public void setExtends(java.lang.String inherit)
public boolean isExtensionProcessed()
public java.lang.String getHandler()
public void setHandler(java.lang.String handler)
public java.lang.String getKey()
public void setKey(java.lang.String key)
public java.lang.String getPath()
public void setPath(java.lang.String path)
public java.lang.String getScope()
public void setScope(java.lang.String scope)
public java.lang.String getType()
public void setType(java.lang.String type)
protected boolean checkCircularInheritance(ModuleConfig moduleConfig, ActionConfig actionConfig)
Traces the hierarchy of this object to check if any of the ancestors are extending this instance.
moduleConfig
- The ModuleConfig
that this config is from.actionConfig
- The ActionConfig
that this config is from,
if applicable. This parameter must be null if this
is a global handler.public void inheritFrom(ExceptionConfig config) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException
Inherit values that have not been overridden from the provided config object. Subclasses overriding this method should verify that the given parameter is of a class that contains a property it is trying to inherit:
if (config instanceof MyCustomConfig) { MyCustomConfig myConfig = (MyCustomConfig) config; if (getMyCustomProp() == null) { setMyCustomProp(myConfig.getMyCustomProp()); } }
If the given config
is extending another object, those
extensions should be resolved before it's used as a parameter to this
method.
config
- The object that this instance will be inheriting its
values from.java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.reflect.InvocationTargetException
processExtends(ModuleConfig, ActionConfig)
public void processExtends(ModuleConfig moduleConfig, ActionConfig actionConfig) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException
Inherit configuration information from the ExceptionConfig that this instance is extending. This method verifies that any exception config object that it inherits from has also had its processExtends() method called.
moduleConfig
- The ModuleConfig
that this config is from.actionConfig
- The ActionConfig
that this config is from,
if applicable. This must be null for global
forwards.java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.reflect.InvocationTargetException
inheritFrom(ExceptionConfig)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2000–2019 Apache Software Foundation. All rights reserved.