Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 46657 invoked from network); 12 Aug 2010 23:36:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Aug 2010 23:36:40 -0000 Received: (qmail 21748 invoked by uid 500); 12 Aug 2010 23:36:39 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 21724 invoked by uid 500); 12 Aug 2010 23:36:39 -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 21717 invoked by uid 99); 12 Aug 2010 23:36:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Aug 2010 23:36:38 +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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Aug 2010 23:36:38 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7CNaI5M003642 for ; Thu, 12 Aug 2010 23:36:18 GMT Message-ID: <3768899.317251281656178419.JavaMail.jira@thor> Date: Thu, 12 Aug 2010 19:36:18 -0400 (EDT) From: =?utf-8?Q?Michael_D=C3=BCrig_=28JIRA=29?= To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCR-2714) Selective disabling of checks in ItemValidator In-Reply-To: <25525002.317231281656177944.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-2714?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Michael D=C3=BCrig updated JCR-2714: ------------------------------- Attachment: JCR-2714.patch Aforementioned patch > Selective disabling of checks in ItemValidator > ---------------------------------------------- > > Key: JCR-2714 > URL: https://issues.apache.org/jira/browse/JCR-2714 > Project: Jackrabbit Content Repository > Issue Type: Improvement > Components: jackrabbit-core > Affects Versions: 2.2.0 > Reporter: Michael D=C3=BCrig > Assignee: Michael D=C3=BCrig > Attachments: JCR-2714.patch > > > I would like to be able to selectively disable checks in ItemValidator in= the scope of an operation performed through methods of the SessionState cl= ass. Doing so would provide simple means for internally modifying (for exam= ple) protected items. Currently such modifications must be done 'manually' = on the item state level. This approach is very error prone and not very DRY= . > With my upcoming patch in place, setting a protected property would look = like this: > final Node parent =3D ... > final Value value =3D ... > SessionState sessionState =3D sessionContext.getSessionState(); > Property property =3D sessionState.performUnchecked(new SessionOperation<= Property>() { > public Property perform(SessionContext context) throws RepositoryExce= ption { > return parent.setProperty("foo", value); > } > }, ItemValidator.CHECK_CONSTRAINTS); > That is, users need to have access to the session context in order to dis= able checks which makes this only usable from inside Jackrabbit.=20 --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.