474475476477478479480481482483484
} private void checkName() throws IllegalNameException { String name = getName(); if (!EntityUtils.isNameUnique(this, name)) { throw new IllegalNameException("The name \"" + name + "\" is already in use."); } NameValidator v = NameValidatorStore.getInstance().get(this); if (v != null) { v.validateName(name); }
93949596979899100101102
if (validator != null) { validator.validateName(name); } if (!EntityUtils.isNameUnique(entity, name)) { String msg = format("DuplicateName.Message", name); throw new IllegalNameException(msg); } } }; }
121122123124125126127128129130
// Without this block that name would be treated as invalid. continue; } if (entity.getClass().equals(item.getClass())) { if (entity.getName().equals(name)) { throw new IllegalNameException("The name '" + name + "' is already in use."); } } } }
194195196197198199200201
if (validator != null) { validator.validateName(name); } if (!EntityUtils.isChildNameUnique(newOwner, name)) { String msg = format("DuplicateName.Message", name); throw new IllegalNameException(msg); } }
5152535455565758
} } private void ensureNameIsUnique(IntegrationEntity newOwner, String newName) throws IllegalNameException { if (!EntityUtils.isChildNameUnique(newOwner, newName)) { throw new IllegalNameException("The name " + newName + " is already taken."); } }