jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s1a2 <s1a2n3d4m5a...@yahoo.it>
Subject Re: jcr 2 mix:lifecycle
Date Fri, 05 Aug 2011 13:03:29 GMT
Hi all,

I'm stuck here with this topic.

I had defined these 2 NodeTypes, one as "lifecycle policy node"
(cpns:Stateslist) and one as "transition node" (cpns:State):

> nt:base, mix:referenceable
+ * (cpns:State) = cpns:State

> nt:base, mix:referenceable
- jcr:from (string)
- jcr:to (string)

Then, in the code, I've created them:

Node Stateslist = root.addNode("Stateslist", "cpns:Stateslist");

Node State1 = Stateslist.addNode("CREATED", "cpns:State");
State1.setProperty("jcr:from", "");
State1.setProperty("jcr:to", "RELEASED");

Node State2 = Stateslist.addNode("RELEASED", "cpns:State");
State2.setProperty("jcr:from", "RELEASED");
State2.setProperty("jcr:to", "");

and finally, I tried to assign the lifecycle policy to a new Node:

NodeImpl NodeWL=(NodeImpl)root.addNode("NodeWL");

NodeWL.assignLifecyclePolicy(StatesList, "CREATED");

String[] StatesAllowed=NodeWL.getAllowedLifecycleTransistions();

but at the end "StatesAllowed" is empty.

Can someone help me to understand what I'm doing wrong
or link me a page where I can find an example or documentation ?

Thanks in advance,

View this message in context: http://jackrabbit.510166.n4.nabble.com/jcr-2-mix-lifecycle-tp2216584p3721149.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message