On 10/04/2017 09:11, Marco Piovesana wrote: > Hi all, > I'm trying to migrate data from an external system to Oak preserving the > creation date of each element. I tried to set the JCR:creationDate but that > is not allowed since the property is protected.
No. You can't modify/create the `jcr:created`. What you can do is creating a custom property though. If you want you could even create a custom namespace. > I saw that the ImportContentHandler has methods to push SAX events in the > repository. Is that the only way to import content? Since my data is inside > another system would be easier for me to create directly the objects with > java instead of generating an XML first. It really depends what you want to do. You can use the importer, vlt packages and maybe something else. However it really depends on your migration strategy. If you prefer to use the java API you can and as you stated it may be actually easier if your current persistent does not allow any export already. Just remember that is better to use the JCR API (oak-jcr) rather than the Oak API as the latter are quite low level and you risk to miss quite some things (index updates, acl checks, ...). HTH Davide
