From: Aron Roberts Date: Sun, 21 Jun 2009 15:56:21 +0000 (+0000) Subject: NOJIRA Added comments about future directions for two IDGenerators. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=1cc5413ac330dd0f21401c98c362191d288ce027;p=tmp%2Fjakarta-migration.git NOJIRA Added comments about future directions for two IDGenerators. --- diff --git a/sandbox/aron/id/src/main/java/org/collectionspace/services/id/AlphabeticIDGenerator.java b/sandbox/aron/id/src/main/java/org/collectionspace/services/id/AlphabeticIDGenerator.java index cd7f105ce..cf35682df 100644 --- a/sandbox/aron/id/src/main/java/org/collectionspace/services/id/AlphabeticIDGenerator.java +++ b/sandbox/aron/id/src/main/java/org/collectionspace/services/id/AlphabeticIDGenerator.java @@ -23,6 +23,15 @@ */ // @TODO: Add Javadoc comments + +// @TODO: This still has dependencies on code and algorithms from +// Apache Commons ID; we'll need to remove those, which will give us +// more flexibility, most likely by: +// * Switching to a Vector of chars, which will allow us to automatically +// (and optionally) expand the number of chars returned. +// * Introducing flexibility, through configuration, in the series of +// characters through which this generator cycles, rather than hard-coding +// specific characters in the USASCII character set. // @TODO: The initial value determines the fixed number of characters. // We may also need to model cases where the number of characters @@ -102,6 +111,7 @@ public class AlphabeticIDGenerator implements IDGenerator { } + // @TODO: This is still failing; we'll address this through as larger refactoring. public synchronized void reset() { try { // TODO: Investigate using different methods to perform this copying, diff --git a/sandbox/aron/id/src/main/java/org/collectionspace/services/id/YearIDGenerator.java b/sandbox/aron/id/src/main/java/org/collectionspace/services/id/YearIDGenerator.java index 0e09bf4ec..b8c41f930 100644 --- a/sandbox/aron/id/src/main/java/org/collectionspace/services/id/YearIDGenerator.java +++ b/sandbox/aron/id/src/main/java/org/collectionspace/services/id/YearIDGenerator.java @@ -69,6 +69,11 @@ public class YearIDGenerator implements IDGenerator { return this.currentValue; } + // @TODO: We'll need to decide what a "next" ID means in the context of: + // * An initially supplied value. + // * A year value that has not changed from its previous value. + // * A year value that has changed, as a result of a rollover + // to a new instant in time. public synchronized String getNextID() { return this.currentValue; }