package journal.action; import java.io.PrintStream; import journal.reader.JournalEntry; import journal.reader.Options; public abstract class BaseAction implements Action { public void start(Options o) throws Exception { this.options = o; this.out = o.getOutputStream(); } public void help() { } public void finish() throws Exception { // empty implementation } public String[] parseArgs(String[] args) { return args; } public void putValue(JournalEntry entry) throws Exception { // empty implementation } public void replaceValue(JournalEntry entry) throws Exception { // empty implementation } public void deleteValue(JournalEntry entry) throws Exception { // empty implementation } public void verifyValue(JournalEntry entry) throws Exception { // empty implementation } public void commitMarker(JournalEntry entry) throws Exception { // empty implementation } public void flushMarker(JournalEntry entry) throws Exception { // empty implementation } public void journalMarker(JournalEntry entry) throws Exception { // empty implementation } protected PrintStream out; protected Options options; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#7 | 8296 | Sven Erik Knop |
Clean-up: instead of casting in every action, cast only once in the dispatcher. Should make code saner and safer. No functional change. |
||
#6 | 8200 | Sven Erik Knop |
JournalReader can now process delete records (@dl@). Also fixed processing of type 12 note records = journaldbchecksum |
||
#5 | 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. |
||
#4 | 8020 | Sven Erik Knop | Replace public Option attributes with setters and getters. | ||
#3 | 8016 | Sven Erik Knop | In the middle of refactoring the Renamer classes into the BaseRenamer. | ||
#2 | 7874 | Sven Erik Knop | Upgrade to 2010.2 including new JournalNotes. | ||
#1 | 7527 | Sven Erik Knop |
JournalReader, now in its proper place. Documentation to follow. |