@Override protected void doCheck() { final SetMultimap<String, String> enums = getEnums(); if (enums != null) { ensureEnums(enums); } }
@Override protected String getCheckDone() { return "done for OMERO version " + getOmeroVersion(); } }
/** * Ensure that the given enumeration values exist as instances in the database. * @param enumValues the enumeration classes and their values */ private void ensureEnums(SetMultimap<String, String> enumValues) { for (final Map.Entry<String, Collection<String>> valuesForClass : enumValues.asMap().entrySet()) { try { ensureEnum.ensure(getEnumClassForName(valuesForClass.getKey()), valuesForClass.getValue()); } catch (ClassNotFoundException cnfe) { LOGGER.warn("cannot find class", cnfe); continue; } } }