directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r675975 - /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java
Date Fri, 11 Jul 2008 14:57:09 GMT
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 )



Mime
View raw message