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