3 Replies Latest reply on Dec 13, 2012 2:48 PM by u005078

    Where to store a custom-defined property for a nt:file node?

    u005078 Level 1

      Hello,

       

      I have to scan external pathes and to load files to CRX. To avoid loading already loaded files again I want to maintain the MD5 checksum of those files somehwhere in the node. The file becomes subject for beein loaded again if it is changed. We have the following structure: Top of tree is a "sling:OrderedFolder", for each filename we have a nt:file-Node and the content is stored to the associated jcr:content.

      There is no property left for storing a custom-defined property "sourceFileChecksum". I tried to use "nt:unstructured" instead of "nt:file" for the file-node; but the webapplication didn't find the content any more then. I tried to add a "nt:unstructured" subnode (named "metadata") to the file-node, but this fails with message "javax.jcr.nodetype.ConstraintViolationException: no matching child node definition found for {}metadata".

      So I'm left a little bit confused. Right now I've no idea how to handle this. Any suggestions are welcome.

       

      Ulrich