if (! exists(ConfigAPIHelper.getConfigsInDomain(tcc), tcn)) {
final String msg = localStrings.getString("template.config.not.found", tcn, profileDomainXmlTemplate.getAbsolutePath());
throw new IllegalArgumentException(msg);
}
final Config tc = ConfigAPIHelper.getConfigByName(tcc, tcn); // this has to exist
return ( (Config)tc.clone() ); //cloning is required
}
private static boolean exists(final Config[] configs, final String configNamed) {
boolean exists = false;
for (final Config c : configs) {