public void addEntity(String key, Object entity) throws Exception { for (Iterator iterator = lifecycleHandlers.iterator(); iterator.hasNext(); ) { LifecycleHandler lifecycleHandler = (LifecycleHandler) iterator.next(); lifecycleHandler.addEntity(key, entity); } }
public void initialize() throws Exception { for (Iterator iterator = lifecycleHandlers.iterator(); iterator.hasNext(); ) { LifecycleHandler lifecycleHandler = (LifecycleHandler) iterator.next(); lifecycleHandler.initialize(); } }
public LifecycleHandler getLifecycleHandler(String id) throws UndefinedLifecycleHandlerException { LifecycleHandler lifecycleHandler = null; for (Iterator iterator = lifecycleHandlers.iterator(); iterator.hasNext(); ) { lifecycleHandler = (LifecycleHandler) iterator.next(); if (id.equals(lifecycleHandler.getId())) { return lifecycleHandler; } } throw new UndefinedLifecycleHandlerException( "Specified lifecycle handler cannot be found: " + id); }