01: package liquibase.dbdoc;
02:
03: import liquibase.change.Change;
04: import liquibase.database.Database;
05: import liquibase.exception.DatabaseHistoryException;
06: import liquibase.exception.JDBCException;
07:
08: import java.io.File;
09: import java.io.FileWriter;
10: import java.io.IOException;
11: import java.util.List;
12:
13: public class RecentChangesWriter extends HTMLWriter {
14:
15: public RecentChangesWriter(File rootOutputDir, Database database) {
16: super (new File(rootOutputDir, "recent"), database);
17: }
18:
19: protected String createTitle(Object object) {
20: return "Recent Changes";
21: }
22:
23: protected void writeBody(FileWriter fileWriter, Object object,
24: List<Change> ranChanges, List<Change> changesToRun)
25: throws IOException, DatabaseHistoryException, JDBCException {
26: writeCustomHTML(fileWriter, object, ranChanges, database);
27: writeChanges("Most Recent Changes", fileWriter, ranChanges);
28: }
29:
30: protected void writeCustomHTML(FileWriter fileWriter,
31: Object object, List<Change> changes, Database database)
32: throws IOException {
33: }
34: }
|