/** * Load the language property file into a Properties object. * @return The {@code Properties} object. */ private static Properties getLanguageProperties() { Properties prop = new Properties(); try { prop = ResourceUtils.loadProperties(LocaleFilter.class, LANGUAGES_FILE); } catch (IOException e) { log.error("Unable to load supported langauges file", e); } return prop; }
public void setup() { final String QUARTZ_DB_PROPERTIES = "ovirt-db-scheduler.properties"; Properties props = null; try { props = ResourceUtils.loadProperties(SchedulerUtil.class, QUARTZ_DB_PROPERTIES); } catch (IOException exception) { throw new IllegalStateException( "Can't load properties from resource \"" + QUARTZ_DB_PROPERTIES + "\".", exception); } setup(props); }
final Properties props; try { props = ResourceUtils.loadProperties(DbFacadeLocator.class, ENGINE_DB_ENGINE_PROPERTIES); } catch (IOException exception) { throw new IllegalStateException(
@BeforeAll public static void init() throws IOException { String QUARTZ_DB_TEST_PROPERTIES = "ovirt-db-scheduler-test.properties"; Properties props = ResourceUtils.loadProperties(SchedulerUtil.class, QUARTZ_DB_TEST_PROPERTIES); scheduler = new DBSchedulerUtilQuartzImpl(); scheduler.setup(props); }