> > Another thing to be aware of when playing with rule: If you change the
> > rule to include every node you want to activate, it will be activated in
> > one chunk. 
> 
> This is not so clear.
> I had a look to *DataActivateAllCommand*: here and also on 
> BaseDataAllCommand is written that activation will be launched for each 
> node retrieved by the query.
> 
> My structure is:
> 
> [] 2009 <dataFolder>
>     [] 09 <dataFolder>
>        [] 20 <dataFolder>
>           [] folder1 <dataFolder>
>              [*] node1 <customType>
>              [*] node2 <customType>
>           [] folder2 <dataFolder>
>              [*] node3 <customType>
>              [*] node4 <customType>
> 
> I would like to launch the "activate all" command over 20 <dataFolder>, 
> in order to have all the subnodes activated on public, like a manual 
> "right-click" -> "activateAll".
> 
> Nodes are around 300 per days, what do you suggest?
> 

Did I ever answered this one? Probably not, so here you go:
So all the activation commands are children of RuleBasedCommand. As such
you can either directly override method getRule() or simply just set
"itemType" property to add additional item types in the rule
(Data*ActivateCommand adds the "dataItem" type there, check the code).
By adding the type of the node itself in the rule, you will ensure that
the node including all the subnodes will be activated in one go. It will
be likely faster then going for one by one activtion. However as I said
it will be all transfered as one chunk and more importantly it will be
all imported in the session and kept in-memory by JackRabbit at some
point to verify structural integrity. So if those nodes contain huge
amount of data, you might run out of memory. The two things to remember
are: bigger nodes == more memory consumed on public during the
activation and more nodes == longer time to save the changes as the
structural check has to run for each of the saved nodes by iterating the
in-memory objects.

As to what do i suggest - If you transfer big amounts of binary content
in those nodes, activate them separately. Otherwise try both approaches
and observe which one performs better for you. If you have troubles with
defining the item types or reconfiguring the rule let me know and I'll
try to help.

Cheers,
Jan


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to