Andreas Hartmann wrote:

Michael Wechner wrote:

Hi

Is it possible that the following method returns false within the Blog
publication, because no node is being added when a Blog entry is being created?

  public boolean exists() {
       try {
           return this.node.exists();
       } catch (TransactionException e) {
           throw new RuntimeException(e);
       }


Actually a node should be created ...

Would you mind filing a bug with a description how to reproduce it?


the problem was that node.exists() is coupled to the fact that there
is some data attached. I have started to implement the traversable interface
and updated the following files:

M      src/java/org/apache/lenya/cms/repository/Node.java
M      src/java/org/apache/lenya/cms/repository/SourceNode.java
M      src/java/org/apache/lenya/cms/cocoon/source/RepositorySource.java
M      src/webapp/lenya/pubs/blog/sitemap.xmap

One change to discuss and further consider is

if (source.exists() && !source.isCollection()) {

within

src/java/org/apache/lenya/cms/repository/SourceNode.java

because this seems to me rather FS specifc.

In the case of JCR every node can be a "collection" and arbitrary
properties can be attached to a node, where one property could for instance
be the content of a document. To know what property is the content one
uses nodetypes and property names.

I had to get used to this, but I have to admit that it makes a lot of sense
and it seems to me that it would be good if Lenya could reflect that.

But please don't worry, I won't sneak in JCR, but just try to finish
the lightweight "repository" layer such that it can be used generally within Lenya.

Michi



-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
[EMAIL PROTECTED]                        [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to