use of nl.nn.adapterframework.configuration.filters.OnlyActiveFilter in project iaf by ibissource.
the class ConfigurationDigester method parseAndResolveEntitiesAndProperties.
/**
* Performs an Identity-transform, which resolves entities with content from files found on the ClassPath.
* Resolve all non-attribute properties
*/
public void parseAndResolveEntitiesAndProperties(ContentHandler digester, Configuration configuration, Resource resource, Properties appConstants) throws IOException, SAXException, TransformerConfigurationException {
ContentHandler handler;
XmlWriter loadedHiddenWriter = new XmlWriter();
handler = new PrettyPrintFilter(loadedHiddenWriter);
handler = new AttributePropertyResolver(handler, appConstants, getPropsToHide(appConstants));
handler = new XmlTee(digester, handler);
handler = getStub4TesttoolContentHandler(handler, appConstants);
handler = getConfigurationCanonicalizer(handler);
handler = new OnlyActiveFilter(handler, appConstants);
handler = new ElementPropertyResolver(handler, appConstants);
XmlWriter originalConfigWriter = new XmlWriter();
handler = new XmlTee(handler, originalConfigWriter);
XmlUtils.parseXml(resource, handler);
configuration.setOriginalConfiguration(originalConfigWriter.toString());
configuration.setLoadedConfiguration(loadedHiddenWriter.toString());
}
use of nl.nn.adapterframework.configuration.filters.OnlyActiveFilter in project iaf by ibissource.
the class OnlyActiveFilterTest method testToWriter.
public void testToWriter(String source, String expected) throws Exception {
StringWriter target = new StringWriter();
XmlWriter xmlWriter = new XmlWriter(target);
OnlyActiveFilter filter = new OnlyActiveFilter(xmlWriter);
XmlUtils.parseXml(source, filter);
String actual = new String(target.toString());
assertEquals(expected, actual);
}
Aggregations