You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Torgeir Veimo <to...@pobox.com> on 2007/01/25 17:45:27 UTC

autocreated date property

Is it possible to specify in cnd notation a date property that is  
autocreated and set to the current date and time?

-- 
Torgeir Veimo
torgeir@pobox.com




Re: autocreated date property

Posted by Steven Huey <St...@sparta.com>.
Great explanation - thanks!

On Jan 25, 2007, at 4:49 PM, Peeter Piegaze wrote:

> On 1/25/07, Steven Huey <St...@sparta.com> wrote:
>> Then can someone explain what the CND notation for nt:hierarchyNode
>> does?
>>
>> http://wiki.apache.org/jackrabbit/nt%3ahierarchyNode
>>
>> [nt:hierarchyNode]
>> - jcr:created (DATE) autocreated protected INITIALIZE
>
> INITIALIZE is one of the possible values of the OnVersionParent
> attribute. It governs what happens to the property when its parent
> node is versioned. It does not indicate anything about how the
> property will be initialized upon creation.
>
> The only initialization controllable through CND (or through the node
> registration API of JR) is the setting of a static default value. In
> CND this is done with the equals sign:
>
> - my:property(string) = 'XYZ'
>
> However nt:hierarchyNode is a special case because it is a built-in
> node type that jackrabbit already knows about, and jackrabbit is free
> to initialize its properties on node creation any way it wants.
>
> For user-created node types, the application has to do the
> initialization, if it is more complex than a static default.
>
> Hope this helps,
> Peeter
>
>>
>> Thanks,
>> Steven Huey
>>
>> On Jan 25, 2007, at 12:26 PM, Peeter Piegaze wrote:
>>
>> > On 1/25/07, Torgeir Veimo <to...@pobox.com> wrote:
>> >> Is it possible to specify in cnd notation a date property that is
>> >> autocreated and set to the current date and time?
>> >
>> > No, this is not supported by cnd
>> >
>> >>
>> >> --
>> >> Torgeir Veimo
>> >> torgeir@pobox.com
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> > --
>> > Peeter Piegaze
>> >
>> > Day Software, Inc.
>> > 67 Mowat Avenue, Suite 331
>> > Toronto Ontario M6K 3E3
>> > Canada
>> >
>> > T +1 416 987 5720
>> > M +1 647 205 2403
>> > F +1 866 719 3988
>>
>> --
>>
>> Steven Huey, Corporate Web Architect
>> Email: Steven.Huey@sparta.com
>> Tel: (570) 233-0005
>>
>>
>>
>
>
> -- 
> Peeter Piegaze
>
> Day Software, Inc.
> 67 Mowat Avenue, Suite 331
> Toronto Ontario M6K 3E3
> Canada
>
> T +1 416 987 5720
> M +1 647 205 2403
> F +1 866 719 3988

--

Steven Huey, Corporate Web Architect
Email: Steven.Huey@sparta.com
Tel: (570) 233-0005



Re: autocreated date property

Posted by Torgeir Veimo <to...@pobox.com>.
On 25 Jan 2007, at 21:49, Peeter Piegaze wrote:

> On 1/25/07, Steven Huey <St...@sparta.com> wrote:
>> Then can someone explain what the CND notation for nt:hierarchyNode
>> does?
>>
>> http://wiki.apache.org/jackrabbit/nt%3ahierarchyNode
>>
>> [nt:hierarchyNode]
>> - jcr:created (DATE) autocreated protected INITIALIZE
>
> INITIALIZE is one of the possible values of the OnVersionParent
> attribute. It governs what happens to the property when its parent
> node is versioned. It does not indicate anything about how the
> property will be initialized upon creation.
>
> The only initialization controllable through CND (or through the node
> registration API of JR) is the setting of a static default value. In
> CND this is done with the equals sign:

Still, having an autocreated date property would be usefull.

One other property type which would be usefull would be one that  
guarrantees uniqueness among all properties of the same type/name,  
eg. when putting users into a jackrabbit repo and one wants to assign  
a unique UID.

-- 
Torgeir Veimo
torgeir@pobox.com




