/** * Reload the config from the default config file * * @exception java.io.IOException * Thrown if the specified config file cannot be read/loaded * @throws java.io.IOException if any. */ public static synchronized void reload() throws IOException { m_singleton = null; m_loaded = false; init(); }
/** * Create the instance of the CategoryModel. */ private CategoryModel() throws IOException { CategoryFactory.init(); m_factory = CategoryFactory.getInstance(); LOG.debug("The CategoryModel object was created"); }
/** * Create the instance of the CategoryModel. */ private CategoryModel() throws IOException { CategoryFactory.init(); m_factory = CategoryFactory.getInstance(); LOG.debug("The CategoryModel object was created"); }
/** * <p>Constructor for DefaultCategoryConfigDao.</p> */ public DefaultCategoryConfigDao() { try { CategoryFactory.init(); } catch (FileNotFoundException e) { throw new DataRetrievalFailureException("Unable to locate categories file", e); } catch (IOException e) { throw new DataRetrievalFailureException("Error load categories file", e); } }
/** * <p>Constructor for DefaultCategoryConfigDao.</p> */ public DefaultCategoryConfigDao() { try { CategoryFactory.init(); } catch (FileNotFoundException e) { throw new DataRetrievalFailureException("Unable to locate categories file", e); } catch (IOException e) { throw new DataRetrievalFailureException("Error load categories file", e); } }
CategoryFactory.init(); m_catFactory = CategoryFactory.getInstance(); config = m_catFactory.getConfig();
CategoryFactory.init(); m_catFactory = CategoryFactory.getInstance(); config = m_catFactory.getConfig();
/** * Creates the categories map. Reads the categories from the categories.xml * and creates the 'RTCCategory's map */ public static HashMap<String, RTCCategory> createCategoriesMap() { CatFactory cFactory = null; try { CategoryFactory.init(); cFactory = CategoryFactory.getInstance(); } catch (IOException ex) { LOG.error("Failed to load categories information", ex); throw new UndeclaredThrowableException(ex); } HashMap<String, RTCCategory> retval = new HashMap<String, RTCCategory>(); cFactory.getReadLock().lock(); try { for (CategoryGroup cg : cFactory.getConfig().getCategoryGroups()) { final String commonRule = cg.getCommon().getRule(); for (final org.opennms.netmgt.config.categories.Category cat : cg.getCategories()) { RTCCategory rtcCat = new RTCCategory(cat, commonRule); retval.put(rtcCat.getLabel(), rtcCat); } } } finally { cFactory.getReadLock().unlock(); } return retval; }
CategoryFactory.init(); m_catFactory = CategoryFactory.getInstance(); } catch (final Exception e) {
CategoryFactory.init(); m_catFactory = CategoryFactory.getInstance(); } catch (final Exception e) {