Project Space Catalog Service


Project Space Catalog Service

A new parameter has been added to the project space catalog service (angular service): "Use old categories". 

You can manually configure your Catalog services to enable this setting, or go to script JCR which will automatically configure your Catalog services to add the setting and enable it:

var qm = session.getWorkspace().getQueryManager();       
var query = qm.createQuery("//element(*, ametys:zoneItem)[@ametys-internal:type='SERVICE' and @ametys-internal:service='org.ametys.plugins.workspaces.service.ProjectsCatalogue']/ametys:service_parameters", javax.jcr.query.Query.XPATH);       
it = query.execute().getNodes();       
var count = 0;       
while (it.hasNext())       
{       
  var node = it.nextNode();       
  if (!node.hasProperty("ametys:use_old_categories_system"))       
  {       
    node.setProperty("ametys:use_old_categories_system", "true");       
    node.save();       
       
    count++;       
  }       
}       
       
print(count + " services have been updated");  
Back to top

v1