[Bedework-commit] webdav r168 - trunk/server/src/edu/rpi/cct/webdav/servlet/shared

svnadmin at bedework.org svnadmin at bedework.org
Tue Mar 31 10:55:12 EDT 2009


Author: douglm
Date: 2009-03-31 10:55:11 -0400 (Tue, 31 Mar 2009)
New Revision: 168

Modified:
   trunk/server/src/edu/rpi/cct/webdav/servlet/shared/WdEntity.java
   trunk/server/src/edu/rpi/cct/webdav/servlet/shared/WebdavNsNode.java
Log:
Big refactoring change - no functional difference (intended)

Another step towards making the CalDAV server a separate project with no bedework dependencies. This change removes most references to bedework event and resource objects and replaces them with ClaDAV classes which act as wrappers.

Some definitions have been moved into the rpiutil package to make them global.

Remaining is the filter code which has many bedework dependencies and date and time code which uses bedework timezone code.

Modified: trunk/server/src/edu/rpi/cct/webdav/servlet/shared/WdEntity.java
===================================================================
--- trunk/server/src/edu/rpi/cct/webdav/servlet/shared/WdEntity.java	2009-03-29 04:50:03 UTC (rev 167)
+++ trunk/server/src/edu/rpi/cct/webdav/servlet/shared/WdEntity.java	2009-03-31 14:55:11 UTC (rev 168)
@@ -61,6 +61,13 @@
    */
   private int sequence;
 
+  /** UTC datetime */
+  private String prevLastmod;
+
+  /** Ensure uniqueness - lastmod only down to second.
+   */
+  private int prevSequence;
+
   private String description;
 
   /** Constructor
@@ -235,6 +242,41 @@
     return sequence;
   }
 
+  /** Prev lastmod is the saved lastmod before any changes.
+   *
+   * @param val
+   * @throws WebdavException
+   */
+  public void setPrevLastmod(String val) throws WebdavException {
+    prevLastmod = val;
+  }
+
+  /**
+   * @return String lastmod
+   * @throws WebdavException
+   */
+  public String getPrevLastmod() throws WebdavException {
+    return prevLastmod;
+  }
+
+  /** Set the sequence
+   *
+   * @param val    sequence number
+   * @throws WebdavException
+   */
+  public void setPrevSequence(int val) throws WebdavException {
+    prevSequence = val;
+  }
+
+  /** Get the sequence
+   *
+   * @return int    the sequence
+   * @throws WebdavException
+   */
+  public int getPrevSequence() throws WebdavException {
+    return prevSequence;
+  }
+
   /** Set the description
    *
    * @param val    String description
@@ -262,6 +304,14 @@
   }
 
   /**
+   * @return a value to be used for etags or ctags
+   * @throws WebdavException
+   */
+  public String getPrevTagValue() throws WebdavException {
+    return getPrevLastmod() + "-" + getPrevSequence();
+  }
+
+  /**
    * @param sb
    */
   public void toStringSegment(StringBuilder sb) {

Modified: trunk/server/src/edu/rpi/cct/webdav/servlet/shared/WebdavNsNode.java
===================================================================
--- trunk/server/src/edu/rpi/cct/webdav/servlet/shared/WebdavNsNode.java	2009-03-29 04:50:03 UTC (rev 167)
+++ trunk/server/src/edu/rpi/cct/webdav/servlet/shared/WebdavNsNode.java	2009-03-31 14:55:11 UTC (rev 168)
@@ -404,7 +404,7 @@
    * @return Collection
    * @throws WebdavException
    */
-  public abstract Collection getChildren() throws WebdavException;
+  public abstract Collection<? extends WdEntity> getChildren() throws WebdavException;
 
   /**
    * @return String



More information about the Bedework-commit mailing list