/*
* TODO
*/
public Element exec(Element params, ServiceContext context)
throws Exception {
GeonetContext gc = (GeonetContext) context
.getHandlerContext(Geonet.CONTEXT_NAME);
String ref = Util.getParam(params, Params.REF);
String oldid = Util.getParam(params, "oldid");
String newid = Util.getParam(params, "newid");
String namespace = Util.getParam(params, "namespace");
String thesaType = Util.getParam(params, "refType");
ThesaurusManager manager = gc.getBean(ThesaurusManager.class);
Thesaurus thesaurus = manager.getThesaurusByName(ref);
if (!(oldid.equals(newid))) {
if (thesaurus.isFreeCode(null, newid)) {
thesaurus.updateCodeByURI(oldid, newid);