private IndexMetadata() { try { props = ResourceUtil.getProperties(getClass()); } catch (IOException e) { log.error("Property file read error", e); } }
private void loadProperties() { try { myProperties = ResourceUtil.getProperties(getClass()); } catch (IOException e) { log.error("AnalyzerFactory property load from file failed", e); } }
/** * This is a utility class, thus it's constructor is private. */ private WebWarning() { try { PropertyMap props = ResourceUtil.getProperties(getClass().getName()); shown = Boolean.valueOf(props.get(SHOWN_KEY, Boolean.valueOf(DEFAULT_SHOWN).toString())).booleanValue(); } catch (IOException e) { shown = DEFAULT_SHOWN; } }
/** * Get and load a properties file from the writable area or if that fails * from the classpath (where a default ought to be stored) * * @param subject * The name of the desired resource (without any extension) * @return The found and loaded properties file * @throws IOException * if the resource can not be loaded */ public static PropertyMap getProperties(String subject) throws IOException { return getProperties(CallContext.getCallingClass(), subject); }
/** * Get and load a properties file from the writable area or if that fails * from the classpath (where a default ought to be stored) * * @param <T> the type of the resource * @param clazz * The name of the desired resource * @return The found and loaded properties file * @throws IOException * if the resource can not be loaded */ public static <T> PropertyMap getProperties(Class<T> clazz) throws IOException { return getProperties(clazz, ClassUtil.getShortClassName(clazz)); }
try { loadSupportedTranslations(); PropertyMap props = ResourceUtil.getProperties(getClass()); translation = props.get(TRANSLATION_KEY); if (translation == null || translation.length() == 0) {