/** * Installs this instance as an event listener.<p> */ public void install() { OpenCms.getEventManager().addCmsEventListener( this, new int[] { I_CmsEventListener.EVENT_CLEAR_CACHES, I_CmsEventListener.EVENT_CLEAR_OFFLINE_CACHES, I_CmsEventListener.EVENT_CLEAR_ONLINE_CACHES}); }
/** * Clears the cache.<p> */ public void clearCache() { OpenCms.getEventManager().fireEvent(I_CmsEventListener.EVENT_CLEAR_CACHES); }
/** * Registers the 'clear caches' event listener.<p> */ private static synchronized void registerListener() { if (!m_listenerRegistered) { OpenCms.getEventManager().addCmsEventListener( new CmsIconUtil(), new int[] {I_CmsEventListener.EVENT_CLEAR_CACHES}); m_listenerRegistered = true; } }
/** * Creates a new instance.<p> * * @param cms the CMS context to use */ public CmsVfsBundleManager(CmsObject cms) { m_cms = cms; m_bundleBaseNames = new HashSet<String>(); CmsVfsResourceBundle.setCmsObject(cms); OpenCms.getEventManager().addCmsEventListener( this, new int[] {I_CmsEventListener.EVENT_PUBLISH_PROJECT, I_CmsEventListener.EVENT_CLEAR_CACHES}); // immediately load all bundles for the first time reload(true); }
/** * Shuts down the VFS bundle manager.<p> * * This will cause the internal reloading Thread not reload in case it is still running.<p> */ public void shutDown() { // we don't want to listen to further events OpenCms.getEventManager().removeCmsEventListener(this); setReloadScheduled(false); if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info( org.opencms.staticexport.Messages.get().getBundle().key( org.opencms.staticexport.Messages.INIT_SHUTDOWN_1, this.getClass().getName())); } }
handler.addCache(m_offlineFormatterCache, m_onlineFormatterCache, "formatter configuration cache"); handler.addCache(m_offlineDetailIdCache, m_onlineDetailIdCache, "Detail ID cache"); OpenCms.getEventManager().addCmsEventListener(handler); CmsLog.INIT.info(". Done initializing the ADE configuration."); m_initStatus = Status.initialized;