1 | |
package liquibase.changelog.visitor; |
2 | |
|
3 | |
import liquibase.changelog.ChangeSet; |
4 | |
import liquibase.changelog.DatabaseChangeLog; |
5 | |
import liquibase.database.Database; |
6 | |
import liquibase.exception.LiquibaseException; |
7 | |
|
8 | |
import java.util.ArrayList; |
9 | |
import java.util.List; |
10 | |
|
11 | 0 | public class ListVisitor implements ChangeSetVisitor { |
12 | |
|
13 | 0 | private List<ChangeSet> seenChangeSets = new ArrayList<ChangeSet>(); |
14 | |
|
15 | |
public List<ChangeSet> getSeenChangeSets() { |
16 | 0 | return seenChangeSets; |
17 | |
} |
18 | |
|
19 | |
public Direction getDirection() { |
20 | 0 | return ChangeSetVisitor.Direction.FORWARD; |
21 | |
} |
22 | |
|
23 | |
public void visit(ChangeSet changeSet, DatabaseChangeLog databaseChangeLog, Database database) |
24 | |
throws LiquibaseException { |
25 | 0 | seenChangeSets.add(changeSet); |
26 | 0 | } |
27 | |
} |