final StoreInfo existing = catalog.getStoreByName(workspace, name, StoreInfo.class);
if (existing != null) {
final String existingId = existing.getId();
if (!existingId.equals(edittingStoreId)) {
ValidationError error = new ValidationError();
error.addMessageKey("StoreNameValidator.storeExistsInWorkspace");
error.setVariable("workspace", workspace.getName());
error.setVariable("storeName", name);
nameComponent.error((IValidationError) error);
}
}