Class DigesterRuleBase
- java.lang.Object
-
- org.apache.commons.digester3.Rule
-
- nl.nn.adapterframework.configuration.digester.DigesterRuleBase
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
ValidateAttributeRule
public abstract class DigesterRuleBase extends org.apache.commons.digester3.Rule implements org.springframework.context.ApplicationContextAware
- Author:
- Niels Meijer
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.Logger
log
-
Constructor Summary
Constructors Constructor Description DigesterRuleBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addGlobalWarning(String message)
Add a global message to the applicationprotected void
addLocalWarning(String msg)
Add a configuration warning message to the current configuration.protected void
addSuppressableWarning(String msg, SuppressKeys suppressionKey)
Add a warning message to the current configuration, unless the suppression key is supporessed in the configuration.void
begin(String uri, String elementName, Attributes attributes)
void
end(String namespace, String name)
protected Object
getBean()
protected Class<?>
getBeanClass()
protected ClassLoader
getClassLoader()
protected String
getObjectName()
Returns the name of the object.protected abstract void
handleAttribute(String name, String value, Map<String,String> attributes)
protected abstract void
handleBean()
protected String
resolveValue(String value)
void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
void
setApplicationWarnings(ApplicationWarnings applicationWarnings)
void
setConfigurationWarnings(ConfigurationWarnings configurationWarnings)
-
-
-
Method Detail
-
getObjectName
protected String getObjectName()
Returns the name of the object. In case a Spring proxy is being used, the name will be something like XsltPipe$$EnhancerBySpringCGLIB$$563e6b5d ClassUtils.getUserClass() makes sure the original class will be returned.
-
addLocalWarning
protected final void addLocalWarning(String msg)
Add a configuration warning message to the current configuration. Display location information conformIbisException
when the cause is aSAXParseException
.
-
addGlobalWarning
protected final void addGlobalWarning(String message)
Add a global message to the application
-
addSuppressableWarning
protected final void addSuppressableWarning(String msg, SuppressKeys suppressionKey)
Add a warning message to the current configuration, unless the suppression key is supporessed in the configuration.- Parameters:
msg
- Message to addsuppressionKey
-SuppressKeys
to check.
-
getClassLoader
protected final ClassLoader getClassLoader()
- Returns:
- an
IConfigurationClassLoader
.
-
getBean
protected Object getBean()
- Returns:
- the currently handled object, aka TOP object
-
getBeanClass
protected final Class<?> getBeanClass()
- Returns:
- the resolved class of the current object
-
resolveValue
protected final String resolveValue(String value)
- Parameters:
value
- or values to resolve- Returns:
- The resolved value(s) using the configuration AppConstants
-
begin
public final void begin(String uri, String elementName, Attributes attributes) throws Exception
- Overrides:
begin
in classorg.apache.commons.digester3.Rule
- Throws:
Exception
-
end
public void end(String namespace, String name) throws Exception
- Overrides:
end
in classorg.apache.commons.digester3.Rule
- Throws:
Exception
-
handleBean
protected abstract void handleBean()
-
handleAttribute
protected abstract void handleAttribute(String name, String value, Map<String,String> attributes) throws Exception
- Throws:
Exception
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-
setConfigurationWarnings
public void setConfigurationWarnings(ConfigurationWarnings configurationWarnings)
-
setApplicationWarnings
public void setApplicationWarnings(ApplicationWarnings applicationWarnings)
-
-