svn commit: r730621 - /lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNode.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Thu Jan  1 14:34:29 2009
New Revision: 730621

URL: http://svn.apache.org/viewvc?rev=730621&view=rev
Log:
SourceNode.exists(): use last check-in entry to avoid conflicts with other methods (fixes issues when requesting meta data of non-checked-in nodes).

Modified:
    lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNode.java

Modified: lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNode.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNode.java?rev=730621&r1=730620&r2=730621&view=diff
==============================================================================
--- lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNode.java (original)
+++ lenya/trunk/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNode.java Thu Jan  1 14:34:29 2009
@@ -393,7 +393,11 @@
     }
 
     public boolean exists() throws RepositoryException {
-        return this.contentSource.exists();
+        try {
+            return getRcml().getLatestCheckInEntry() != null;
+        } catch (RevisionControlException e) {
+            throw new RepositoryException(e);
+        }
     }
 
     public OutputStream getOutputStream() throws RepositoryException {
@@ -417,6 +421,8 @@
             else {
                 throw new RepositoryException("The node [" + this + "] hasn't been checked in yet.");
             }
+        } catch (RepositoryException e) {
+            throw e;
         } catch (RevisionControlException e) {
             throw new RepositoryException(e);
         }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.