Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 48565 invoked from network); 21 Jun 2005 00:50:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jun 2005 00:50:41 -0000 Received: (qmail 53626 invoked by uid 500); 21 Jun 2005 00:50:40 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 53613 invoked by uid 99); 21 Jun 2005 00:50:40 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2005 17:50:40 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of bcm@osafoundation.org designates 204.152.186.98 as permitted sender) Received: from [204.152.186.98] (HELO smtp.osafoundation.org) (204.152.186.98) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2005 17:50:42 -0700 Received: from localhost (localhost [127.0.0.1]) by smtp.osafoundation.org (Postfix) with ESMTP id 3614B14227C for ; Mon, 20 Jun 2005 17:47:01 -0700 (PDT) Received: from smtp.osafoundation.org ([127.0.0.1]) by localhost (laweleka.osafoundation.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32190-04 for ; Mon, 20 Jun 2005 17:47:01 -0700 (PDT) Received: from [10.0.1.4] (c-67-188-209-63.hsd1.ca.comcast.net [67.188.209.63]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.osafoundation.org (Postfix) with ESMTP id DACE914227B for ; Mon, 20 Jun 2005 17:47:00 -0700 (PDT) Message-ID: <42B7645E.4020806@osafoundation.org> Date: Mon, 20 Jun 2005 17:50:38 -0700 From: Brian Moseley User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: jackrabbit-dev@incubator.apache.org Subject: default value for initializing date property Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new and clamav at osafoundation.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N i'm using this code to define a property: InternalValue[] defaultValues1 = { InternalValue.create(Calendar.getInstance()) }; PropDefImpl createdDef = new PropDefImpl(); createdDef.setName(new QName(URI_TICKET, "created")); createdDef.setRequiredType(PropertyType.DATE); createdDef.setAutoCreated(true); createdDef.setDefaultValues(defaultValues1); createdDef.setMandatory(true); createdDef.setOnParentVersion(OnParentVersionAction.INITIALIZE); createdDef.setProtected(true); createdDef.setMultiple(false); createdDef.setDeclaringNodeType(ticketDef.getName()); with this code, the declaring node type definition successfully registers. however, looking at custom_nodetypes.xml, the default value is being set to the moment in time that i execute the above code to register the node type ("2005-06-20T17:43:47.364-07:00"). this makes a kind of sense, but it's not what i want. how can i define the property such that the property's value is set to the time when the node is created, not when the node type is registered? this is exactly how jcr:created behaves, isn't it?