jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: svn commit: r354818 - /incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/ResourceConfig.java
Date Tue, 13 Dec 2005 08:55:06 GMT
hi brian

>> i'm not seeing in the jcr spec where the node type of the root node is 
>> defined. if that's defined in the spec and i just missed it, let me 
>> know so that i can add it to the list of collection node types in my 
>> resource config.

the spec states:

"Which NodeType [i.e. Primary NodeType] is returned when this method
[i.e. getPrimaryNodeType()] is called on the root node of a workspace is 
up to the implementation, though the returned type must, of course, be 
consistent with the child nodes and properties of the root node."

The jackrabbit reference implementation of the JSR170 api defines
a separate internal nodetype for the root node: "rep:root"

since the specification does not define a particular nodetype
for the root node, it would be totally legal (though questionable)
to write an implemenation that defines the root node to be
nt:base or nt:file. and likewise its legal to add a mixin to
the root node... e.g. a special mixin type ("mix:NeverDavCollection").

My point is: having a configuration that defines the resourcetype
from a given dav-resource by a nodes nodetype (this could even be
a mixin that was added to the node), then this rule should be
applied for the root node as well. if i add my "mix:NeverDavCollection"
mixin type to the root node and try to circument with an extra
if-statement, that this results in a single non-collection resource
at the root level, then i'm going to hide my own, incomplete nodetype
design (or strange usage of the resourceconfig) behind a hardcoded 
statement in the code.

could you please elaborate, what exactly made you struggle with
a ResourceConfiguration, that does not have the hardcoded check
for the root collection? your checkin states what you did (which
is obvious from the diff) and not why.


View raw message