|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.sasl.aop.exception.handling.ServiceExceptionFirewallAspectConfigBean
public class ServiceExceptionFirewallAspectConfigBean
Configuration bean for the
ServiceExceptionFirewallAspect
. A configuration describes which properties
should be set with what kind of values in an object instance that was
instantiated by the
ServiceExceptionFirewallAspect
as a replacement for a throwed exception by a
target method.
Suppose the return types of all public methods of a service are derived from
a ResponseDTO which has got the following properties: boolean
wasSuccessfullyComputed, String resultCode, String resultCodeDetailMessage. A
configuration for the ResponseDTO might now look as the following:
className = packagepath.ResponseDTO
propertyNameValueMap = ("wasSuccessfullyComputed", false), ("resultCode",
"Internal Server Error")
errorDetailMessagePropertyName = "resultCodeDetailMessage"
Now a service method with return type ComplexResponseDTO (anyway derived from
ResponseDTO) throws an exception. The
ServiceExceptionFirewallAspect
will instantiate a new instance of
ComplexResponseDTO and assign the properties of ComplexResponseDTO the above
defined values. The errorDetailMessagePropertyName is a special property that
gets the string representation of the stack trace of the thrown exception
assigned if setted. The ComplexResponseDTO instance is than returned instead
of the thrown exception.
If there had been also a configuration for ComplexResponseDTO defined, than
it would have been used in the above scenario instead of the configuration
for ResponseDTO.
Constructor Summary | |
---|---|
ServiceExceptionFirewallAspectConfigBean()
|
Method Summary | |
---|---|
String |
getClassName()
Returns the full qualified class name to which this configuration belongs/should be applied. |
String |
getErrorDetailMessagePropertyName()
Returns the property name to which the ServiceExceptionFirewallAspect should assign the string representation
of the stack trace of a throwed exception. |
Map<String,Object> |
getPropertyNameValueMap()
Returns a map of (propertyName, propertyValue) mappings. |
void |
setClassName(String className)
Sets the full qualified class name to which this configuration belongs/should be applied. |
void |
setErrorDetailMessagePropertyName(String errorDetailMessagePropertyName)
Sets the (optional) property name to which the ServiceExceptionFirewallAspect should assign the string representation
of the stack trace of a throwed exception. |
void |
setPropertyNameValueMap(Map<String,Object> propertyNameValueMap)
Sets a map of (propertyName, propertyValue) mappings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceExceptionFirewallAspectConfigBean()
Method Detail |
---|
public String getClassName()
public void setClassName(String className)
className
- null or non nullpublic Map<String,Object> getPropertyNameValueMap()
getClassName()
will be assigned those property
values, if the object instance was instantiated by the
ServiceExceptionFirewallAspect
class.
public void setPropertyNameValueMap(Map<String,Object> propertyNameValueMap)
getClassName()
special property values, if the object instance
was instantiated by the
ServiceExceptionFirewallAspect
class as replacement for an exception.
Such a pair could be for example an executed flag (value=false) or a
result code (value=500 Internal Server Error).
propertyNameValueMap
- null or non nullpublic String getErrorDetailMessagePropertyName()
ServiceExceptionFirewallAspect
should assign the string representation
of the stack trace of a throwed exception.
public void setErrorDetailMessagePropertyName(String errorDetailMessagePropertyName)
ServiceExceptionFirewallAspect
should assign the string representation
of the stack trace of a throwed exception.
detailMessagePropertyName
- null or non null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |