Commit dce2a127 authored by Rasko Leinonen's avatar Rasko Leinonen

Merged getReportFile in WebinCli into getManifestReportFile in WebinCliExecutor.

parent 376025c0
......@@ -607,16 +607,6 @@ public class WebinCli {
}
}
// Directory creation.
static File
getReportFile(File dir, String filename, String suffix) {
if (dir == null || !dir.isDirectory())
throw WebinCliException.systemError(WebinCliMessage.CLI_INVALID_REPORT_DIR_ERROR.format(filename));
return new File(dir, Paths.get(filename).getFileName().toString() + suffix);
}
public static File
createOutputDir(File outputDir, String... dirs) throws WebinCliException {
if (outputDir == null) {
......
......@@ -228,11 +228,17 @@ WebinCliExecutor<M extends Manifest, R extends ValidationResponse>
return Paths.get(getValidationDir().getPath()).resolve(REPORT_FILE).toFile();
}
public File
getManifestReportFile( )
{
File manifestFile = getParameters().getManifestFile();
return WebinCli.getReportFile( this.validationDir, manifestFile.getName(), WebinCliConfig.REPORT_FILE_SUFFIX );
public File getManifestReportFile() {
File manifestFile = getParameters().getManifestFile();
if (this.validationDir == null || !this.validationDir.isDirectory()) {
throw WebinCliException.systemError(
WebinCliMessage.CLI_INVALID_REPORT_DIR_ERROR.format(manifestFile.getName()));
}
return new File(
this.validationDir,
Paths.get(manifestFile.getName()).getFileName().toString()
+ WebinCliConfig.REPORT_FILE_SUFFIX);
}
public WebinCliParameters
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment