jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: properties on collections
Date Wed, 06 Feb 2008 08:16:47 GMT
hi roland

> I did patch the builtin-nodetypes.xml. 

see below

> It looks like this.
>     <nodeType name="nt:hierarchyNode" isMixin="false"
> hasOrderableChildNodes="false" primaryItemName="">
>         <supertypes>
>  			<!-- EXARI_PATCH_2 accept any kind of property -->
>            <supertype>nt:base</supertype>
>             <!--supertype>nt:unstructured</supertype-->
> 			<!-- END EXARI_PATCH_2 accept any kind of property
> -->
>         </supertypes>

you don't allow any kind of properties as long as
the nt:unstructured is commented... right?

> I am aware that patching builtin-nodetypes.xml is a really dirty hack 

sure :) you should rather create your own derived nodetype
in the custom_nodetypes.xml (don't remember the exact name).

> [...] but I am only talking POC here.

ok. only talking POC...
i depends on your needs. what is the nature of the
expected child-nodes (i.e. your dav-resources).

instead of making the collection nt:unstructured (you
loose the forced nodetype of the children) you may
simply create a nodetype that defines an extra
propertydefinition saying:
* (residual, any name allowed) UNDEFINED (any type allowed) default
type is String (most reasonable) 
multivalue,mandatory,protected,autocreated all false.

but... as said: it depends on your needs. you have to
evaluate that before... a think about default primary
type (that reigns how/if addNode without nt-name will
behave) and primary item....

> I believe this hack should allow me to put properties on a folder but no
> luck so far.

see above (in case you really have the nt:unstructured commented).
the nt:base is just a 'marker nodetype'. it doesn't define
any child item definitions.

> I've made a couple of other changes in the xml (versioning related) and that
> worked just nicely

why?
i wouldn't do that. webdav is a protocol. it shouldn't
define how the repository has to look like.

> What do you think

don't blame the cockroaches ;)
angela

Mime
View raw message