Hi Kiran,

Can you comment on why you think these two new fields are needed?  Not disagreeing with you just curious what you're thinking here.

Thanks,
Alex

On Fri, Jul 11, 2008 at 10:57 AM, <kayyagari@apache.org> wrote:
Author: kayyagari
Date: Fri Jul 11 07:57:09 2008
New Revision: 675975

URL: http://svn.apache.org/viewvc?rev=675975&view=rev
Log:
added two new attributes tagDate and revisionDate

Modified:
   directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java?rev=675975&r1=675974&r2=675975&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java Fri Jul 11 07:57:09 2008
@@ -20,6 +20,9 @@
 package org.apache.directory.server.core.changelog;


+import java.util.Date;
+
+
 /**
 * A tag on a revision representing a snapshot of the directory server's
 * state.
@@ -29,18 +32,44 @@
 */
 public class Tag
 {
-    /*
-     * TODO should we have date in which tag was taken
-     * TODO should we have the date of the revision that was tagged
-     */
+
    private final long revision;
    private final String description;
-
-
+
+    /** the date on which this tag was created*/
+    private Date tagDate;
+
+    /** the date of revision that was tagged*/
+    private Date revisionDate;
+
+
    public Tag( long revision, String description )
    {
        this.revision = revision;
        this.description = description;
+        this.tagDate = new Date();
+    }
+
+
+    public Tag( long revision, String description, Date tagDate, Date revisionDate )
+    {
+        this.revision = revision;
+        this.description = description;
+        this.tagDate = tagDate;
+        this.revisionDate = revisionDate;
+    }
+
+
+    public Tag( long revision, String description, long tagTime, long revisionTime )
+    {
+        this.revision = revision;
+        this.description = description;
+        this.tagDate = new Date( tagTime );
+
+        if( revisionTime > 0 )
+        {
+            this.revisionDate = new Date( revisionTime );
+        }
    }


@@ -62,6 +91,18 @@
    }


+    public Date getTagDate()
+    {
+        return tagDate;
+    }
+
+
+    public Date getRevisionDate()
+    {
+        return revisionDate;
+    }
+
+
    public boolean equals( Object other )
    {
        if ( other instanceof Tag )





--
Microsoft gives you Windows, Linux gives you the whole house ...