Hi,

Am Freitag, den 04.04.2008, 10:17 -0700 schrieb Tobias Bocanegra:
> >  while working with Sing I noticed that nodes declaring mixin node type
> > mix:versionable are not checked in when the initial content is loaded.
> >
> >  This is somehow unexpected to me and can lead to some trouble if you rely
> > on versioning. I propose to change this so that versionable nodes will be
> > checked in when initial content is loaded. First I started thinking about an
> > additional property in the content definition, but this is maybe a bit ugly
> > as it results in content definitions that mix real content with information
> > how to handle it.
> >
> >  Thus I changed the Loader implementation. it now checks in all versionable
> > nodes at the end of the content loading process. For that you need to add
> > mix:versionable explicitly in the content definition file. It is not enough
> > to declare a primary node type that defines mix:versionable, which in my
> > implementation leads to the same results as before.

Not knowing your exact changes, but couldn't this be checked by doing a
Node.isNodeType("mix:versionable") after creating and filling the node ?
This would yield the correct information on all nodes, regardless of
whether they were created explicitly or implicitly to be
mix:versionable.

> >
> >  If the team agrees with the proposed changes, I will add an according JIRA
> > issue and patch.
> i'm not sure if this is correct. is your requirement that the initial
> content already has a version or that the nodes are checked-in ?
> 
> i think it really depends on the application that needs the content if
> it should be checked in or not.

I think it is a question of what the "normal" state of versionable nodes
is: Is it checked in or is it checked out. I agree with Toby, that only
the application could decide on that.

If therefore, we have applications, where it matters that versionable
nodes are normally checked in and only be checked out for modification,
I think the loader should support such default state handling.

I could imaging adding a flag to the initial content definition header
which exactly says that:

    <Sling-Initial-Content>
          path;checkin=flag
    </Sling-Initial-Content>

Where flag may be true - checkin versionable nodes - or false - don't
care about versionable nodes - and defaults to false.

WDYT ?

Regards
Felix

Reply via email to