Angela Schreiber wrote:

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.

not having a guaranteed node type for the root node, i can't specify one in the <collection/> section of the resource config. the one defined by jackrabbit isn't good enough, since i want cosmo to remain as portable as possible to other jcr implementations.

also, i do not want to take the opposite route and specify every nodetype that is not a collection, because that could theoretically be a huge and arbitrarily growing list of node types.

i understand your point about the root node potentially being interpreted as a non-collection, but in practice i can't imagine why somebody would do that. i think the common case should be the one defaulted to by the code, and the corner case (treating the root node as a non-collection) should be the one that requires additional configuration.

regardless of that, can you suggest another way to have the root node treated as a collection?

for reference, here is my resource config:

<config>
  <iomanager>
    <class name="org.osaf.cosmo.io.CosmoIOManager"/>
  </iomanager>
  <collection>
    <nodetypes>
      <nodetype>nt:folder</nodetype>
    </nodetypes>
  </collection>
  <filter>
<class name="org.apache.jackrabbit.webdav.simple.DefaultResourceFilter"/>
    <namespaces>
      <prefix>rep</prefix>
      <prefix>jcr</prefix>
      <prefix>icalendar</prefix>
      <prefix>ticket</prefix>
      <prefix>xml</prefix>
    </namespaces>
  </filter>
</config>

Reply via email to