@Initialize public void initialize() throws IllegalAccessException, InstantiationException { parserFactory = parserFactoryClass.newInstance(); Configurator.configure(parserFactory, config, appContext); }
@Initialize public void initialize() { initKeyMap(); doKeyReplacement = !keyMap.isEmpty(); doKeyWhitspaceReplacement = keyWhitspaceReplacement != null; doPrefixOnNumericKey = keyPrefixOnNumeric != null; doIllegalElementNameCharReplacement = illegalElementNameCharReplacement != null; }
@Initialize public void initialize() throws SmooksConfigurationException { if(parentRelIndex >= 0) { throw new SmooksConfigurationException("param 'parentRelIndex' value must be negative. Value is '" + parentRelIndex + "'."); } }
/** * Initialize the visitor instance. */ @Initialize public void initialize() { targetAttribute = config.getTargetAttribute(); }
@Initialize public void setExportsInAppContext() { Exports.setExportsInApplicationContext(applicationContext, this); }
@Initialize public void init() { int prefixQualifier = qName.indexOf(':'); if(prefixQualifier != -1) { localPart = qName.substring(prefixQualifier + 1); // Default the namespace to xmlns if undefined and the prefix is "xmlns"... if(namespace == null && qName.substring(0, prefixQualifier).equals(XMLConstants.XMLNS_ATTRIBUTE)) { namespace = XMLConstants.XMLNS_ATTRIBUTE_NS_URI; } } else { localPart = qName; // Default the namespace to xmlns if undefined and the localPart is "xmlns"... if(namespace == null && localPart.equals(XMLConstants.XMLNS_ATTRIBUTE)) { namespace = XMLConstants.XMLNS_ATTRIBUTE_NS_URI; } } }
@Initialize public final void buildRecordMetaData() { vfRecordMetaData = new VariableFieldRecordMetaData(recordElementName, fields); }
@Initialize public void initialize() { buildFields(); }
@Initialize public void initialize() { buildFields(); }
@Initialize public void intialize() { xstreamReader = new SaxWriter(includeEnclosingDocument); }
@Initialize public void initialize() { objectStore = new ApplicationContextObjectStore(appContext); }
@Initialize public void initialize() { beanIDSet = CollectionsUtil.toSet(beanIDs); }
/** * Set the resource configuration on the bean populator. * @throws SmooksConfigurationException Incorrectly configured resource. */ @Initialize public void initialize() throws SmooksConfigurationException { isAttribute = (valueAttributeName != null); beanId = appContext.getBeanIdStore().register(beanIdName); if(logger.isDebugEnabled()) { logger.debug("Value Binder created for [" + beanIdName + "]."); } }
@Initialize public void initialize() throws IOException { String templateText = StreamUtils.readStreamAsString(getClass().getResourceAsStream("ScriptedGroovy.ftl")); classTemplate = new FreeMarkerTemplate(templateText); }
@Initialize public void preRegBeanIds() { for(String preRegBeanId : mapBeans) { mapBeanIds.add(applicationContext.getBeanIdStore().register(preRegBeanId)); } }
@Initialize public void intitialize() { if(datasourceJndi == null) { datasourceJndi = name; } datasource = (DataSource) lookup(datasourceJndi); if(transactionManagerType == TransactionManagerType.JTA) { if(transactionJndi == null || transactionJndi.length() == 0) { throw new SmooksConfigurationException("The transactionJndi attribute must be set when the JTA transaction manager is set."); } //On JTA transaction manager then the autoCommit is always false autoCommit = false; } }
@Initialize public void init() { if(elementQName != null) { int nsPrefixIdx = elementQName.indexOf(":"); if(nsPrefixIdx != -1) { elementNamespacePrefix = elementQName.substring(0, nsPrefixIdx); elementName = elementQName.substring(nsPrefixIdx + 1); if(elementNamespacePrefix.equals(XMLConstants.XMLNS_ATTRIBUTE) && elementNamespace == null) { elementNamespace = XMLConstants.XMLNS_ATTRIBUTE_NS_URI; } } else { elementName = elementQName; if(elementName.equals(XMLConstants.XMLNS_ATTRIBUTE) && elementNamespace == null) { elementNamespace = XMLConstants.XMLNS_ATTRIBUTE_NS_URI; } } } List<Parameter> attributeDataParams = resourceConfig.getParameters(ATTRIBUTE_DATA); if(attributeDataParams != null && !attributeDataParams.isEmpty()) { extractAttributeData(attributeDataParams); } }
/** * Load the namespace prefix-to-uri mappings into the {@link ApplicationContext}. */ @Initialize public void loadNamespaces() { Properties namespaces = getMappings(appContext); Properties namespacesToAdd = config.toProperties(); if(logger.isDebugEnabled()) { logger.debug("Adding namespace prefix-to-uri mappings: " + namespacesToAdd); } namespaces.putAll(namespacesToAdd); setMappings(namespaces, appContext); }
@Initialize public void addToExportsInApplicationContext() { initExtractSet(); Exports.addExport(applicationContext, this); }
@Initialize public void initialize() throws SmooksConfigurationException { beanId = applicationContext.getBeanIdStore().getBeanId(beanIdName); }