We want to use these reserved properties (jcr:created, jcr:createdBy, etc.)
because they are autocompleted by the SlingPostServlet and we are always to
create content using the SlingPostServlet.

How can initalize the jcr:created with a long in a json?

thank you.



El 17 de marzo de 2009 12:19, Juan José Vázquez Delgado <
[email protected]> escribió:

> Hi Daniel,
>
> > The property isn't there
> >
> > ** Resource dumped by StreamRendererServlet**
> > Resource path:/content/mycontent
> > Resource metadata: {sling.resolutionPathInfo=,
> > sling.resolutionPath=/content/mycontent}
> >
> > ** Resource properties **
> > title: My content title
> > size:
> > sling:resourceType: gad/mycontent
> > jcr:primaryType: nt:unstructured
> > cr:lastModifiedBy:
> > jcr:createdBy:
> > jcr:lastModified:
> >
> > But the other properties (lastModified, lastModifiedBy and createdBy) are
> > there.
>
> The problem is that "jcr:" properties are connected  to his own
> nodetype. I mean, "jcr:created" is connected to "nt:hierarchyNode" [1]
> and the other ones are connected to "nt:resource" [2]. In the other
> hand, "jcr:created" and "jcr:lastModified" are dates, so you must
> initialize them with a long (milliseconds).
>
> If you want keep on using unstructured nodes yo are free to choose
> another name for the properties. Another option would be defining your
> own custom nodetype inheriting "nt:file" for instance. Have a look to
> this [3].
>
> Regards,
>
> Juanjo.
>
> [1] http://wiki.apache.org/jackrabbit/nt%3ahierarchyNode
> [2] http://wiki.apache.org/jackrabbit/nt%3aresource
> [3]
> http://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/resource/src/main/resources/SLING-INF/nodetypes
>

Reply via email to