Methods Summary |
---|
public static ContractReportPlainTextFormat | createContractReport(RentalContractDTO aRentalContractDTO)printContractReport
ContractReportPlainTextFormat aContractReportPlainTextFormat
= new ContractReportPlainTextFormat( aRentalContractDTO );
return aContractReportPlainTextFormat;
|
public static OverdueRentalReportPlainTextFormat | createOverdueRentalReport(OverdueRentalDTO aOverdueRentalDTO)
OverdueRentalReportPlainTextFormat aOverdueRentalReportPlainTextFormat
= new OverdueRentalReportPlainTextFormat( aOverdueRentalDTO );
return aOverdueRentalReportPlainTextFormat;
|
private static java.lang.String | getFilename()
Configuration configuration = Configuration.getInstance();
ReportConfiguration rc = configuration.getReportConfiguration();
return rc.printFilename;
|
public static void | printReport(ReportPlainTextFormat aReportPlainTextFormat)
FileWriter output = null;
try
{
output = new FileWriter( PRINTER_FILENAME );
}
catch ( IOException exception )
{
throw new PrinterFailureDeviation( ERROR_CANNOT_OPEN_PRINTER + " " +
PRINTER_FILENAME +
exception.getMessage() );
}
try
{
output.write( aReportPlainTextFormat.getReportString() );
}
catch ( IOException exception )
{
throw new PrinterFailureDeviation( ERROR_CANNOT_WRITE_TO_PRINTER +
exception.getMessage() );
}
finally
{
try
{
output.close();
}
catch ( IOException exception )
{
throw new PrinterFailureDeviation( ERROR_CANNOT_CLOSE_PRINTER +
exception.getMessage() );
}
}
|