ContainerResourceLocator resLocator = applicationContext.getResourceLocator();
ContainerResourceLocator resLocator = applicationContext.getResourceLocator();
ContainerResourceLocator resLocator = applicationContext.getResourceLocator();
ContainerResourceLocator resLocator = applicationContext.getResourceLocator();
@Initialize public void intialize() { String trimmedTemplateConfig = templateConfig.trim(); // Only attempt to load as a template resource URI if the configured 'template' // value is all on one line. If it has line breaks then we know it's not an // external resource... if(trimmedTemplateConfig.trim().indexOf('\n') == -1) { try { InputStream templateStream = appContext.getResourceLocator().getResource(trimmedTemplateConfig); if(templateStream != null) { templateConfig = StreamUtils.readStreamAsString(templateStream); } } catch (IOException e) { logger.debug("'template' configuration value '" + trimmedTemplateConfig + "' does not resolve to an external FreeMarker template. Using configured value as the actual template."); } } // Create the template instance... template = new FreeMarkerTemplate(templateConfig); }
@Initialize public void intialize() { String trimmedTemplateConfig = templateConfig.trim(); // Only attempt to load as a template resource URI if the configured 'template' // value is all on one line. If it has line breaks then we know it's not an // external resource... if(trimmedTemplateConfig.trim().indexOf('\n') == -1) { try { InputStream templateStream = appContext.getResourceLocator().getResource(trimmedTemplateConfig); if(templateStream != null) { templateConfig = StreamUtils.readStreamAsString(templateStream); } } catch (IOException e) { logger.debug("'template' configuration value '" + trimmedTemplateConfig + "' does not resolve to an external FreeMarker template. Using configured value as the actual template."); } } // Create the template instance... template = new FreeMarkerTemplate(templateConfig); }
@Initialize public void intialize() { String trimmedTemplateConfig = templateConfig.trim(); // Only attempt to load as a template resource URI if the configured 'template' // value is all on one line. If it has line breaks then we know it's not an // external resource... if(trimmedTemplateConfig.trim().indexOf('\n') == -1) { try { InputStream templateStream = appContext.getResourceLocator().getResource(trimmedTemplateConfig); if(templateStream != null) { templateConfig = StreamUtils.readStreamAsString(templateStream); } } catch (IOException e) { logger.debug("'template' configuration value '" + trimmedTemplateConfig + "' does not resolve to an external FreeMarker template. Using configured value as the actual template."); } } // Create the template instance... template = new FreeMarkerTemplate(templateConfig); }
@Override public void parse(InputSource unedifactInterchange) throws IOException, SAXException { ignoreNewLines(ignoreNewLines); ignoreEmptyNodes(ignoreEmptyNodes); validate(validate); // Default Mappings Registry is already set to LazyMappingsRegistry // only if mappingModel is defined we should set another instance if (!StringUtils.isEmpty(mappingModel)) { setMappingsRegistry(new DefaultMappingsRegistry(mappingModel, applicationContext.getResourceLocator().getBaseURI())); } super.parse(unedifactInterchange); }
@Override public void parse(InputSource unedifactInterchange) throws IOException, SAXException { ignoreNewLines(ignoreNewLines); ignoreEmptyNodes(ignoreEmptyNodes); validate(validate); // Default Mappings Registry is already set to LazyMappingsRegistry // only if mappingModel is defined we should set another instance if (!StringUtils.isEmpty(mappingModel)) { setMappingsRegistry(new DefaultMappingsRegistry(mappingModel, applicationContext.getResourceLocator().getBaseURI())); } super.parse(unedifactInterchange); }
if(edifactModel == null) { try { ContainerResourceLocator resourceLocator = applicationContext.getResourceLocator();
if(edifactModel == null) { try { ContainerResourceLocator resourceLocator = applicationContext.getResourceLocator();