]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
NOJIRA Added comments about future directions for two IDGenerators.
authorAron Roberts <aron@socrates.berkeley.edu>
Sun, 21 Jun 2009 15:56:21 +0000 (15:56 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Sun, 21 Jun 2009 15:56:21 +0000 (15:56 +0000)
sandbox/aron/id/src/main/java/org/collectionspace/services/id/AlphabeticIDGenerator.java
sandbox/aron/id/src/main/java/org/collectionspace/services/id/YearIDGenerator.java

index cd7f105ce4b7a32548e3c1003d63aec32a288d46..cf35682dfb3c6523a1743e5c3a5a448a13958f2f 100644 (file)
  */
 
 // @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,
index 0e09bf4ec13b0d1b0d565b8b3855af147f031669..b8c41f9303b106105ff66a6e96e6823bc4e62bf5 100644 (file)
@@ -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;
   }