package org.onap.cps.spi.exceptions;
+import java.util.Collection;
+
/**
* Already defined exception. Indicates the cps object with same name already exists.
*/
final Throwable cause) {
return new AlreadyDefinedException("Data node", xpath, contextName, cause);
}
+
+ public static AlreadyDefinedException forDataNodes(final Collection<String> xpaths, final String contextName,
+ final Throwable cause) {
+ final var name = String.format("(one or more) of %s", xpaths);
+ return new AlreadyDefinedException("Data node", name, contextName, cause);
+ }
}