You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2005/04/12 15:17:15 UTC
svn commit: r161048 -
lenya/trunk/src/java/org/apache/lenya/cms/repository/SourceNode.java
Author: andreas
Date: Tue Apr 12 06:17:13 2005
New Revision: 161048
URL: http://svn.apache.org/viewcvs?view=rev&rev=161048
Log:
using revision controller to determine if source node is checked out
Modified:
lenya/trunk/src/java/org/apache/lenya/cms/repository/SourceNode.java
Modified: lenya/trunk/src/java/org/apache/lenya/cms/repository/SourceNode.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/repository/SourceNode.java?view=diff&r1=161047&r2=161048
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/repository/SourceNode.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/repository/SourceNode.java Tue Apr 12 06:17:13 2005
@@ -105,19 +105,22 @@
String userName = getUserId();
boolean newVersion = this.identityMap.getUnitOfWork().isDirty(this);
getRevisionController().reservedCheckIn(getRCPath(), userName, true, newVersion);
- this.isCheckedOut = false;
} catch (Exception e) {
throw new TransactionException(e);
}
}
- private boolean isCheckedOut = false;
-
/**
* @see org.apache.lenya.transaction.Transactionable#isCheckedOut()
*/
public boolean isCheckedOut() throws TransactionException {
- return isCheckedOut;
+ try {
+ return getRevisionController().isCheckedOut(getRCPath());
+ } catch (TransactionException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new TransactionException(e);
+ }
}
/**
@@ -127,7 +130,6 @@
if (!isCheckedOut()) {
try {
getRevisionController().reservedCheckOut(getRCPath(), getUserId());
- this.isCheckedOut = true;
} catch (Exception e) {
throw new TransactionException(e);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org