public class TemplateManager extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Logger |
logger |
protected static String |
PROPS_EXT |
protected static String |
XML_EXT |
| Constructor and Description |
|---|
TemplateManager() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkFile(String name)
Returns true if file doesn't exist.
|
void |
create(Map<String,?> properties)
Produce template files.
|
static void |
create(String name,
String propertiesFile)
Creates an ETL template using a specified template manager name and properties file.
|
protected String |
defineName()
Defines base name for ETL.
|
static TemplateManager |
forName(String name)
Loads a specified by name.
|
protected String |
loadResourceAsString(String resourcePath)
Loads specifed classpath resource into a string.
|
protected Writer |
newFileWriter(String fileName)
Template factory method for writers.
|
protected static final String XML_EXT
protected static final String PROPS_EXT
protected final Logger logger
public void create(Map<String,?> properties) throws IOException
properties - configuration properties.IOException - if output fails.protected String loadResourceAsString(String resourcePath) throws IOException
resourcePath - path to resource.IOException - if IO error occurs.protected String defineName()
protected Writer newFileWriter(String fileName) throws IOException
IOExceptionprotected boolean checkFile(String name)
name - file name.public static void create(String name, String propertiesFile) throws IOException
name - etl template name.propertiesFile - configuration properties file.IOException - if I/O error occurs.public static TemplateManager forName(String name)
name - template name. Cannot be null.Copyright © 2006-2012. All Rights Reserved.