Package scriptella.tools.template
Class TemplateManager
java.lang.Object
scriptella.tools.template.TemplateManager
- Direct Known Subclasses:
DataMigrator
ETL files template manager.
- Version:
- 1.0
- Author:
- Fyodor Kupolov
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanReturns true if file doesn't exist.static voidCreates an ETL template using a specified template manager name and properties file.voidProduce template files.protected StringDefines base name for ETL.static TemplateManagerLoads a specified by name.protected StringloadResourceAsString(String resourcePath) Loads specifed classpath resource into a string.protected WriternewFileWriter(String fileName) Template factory method for writers.
-
Field Details
-
XML_EXT
- See Also:
-
PROPS_EXT
- See Also:
-
logger
-
-
Constructor Details
-
TemplateManager
public TemplateManager()
-
-
Method Details
-
create
Produce template files.- Parameters:
properties- configuration properties.- Throws:
IOException- if output fails.
-
loadResourceAsString
Loads specifed classpath resource into a string.- Parameters:
resourcePath- path to resource.- Returns:
- loaded resource.
- Throws:
IOException- if IO error occurs.
-
defineName
Defines base name for ETL. -
newFileWriter
Template factory method for writers.- Throws:
IOException
-
checkFile
Returns true if file doesn't exist.- Parameters:
name- file name.
-
create
Creates an ETL template using a specified template manager name and properties file.- Parameters:
name- etl template name.propertiesFile- configuration properties file.- Throws:
IOException- if I/O error occurs.
-
forName
Loads a specified by name.- Parameters:
name- template name. Cannot be null.- Returns:
- loaded template manager.
-