Exécutez le script suivant pour migrer vos services Annuaire de liens
Script de migration des services
var ConsoleHelper = Java.type('org.ametys.workspaces.repository.ConsoleHelper'); var qm = session.getWorkspace().getQueryManager(); var query = qm.createQuery("//element(*, ametys:zoneItem)[@ametys-internal:type='SERVICE' and @ametys-internal:service='org.ametys.plugins.linkdirectory.DirectoryService']", javax.jcr.query.Query.XPATH); var nodes = query.execute().getNodes(); var count = 0; while (nodes.hasNext()) { var node = nodes.next(); var paramsNode = node.getNode('ametys:service_parameters'); if (ConsoleHelper.convertSingleToMultipleProperty(paramsNode, "ametys:themes")) { paramsNode.save(); count++ } } print(count + " link services have been migrated");
var ConsoleHelper = Java.type('org.ametys.workspaces.repository.ConsoleHelper'); var qm = session.getWorkspace().getQueryManager(); var query = qm.createQuery("//element(*, ametys:zoneItem)[@ametys-internal:type='SERVICE' and @ametys-internal:service='org.ametys.plugins.linkdirectory.DirectoryService']", javax.jcr.query.Query.XPATH); var nodes = query.execute().getNodes(); var count = 0; while (nodes.hasNext()) { var node = nodes.next(); var paramsNode = node.getNode('ametys:service_parameters'); if (ConsoleHelper.convertSingleToMultipleProperty(paramsNode, "ametys:themes")) { paramsNode.save(); count++ } } print(count + " link services have been migrated");
var ConsoleHelper = Java.type('org.ametys.workspaces.repository.ConsoleHelper'); var qm = session.getWorkspace().getQueryManager(); var query = qm.createQuery("//element(*, ametys:zoneItem)[@ametys-internal:type='SERVICE' and @ametys-internal:service='org.ametys.plugins.linkdirectory.DirectoryService']", javax.jcr.query.Query.XPATH); var nodes = query.execute().getNodes(); var count = 0; while (nodes.hasNext()) { var node = nodes.next(); var paramsNode = node.getNode('ametys:service_parameters'); if (ConsoleHelper.convertSingleToMultipleProperty(paramsNode, "ametys:themes")) { paramsNode.save(); count++ } } print(count + " link services have been migrated");