package journal.filter; import journal.action.Action; import journal.action.BaseAction; import journal.reader.DataJournalEntry; import journal.reader.TransactionJournalEntry; public abstract class BaseFilter extends BaseAction implements Filter { @Override public void setAction(Action action) { nextAction = action; } @Override public String[] parseArgs(String[] args) { return nextAction.parseArgs(args); } @Override public void start() throws Exception { nextAction.start(); } @Override public void help() { nextAction.help(); } @Override public void finish() throws Exception { nextAction.finish(); } @Override public void putValue(DataJournalEntry entry) throws Exception { nextAction.putValue(entry); } @Override public void replaceValue(DataJournalEntry entry) throws Exception { nextAction.replaceValue(entry); } @Override public void deleteValue(DataJournalEntry entry) throws Exception { nextAction.deleteValue(entry); } @Override public void verifyValue(DataJournalEntry entry) throws Exception { nextAction.verifyValue(entry); } @Override public void commitMarker(TransactionJournalEntry entry) throws Exception { nextAction.commitMarker(entry); } @Override public void flushMarker(TransactionJournalEntry entry) throws Exception { nextAction.flushMarker(entry); } protected Action nextAction; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 24773 | Norman Morse |
Moving journalReader from sven's private branch to perforce_software. This is because journalReader is used in the perfsplit test harness, and should be updated over time. Merging //guest/sven_erik_knop/java/JournalReader/... to //guest/perforce_software/journalReader/... |
||
//guest/sven_erik_knop/java/JournalReader/src/journal/filter/BaseFilter.java | |||||
#2 | 8299 | Sven Erik Knop | Updated missing Filters with new JournalEntry policy. | ||
#1 | 8024 | Sven Erik Knop | Refactoring: moved the filter into their own package | ||
//guest/sven_erik_knop/java/JournalReader/src/journal/action/BaseFilter.java | |||||
#3 | 8023 | Sven Erik Knop |
Complete rewrite of the configuration file, now based on an ini-file format. The ini file has a general [reader] section for settings like verbose, outputFile, case-sensitivity and so on. It also allows to set up a range of Actions and Filters. The section name here is the fully classified class name, followed by settings for the particular actions. An example will make this clearer: ================================================================ [reader] verbose=true [journal.action.UserRenamer] fileName=user.txt patch=True outputFile=user.out [journal.action.ClientRenamer] fileName=client.txt outputFile=client.out patch=true ================================================================ I will provide more example set-ups in the near future. Filters are classes implementing journal.action.Filter (soon to be journal.filter.Filter) which can be chained together and are all executed before the actions. Actions are applied in order that they are given in the config file. |
||
#2 | 8021 | Sven Erik Knop |
Add compound action, which contains a list of actions that will all be invoked on a JournalEntry. Needs refactoring of the way Options are processed, which will come in a later change. |
||
#1 | 7527 | Sven Erik Knop |
JournalReader, now in its proper place. Documentation to follow. |