jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland Porath" <rol...@exari.com>
Subject RE: properties on collections
Date Tue, 05 Feb 2008 23:01:49 GMT
Hi angela,



> -----Original Message-----
> From: Angela Schreiber [mailto:anchela@day.com]
> Sent: Tuesday, 5 February 2008 7:01 PM
> To: users@jackrabbit.apache.org
> Subject: Re: properties on collections
> 
> hi roland
> 
> Roland Porath wrote:
> > I am using jackrabbit as a webdav server.
> > Is it possible to set properties on collections
> > Whenever I try (with cadaver) it the only thing that happens is the
> > getlastmodified property is updated.
> > Apart from that no error message, no exceptions and the property I am
> trying
> > to set is not there.
> 
> i depends on the nodetypes you are using for the
> collections.
> by default it's nt:folder and this one has a single
> property definition inherited from nt:hierarchyNode
> which is autocreaeted and protected (jcr:created).
> no other properties are allowed.

I did patch the builtin-nodetypes.xml. 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>
        <propertyDefinition name="jcr:created" requiredType="Date"
autoCreated="true" mandatory="false" onParentVersion="INITIALIZE"
protected="true" multiple="false"/>
        <propertyDefinition name="*" requiredType="undefined"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="true"/>
        <propertyDefinition name="*" requiredType="undefined"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false"/>
    </nodeType>

I am aware that patching builtin-nodetypes.xml is a really dirty hack and
bad karma and I'll probably have to spend a couple of incarnations as a
cockroach for doing it but I am only talking POC here.
I believe this hack should allow me to put properties on a folder but no
luck so far.
I've made a couple of other changes in the xml (versioning related) and that
worked just nicely

What do you think

roland
> 
> if you want to set properties with your collections
> you have to change that default. you may create
> your own manager and/or you own handlers.
> 
> angela
> 
> !DSPAM:47a8177b79603938512089!



Mime
View raw message