Hi all,
I need a quick consult :-)

I do a strong data import below data ws and a certain path (e.g.: /2009/09/20...)

At the end of import / elaboration, I need to activate the data.
I would like to use the <data><activateAll> command.
Is correct this way? My doubts are expecially on rule definition, because we have different NodeTypes under path (but they should extends dataItem type, isn't it?).


*****************

DataActivateAllCommand activateAll = (DataActivateAllCommand) CommandsManager.getInstance().getCommand("data", "activateAll");
if (null != activateAll){
                                
  activateAll.setRepository("data");
  activateAll.setPath(path);
                                
  // dataItem is implicit
  Rule rule = new Rule();
  rule.addAllowType("dataItem");
  rule.addAllowType(ItemType.NT_METADATA);
  rule.addAllowType(ItemType.NT_RESOURCE);
                                
  activateAll.setRule(rule);
  activateAll.execute(ctx);
                                
} else {
  log.error("cmd not found");
}

*****************

Thanks for your support..
matteo


----------------------------------------------------------------
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