/** * {@inheritDoc} */ @Override protected TaskManager createTaskManagerImpl(TaskConfiguration taskConfig) { String fileName; File file; boolean enableDateParsing; CompressionMethod compressionMethod; XmlChangeReader task; // Get the task arguments. fileName = getStringArgument( taskConfig, ARG_FILE_NAME, getDefaultStringArgument(taskConfig, DEFAULT_FILE_NAME) ); enableDateParsing = getBooleanArgument(taskConfig, ARG_ENABLE_DATE_PARSING, DEFAULT_ENABLE_DATE_PARSING); compressionMethod = getCompressionMethodArgument(taskConfig, fileName); // Create a file object from the file name provided. file = new File(fileName); // Build the task object. task = new XmlChangeReader(file, enableDateParsing, compressionMethod); return new RunnableChangeSourceManager(taskConfig.getId(), task, taskConfig.getPipeArgs()); } }
factoryMap.put("fast-read-xml", new FastXmlReaderFactory()); factoryMap.put("rx", new XmlReaderFactory()); factoryMap.put("read-xml-change", new XmlChangeReaderFactory()); factoryMap.put("upload-xml-change", new XmlChangeUploaderFactory()); factoryMap.put("rxc", new XmlChangeReaderFactory()); factoryMap.put("write-xml", new XmlWriterFactory()); factoryMap.put("wx", new XmlWriterFactory()); factoryMap.put("read-xml-change-0.6", new XmlChangeReaderFactory()); factoryMap.put("write-xml-0.6", new XmlWriterFactory()); factoryMap.put("write-xml-change-0.6", new XmlChangeWriterFactory());
factoryMap.put("fast-read-xml", new FastXmlReaderFactory()); factoryMap.put("rx", new XmlReaderFactory()); factoryMap.put("read-xml-change", new XmlChangeReaderFactory()); factoryMap.put("upload-xml-change", new XmlChangeUploaderFactory()); factoryMap.put("rxc", new XmlChangeReaderFactory()); factoryMap.put("write-xml", new XmlWriterFactory()); factoryMap.put("wx", new XmlWriterFactory()); factoryMap.put("read-xml-change-0.6", new XmlChangeReaderFactory()); factoryMap.put("write-xml-0.6", new XmlWriterFactory()); factoryMap.put("write-xml-change-0.6", new XmlChangeWriterFactory());
/** * {@inheritDoc} */ @Override protected TaskManager createTaskManagerImpl(TaskConfiguration taskConfig) { String fileName; File file; boolean enableDateParsing; CompressionMethod compressionMethod; XmlChangeReader task; // Get the task arguments. fileName = getStringArgument( taskConfig, ARG_FILE_NAME, getDefaultStringArgument(taskConfig, DEFAULT_FILE_NAME) ); enableDateParsing = getBooleanArgument(taskConfig, ARG_ENABLE_DATE_PARSING, DEFAULT_ENABLE_DATE_PARSING); compressionMethod = getCompressionMethodArgument(taskConfig, fileName); // Create a file object from the file name provided. file = new File(fileName); // Build the task object. task = new XmlChangeReader(file, enableDateParsing, compressionMethod); return new RunnableChangeSourceManager(taskConfig.getId(), task, taskConfig.getPipeArgs()); } }