Ejemplo n.º 1
0
  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);
    }
  }
Ejemplo n.º 2
0
  public void initialize() throws Exception {
    for (Iterator iterator = lifecycleHandlers.iterator(); iterator.hasNext(); ) {
      LifecycleHandler lifecycleHandler = (LifecycleHandler) iterator.next();

      lifecycleHandler.initialize();
    }
  }
Ejemplo n.º 3
0
  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);
  }