public abstract class AbstractTestDocGenerator extends Object implements TestDocGenerator
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log
Logger
|
protected String |
outputFile |
protected String |
srcDirectory |
protected String |
testDocTemplate |
Constructor and Description |
---|
AbstractTestDocGenerator(String outputFile,
String testDocTemplate)
Default constructor using template name.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
doBody(OutputStream buffered)
Generates the test documentation.
|
abstract void |
doHeader(OutputStream buffered)
Generates the test documentation.
|
void |
generateDoc()
Generates the test documentation.
|
protected DocumentBuilder |
getDocumentBuilder()
Gets a document builder instance properly configured.
|
protected FileOutputStream |
getFileOutputStream(String fileName)
Creates a output file out put stream with given file name.
|
static String |
getOutputDirectory()
Gets the outputDirectory.
|
String |
getOutputFile() |
String |
getSrcDirectory() |
protected abstract Properties |
getTestDocProperties()
Gets the test doc properties.
|
protected List<File> |
getTestFiles()
Gets all test files from test directory.
|
protected Transformer |
getTransformer(String fileName,
String mediaType,
String method)
Gets a transformer with proper configuration.
|
void |
setOutputFile(String outputFile) |
void |
setSrcDirectory(String srcDirectory) |
protected org.slf4j.Logger log
protected String srcDirectory
protected String testDocTemplate
protected String outputFile
public void generateDoc()
generateDoc
in interface TestDocGenerator
protected FileOutputStream getFileOutputStream(String fileName) throws IOException
IOException
public abstract void doBody(OutputStream buffered) throws TransformerException, IOException, SAXException
public abstract void doHeader(OutputStream buffered) throws TransformerException, IOException, SAXException
protected abstract Properties getTestDocProperties()
protected List<File> getTestFiles() throws IOException
IOException
protected DocumentBuilder getDocumentBuilder()
protected Transformer getTransformer(String fileName, String mediaType, String method)
fileName
- public void setSrcDirectory(String srcDirectory)
srcDirectory
- the srcDirectory to setpublic String getSrcDirectory()
public void setOutputFile(String outputFile)
outputFile
- the outputFile to setpublic String getOutputFile()
public static String getOutputDirectory()
Copyright © 2008–2017 ConSol Software GmbH. All rights reserved.