Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 29525 invoked from network); 29 Jul 2009 12:26:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Jul 2009 12:26:37 -0000 Received: (qmail 77388 invoked by uid 500); 29 Jul 2009 12:26:37 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 77304 invoked by uid 500); 29 Jul 2009 12:26:37 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 77296 invoked by uid 99); 29 Jul 2009 12:26:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jul 2009 12:26:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jul 2009 12:26:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id F12EF234C051 for ; Wed, 29 Jul 2009 05:26:14 -0700 (PDT) Message-ID: <1634124141.1248870374987.JavaMail.jira@brutus> Date: Wed, 29 Jul 2009 05:26:14 -0700 (PDT) From: "Alexander Klimetschek (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-2233) JSR-283: mix:created/mix:lastModified - auto-set but allow modification for imports In-Reply-To: <1071389417.1248867014785.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-2233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736602#action_12736602 ] Alexander Klimetschek commented on JCR-2233: -------------------------------------------- > regarding a) > no, the jcr:created was defined protected before and should stay this way. Ok, but it was only defined protected for nt:file and nt:version. I am only talking about the mix:created mixin and only nt:file inherits from it (nt:file -> nt:hierarchyNode -> mix:created). Couldn't we make mix:created non-protected and override the jcr:created property definition in nt:file to be protected to ensure backwards compatibility? Looks ugly, but enhances compatibility and consistency (if we do c below). > session or workspace imports already respect this and (re)set the values correctly. According to JCR-2195 protected properties are currently skipped completely. And I was also thinking of custom "imports" that use the normal Node/Property write methods. > regarding c) > as a simple implementation, i suggest to update the jcr:lastModified(By) properties if a significant > modification is performed on the node (but not it's sub tree) and the property was not modified transiently. Subtree modification handling would be cool, but it would require a traversal up to the root node on each node/property add/remove/modify to find parents with a mix:lastModified mixin. This wouldn't be difficult, but could slow down things (!?). > it is to define what is considered as a significant modification. > most probably: >- add/remove child node (includes move/copy underneath) >- add/remove/update properties ack > - add/remove mixins, change primary type not sure... it's a change of the "schema", not the content > most probably not: >- versioning operations >- locking operations >- move (the node itself) >- copy (the node itself) ack > JSR-283: mix:created/mix:lastModified - auto-set but allow modification for imports > ----------------------------------------------------------------------------------- > > Key: JCR-2233 > URL: https://issues.apache.org/jira/browse/JCR-2233 > Project: Jackrabbit Content Repository > Issue Type: Improvement > Components: jackrabbit-core, JCR 2.0 > Reporter: Alexander Klimetschek > Priority: Minor > Fix For: 2.0.0 > > > Following the discussion in JCR-2116, I propose it would be a good idea to have jcr:created, jcr:createdBy (from mix:created) and jcr:lastModified, jcr:lastModifiedBy (mix:lastModified) not protected, but still automatically set those properties in case they were not modified by the client. > Three advantages: > a) This allows for importing content with these properties, where eg. the jcr:created should point to the original creation date of the content, not when it was imported. > b) Same for jcr:lastModified, which often must be set manually for ensuring correct behaviour when doing synchronizations etc. > c) In order to take advantage of the automatically-set behaviour mentioned in the spec, it would be nice if the repository would set them in the case the client is not writing those properties. This way you can ensure the properties are correctly set when you cannot control all client-code modifying the content (eg. webdav). > Question: would this be in line with the spec? I would say, yes, since we say we don't implement "protected", which is allowed, but add a hybrid approach (which is not explicitly forbidden, IIUC). > For the reference, here is the definition from the latest JSR-283 doc: > [mix:lastModified] mixin > - jcr:lastModified (DATE) autocreated protected? OPV? > - jcr:lastModifiedBy (STRING) autocreated protected? OPV? > [mix:created] mixin > - jcr:created (DATE) autocreated protected? OPV? > - jcr:createdBy (STRING) autocreated protected? OPV? > And here is the current cnd definition in JR 2.0: > http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.cnd?view=co -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.