/** * Called on after the startup of the singleton. This sets the global * list of functions which will have permission managed by sakai * @throws Exception */ protected void init() throws Exception { logger.info("init()"); try { EventTrackingService.addObserver(this); // register functions if(FunctionManager.getRegisteredFunctions(ChatFunctions.CHAT_FUNCTION_PREFIX).size() == 0) { FunctionManager.registerFunction(ChatFunctions.CHAT_FUNCTION_READ); FunctionManager.registerFunction(ChatFunctions.CHAT_FUNCTION_NEW); FunctionManager.registerFunction(ChatFunctions.CHAT_FUNCTION_DELETE_ANY); FunctionManager.registerFunction(ChatFunctions.CHAT_FUNCTION_DELETE_OWN); FunctionManager.registerFunction(ChatFunctions.CHAT_FUNCTION_DELETE_CHANNEL); FunctionManager.registerFunction(ChatFunctions.CHAT_FUNCTION_NEW_CHANNEL); FunctionManager.registerFunction(ChatFunctions.CHAT_FUNCTION_EDIT_CHANNEL); } } catch (Exception e) { logger.warn("Error with ChatManager.init()", e); } }
public void init() { sessionContextCache = memoryService.getCache("org.sakaiproject.citation.api.SearchManager.sessionContextCache"); SessionContext.setCache(sessionContextCache); metasearchSessionManagerCache = memoryService.getCache("org.sakaiproject.citation.api.SearchManager.metasearchSessionManagerCache"); MetasearchSessionManager.setCache(metasearchSessionManagerCache); m_log.info("BaseSearchManager.init()"); EventTrackingService.addObserver(this); long seed = TimeService.newTime().getTime(); m_generator = new Random(seed); setupTypes(); String configFolderRef = m_configService.getConfigFolderReference(); Collection<String> hierarchyIds = m_configService.getAllCategoryXml(); for(String hierarchyId : hierarchyIds) { this.updateHierarchy(configFolderRef + hierarchyId); this.updatableResources.add(configFolderRef + hierarchyId); } }
EventTrackingService.addObserver(this);