String pageDescription, int tableColumns, int maxRowsPerPage) {
encoding = "UTF8";
// validations
if(outputDirectory == null) {
throw new DataUtilException("The outputDirectory field can not be a null value");
}
if(!outputDirectory.exists()) {
throw new DataUtilException("The output directory must exist: " + outputDirectory.getAbsolutePath());
}
if(filenamePrefix == null) {
throw new DataUtilException("The filenamePrefix field can not be a null value");
}
if(filenamePrefix.length() < 1) {
throw new DataUtilException("The filenamePrefix field must contain at least one character");
}
if(pageTitle == null) {
pageTitle = "";
}
if(tableColumns < 1) {
throw new DataUtilException("You must have at least one column. Invalid column value: " + tableColumns);
}
this.tableColumns = tableColumns;
this.outputDirectory = outputDirectory;
this.filenamePrefix = filenamePrefix;