Re: autocreated date property

Posted by Peeter Piegaze <pe...@day.com>.
On 1/25/07, Steven Huey <St...@sparta.com> wrote:
> Then can someone explain what the CND notation for nt:hierarchyNode
> does?
>
> http://wiki.apache.org/jackrabbit/nt%3ahierarchyNode
>
> [nt:hierarchyNode]
> - jcr:created (DATE) autocreated protected INITIALIZE

INITIALIZE is one of the possible values of the OnVersionParent
attribute. It governs what happens to the property when its parent
node is versioned. It does not indicate anything about how the
property will be initialized upon creation.

The only initialization controllable through CND (or through the node
registration API of JR) is the setting of a static default value. In
CND this is done with the equals sign:

- my:property(string) = 'XYZ'

However nt:hierarchyNode is a special case because it is a built-in
node type that jackrabbit already knows about, and jackrabbit is free
to initialize its properties on node creation any way it wants.

For user-created node types, the application has to do the
initialization, if it is more complex than a static default.

Hope this helps,
Peeter

>
> Thanks,
> Steven Huey
>
> On Jan 25, 2007, at 12:26 PM, Peeter Piegaze wrote:
>
> > On 1/25/07, Torgeir Veimo <to...@pobox.com> wrote:
> >> Is it possible to specify in cnd notation a date property that is
> >> autocreated and set to the current date and time?
> >
> > No, this is not supported by cnd
> >
> >>
> >> --
> >> Torgeir Veimo
> >> torgeir@pobox.com
> >>
> >>
> >>
> >>
> >
> >
> > --
> > Peeter Piegaze
> >
> > Day Software, Inc.
> > 67 Mowat Avenue, Suite 331
> > Toronto Ontario M6K 3E3
> > Canada
> >
> > T +1 416 987 5720
> > M +1 647 205 2403
> > F +1 866 719 3988
>
> --
>
> Steven Huey, Corporate Web Architect
> Email: Steven.Huey@sparta.com
> Tel: (570) 233-0005
>
>
>


-- 
Peeter Piegaze

Day Software, Inc.
67 Mowat Avenue, Suite 331
Toronto Ontario M6K 3E3
Canada

T +1 416 987 5720
M +1 647 205 2403
F +1 866 719 3988

Re: autocreated date property

Posted by Steven Huey <St...@sparta.com>.
Then can someone explain what the CND notation for nt:hierarchyNode  
does?

http://wiki.apache.org/jackrabbit/nt%3ahierarchyNode

[nt:hierarchyNode]
- jcr:created (DATE) autocreated protected INITIALIZE

Thanks,
Steven Huey

On Jan 25, 2007, at 12:26 PM, Peeter Piegaze wrote:

> On 1/25/07, Torgeir Veimo <to...@pobox.com> wrote:
>> Is it possible to specify in cnd notation a date property that is
>> autocreated and set to the current date and time?
>
> No, this is not supported by cnd
>
>>
>> --
>> Torgeir Veimo
>> torgeir@pobox.com
>>
>>
>>
>>
>
>
> -- 
> Peeter Piegaze
>
> Day Software, Inc.
> 67 Mowat Avenue, Suite 331
> Toronto Ontario M6K 3E3
> Canada
>
> T +1 416 987 5720
> M +1 647 205 2403
> F +1 866 719 3988

--

Steven Huey, Corporate Web Architect
Email: Steven.Huey@sparta.com
Tel: (570) 233-0005



Re: autocreated date property

Posted by Peeter Piegaze <pe...@day.com>.
On 1/25/07, Torgeir Veimo <to...@pobox.com> wrote:
> Is it possible to specify in cnd notation a date property that is
> autocreated and set to the current date and time?

No, this is not supported by cnd

>
> --
> Torgeir Veimo
> torgeir@pobox.com
>
>
>
>


-- 
Peeter Piegaze

Day Software, Inc.
67 Mowat Avenue, Suite 331
Toronto Ontario M6K 3E3
Canada

T +1 416 987 5720
M +1 647 205 2403
F +1 866 719 3988