Element.removeExtension (support for instance-name and instance-description extensions in IG publisher)
This commit is contained in:
parent
20929abc58
commit
2b0d778767
|
@ -2546,7 +2546,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// not sure what to do in this case?
|
// not sure what to do in this case?
|
||||||
System.out.println("Unable to generate snapshot @4 for "+p.getVersionedUrl()+": "+e.getMessage());
|
System.out.println("Unable to generate snapshot @5 for "+p.getVersionedUrl()+": "+e.getMessage());
|
||||||
if (logger.isDebugLogging()) {
|
if (logger.isDebugLogging()) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1488,4 +1488,15 @@ public class Element extends Base implements NamedItem {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void removeExtension(String url) {
|
||||||
|
List<Element> rem = new ArrayList<>();
|
||||||
|
for (Element e : children) {
|
||||||
|
if ("extension".equals(e.getName()) && url.equals(e.getChildValue("url"))) {
|
||||||
|
rem.add(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
children.removeAll(rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue