@ConfigParam(defaultVal = "false")
private boolean isTemplate;
public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException {
SmooksResourceConfiguration config = new SmooksResourceConfiguration();
ExtensionContext extensionContext = ExtensionContext.getExtensionContext(executionContext);
config.setExtendedConfigNS(element.getNamespaceURI());
config.setResource(resource);
// Set the defaults...
if(extensionContext.getDefaultSelector() != null) {
config.setSelector(extensionContext.getDefaultSelector());
}
config.setSelectorNamespaceURI(extensionContext.getDefaultNamespace());
String targetProfile = DomUtils.getAttributeValue(element, PARAMETER_TARGET_PROFILE);
if(targetProfile == null) {
targetProfile = extensionContext.getDefaultProfile();
}
config.setTargetProfile(targetProfile);
config.setConditionEvaluator(extensionContext.getDefaultConditionEvaluator());
if(isTemplate) {
extensionContext.addResourceTemplate(config);
} else {
extensionContext.addResource(config);