Property values seem to support constraints: http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/index.html
... DATE: min and max are dates specifying the allowed date range. The date strings must be in the ISO8601-compliant format: YYYY-MM-DDThh:mm:ss.sssTZD ... This seems to somewhat resolve the issue but using property constraints would mean changing the node/property -type if I want to change the constraints... -- vdox ________________________________ From: Dok Sander <[email protected]> To: "[email protected]" <[email protected]> Sent: Monday, July 9, 2012 6:46 PM Subject: SQL -like triggers in JCR Hello, I'm working on a project that uses JCR and needs to perform some actions on node add to evaluate the node's validity(This would be something like: Check if this node's property date is within the required date range). Using SQL I would do this by using triggers or foreign key constraints but I have to yet to find a corresponding feature in JCR. I was first rooting for jcr.observation(And more precisely Jackrabbit SynchronousEventListener) but it seems that the listener is not supposed to write to the repo(At least not on the same session) and it wouldn't help anyway since I need a way to _cancel_ the node add operation. I could of course override NodeImpl, do the required validation on addNode and then call super.addNode, or perhaps do some checking on AccessManager. Still, it feels like this functionality something that's missing in JCR. Am I working against the specification here or have I just not found the corresponding features :) ? -- vdox
