You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by mi...@apache.org on 2005/11/20 23:03:25 UTC

svn commit: r345783 - /lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/rc/RevisionController.java

Author: michi
Date: Sun Nov 20 14:03:21 2005
New Revision: 345783

URL: http://svn.apache.org/viewcvs?rev=345783&view=rev
Log:
advanced methods such that document root dirs will be configurable commented

Modified:
    lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/rc/RevisionController.java

Modified: lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/rc/RevisionController.java
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/rc/RevisionController.java?rev=345783&r1=345782&r2=345783&view=diff
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/rc/RevisionController.java (original)
+++ lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/rc/RevisionController.java Sun Nov 20 14:03:21 2005
@@ -109,9 +109,11 @@
      * @throws IOException if an error occurs
      * @throws Exception if an error occurs
      */
+/*
     public RCML getRCML(Document doc) throws FileNotFoundException, IOException, Exception {
         return new RCML(rcmlDir, doc.getDocumentAreaPath(), rootDir);
     }
+*/
 
     /**
      * @deprecated please use getRCML(Document doc)
@@ -137,6 +139,7 @@
      * @return File File to check out
      * @throws Exception if an error occurs
      */
+/*
     public File reservedCheckOut(Document doc, String identity) throws Exception {
 
         RCML rcml = new RCML(rcmlDir, doc.getDocumentAreaPath(), rootDir);
@@ -162,6 +165,7 @@
 
         return doc.getFile();
     }
+*/
 
     /**
      * @deprecated reservedCheckOut(Document, String)
@@ -212,6 +216,7 @@
      * @return A boolean value.
      * @throws Exception when something went wrong.
      */
+/*
     public boolean canCheckOut(Document doc, String identity) throws Exception {
                 
         RCML rcml = new RCML(rcmlDir, doc.getDocumentAreaPath(), rootDir);
@@ -232,6 +237,7 @@
 
         return !checkedOutByOther;
     }
+*/
 
     /**
      * @deprecated please use canCheckOut(Document, String)
@@ -275,6 +281,7 @@
      *            because it is already checked out by someone other ...)
      * @exception Exception if other problems occur
      */
+/*
     public long reservedCheckIn(Document doc, String identity, boolean backup)
         throws FileReservedCheckInException, Exception {
         
@@ -291,26 +298,6 @@
         // rules inside this if clause:
         //
         if (!((coe == null) || identity.equals(RevisionController.systemUsername))) {
-            /*
-             * Possible cases and rules:
-             *
-             * 1.) we were able to read the latest checkin and it is later than latest checkout
-             *     (i.e. there is no open checkout to match this checkin, an unusual case)
-             *     1.1.) identity of latest checkin is equal to current user
-             *           -> checkin allowed, same user may check in repeatedly
-             *     1.2.) identity of latest checkin is not equal to current user
-             *           -> checkin rejected, may not overwrite the revision which
-             *              another user checked in previously
-             * 2.) there was no checkin or the latest checkout is later than latest checkin
-             *     (i.e. there is an open checkout)
-             *     2.1.) identity of latest checkout is equal to current user
-             *           -> checkin allowed, user checked out and may check in again
-             *              (the most common case)
-             *     2.2.) identity of latest checkout is not equal to current user
-             *           -> checkin rejected, may not check in while another
-             *              user is working on this document
-             *
-             */
             if ((cie != null) && (cie.getTime() > coe.getTime())) {
                 // We have case 1
                 if (!cie.getIdentity().equals(identity)) {
@@ -369,6 +356,7 @@
         // 					     "reservedCheckIn");
         return time;
     }
+*/
 
     /**
      * @deprecated please use reservedCheckIn(Document, String, boolean)
@@ -501,10 +489,12 @@
      *
      * @return File The file of the backup version
      */
+/*
     public File getBackupFile(long time, Document doc) {        
         File backup = new File(backupDir, doc.getDocumentAreaPath() + ".bak." + time);
         return backup;
     }
+*/
 
     /**
      * @deprecated getBackupFile(long, Document)
@@ -536,6 +526,7 @@
      * @exception FileNotFoundException if a file couldn't be found
      * @exception Exception if another problem occurs
      */
+/*
     public long rollback(Document doc, String identity, boolean backupFlag, long time)
         throws
             FileReservedCheckInException,
@@ -582,6 +573,7 @@
 
         return newtime;
     }
+*/
 
     /**
      * @deprecated please use rollback(Document, String, boolean, long)
@@ -689,6 +681,7 @@
      * @param filename of the document
      * @throws RevisionControlException when somthing went wrong
      */
+/*
     public void deleteRevisions(Document doc) throws RevisionControlException{
         try {
             RCML rcml = this.getRCML(doc);
@@ -713,6 +706,7 @@
             throw new RevisionControlException(e);
 		}
     }
+*/
 
     /**
      * @deprecated please use deleteRevisions(Document)
@@ -750,6 +744,7 @@
      * @param filename of the document
      * @throws RevisionControlException if something went wrong
      */
+/*
     public void deleteRCML(Document doc) throws RevisionControlException{
         try {
             RCML rcml = this.getRCML(doc);
@@ -761,6 +756,7 @@
             throw new RevisionControlException(e);
         }
     }
+*/
     
     /**
      * @deprecated please use deleteRCML(Document)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org