diff --git a/li.strolch.model/src/main/java/li/strolch/model/GroupedParameterizedElement.java b/li.strolch.model/src/main/java/li/strolch/model/GroupedParameterizedElement.java index 7be822dfe..a9b1979c8 100644 --- a/li.strolch.model/src/main/java/li/strolch/model/GroupedParameterizedElement.java +++ b/li.strolch.model/src/main/java/li/strolch/model/GroupedParameterizedElement.java @@ -829,6 +829,19 @@ public abstract class GroupedParameterizedElement extends AbstractStrolchElement return bag.removeParameter(paramKey); } + @Override + public > T removeRelation(String paramKey) { + assertNotReadonly(); + if (this.parameterBagMap == null) + return null; + ParameterBag bag = this.parameterBagMap.get(BAG_RELATIONS); + if (bag == null) { + return null; + } + + return bag.removeParameter(paramKey); + } + @Override public > T removeParameter(String bagKey, String paramKey) { assertNotReadonly(); diff --git a/li.strolch.model/src/main/java/li/strolch/model/ParameterBagContainer.java b/li.strolch.model/src/main/java/li/strolch/model/ParameterBagContainer.java index 77a0c8b56..c4d3ff34f 100644 --- a/li.strolch.model/src/main/java/li/strolch/model/ParameterBagContainer.java +++ b/li.strolch.model/src/main/java/li/strolch/model/ParameterBagContainer.java @@ -1491,6 +1491,17 @@ public interface ParameterBagContainer extends StrolchElement { */ > T removeParameter(String paramKey); + /** + * Removes the {@link Parameter} with the given paramKey from the {@link ParameterBag} with the key {@link + * StrolchModelConstants#BAG_RELATIONS} + * + * @param paramKey + * the key of the {@link Parameter} which is to be removed + * + * @return the removed {@link Parameter} or null if it did not exist + */ + > T removeRelation(String paramKey); + /** * Removes the {@link Parameter} with the given paramKey from the {@link ParameterBag} with the given bagKey *