Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lenya Wiki" for change 
notification.

The following page has been changed by AndreasHartmann:
http://wiki.apache.org/lenya/JcrContentModelAreas

New page:
== Areas (Authoring, Staging, Live) ==

This section refers to areas as abstract concepts, not necessarily modeled as 
separated content areas.

Requirements:

 * independent from each other (changes to /authoring/foo don't influence 
staging/foo)
 * self-contained

Options:

=== Workspaces ===

Advantages:

 * Physically separated nodes with same UUID possible ("corresponding nodes" 
concept)
 * Separated, independent
 * Self-contained

Issues:

 * Changing the site structure requires to remove the involved nodes from all 
non-authoring areas (like now)
 * Copying access control definitions?
 * {{{Node.update(workspace)}}} copies the subtree:
  * either nodes must be kept in a flat structure (no hierarchy)
  * or nodes and properties must be copied manually
  * or use referenceable child nodes

{{{
/de
  /foo < mix:referenceable
    /lenya:document < mix:referenceable
      /jcr:content = "Hello"
    /bar
}}}

Publish single node:

{{{
getItem("/de/foo/lenya:document").update("staging");
}}}

Publish subtree:

{{{
getItem("/de/foo").update("staging");
}}}

=== Separated Areas in a Single Workspace ===

Advantages:

 * Simple access

Issues:

 * Copying access control definitions required
 * Different UUIDs:
  * Either rewrite links
  * Or don't use JCR UUIDs but custom String properties for UUIDs

=== Separated Areas in a Single Node ===

Example:

{{{
  /foo
    /lenya:authoring
      /jcr:content = "Hello"
    /lenya:staging
      /jcr:content = "Hello"
    /lenya:live
      /jcr:content = "Hello"
    /bar
      /lenya:authoring
      /…
}}}

Advantages:

 * Simple
 * Site structure can be changed without removing staged or published content

Issues:

 * Areas not self-contained
 * No direct URI-to-path mapping possible
 * Changes to site structure would be visible in all areas immediately

=== Labelled Versions ===

 * Issues:
  * All changes applied immediately, without calling {{{Session.save()}}}
  * Access control to version history?

Submit:

{{{
VersionHistory history = node.getVersionHistory();
Version base = node.getBaseVersion();
boolean move = true;
history.addVersionLabel(base.getName(), "staging", move);
}}}

Obtaining live version:

{{{
VersionHistory history = node.getVersionHistory();
Node liveVersion = history.getVersionByLabel("live");
Node liveNode = liveVersion.getChild("jcr:frozenNode");
}}}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to