@@ -0,0 +1,2659 @@
+/**%0A *        Licensed to the Apache Software Foundation (ASF) under one%0A *        or more contributor license agreements.  See the NOTICE file%0A *        distributed with this work for additional information%0A *        regarding copyright ownership.  The ASF licenses this file%0A *        to you under the Apache License, Version 2.0 (the%0A *        %22License%22); you may not use this file except in compliance%0A *        with the License.  You may obtain a copy of the License at%0A *%0A *          http://www.apache.org/licenses/LICENSE-2.0%0A *%0A *        Unless required by applicable law or agreed to in writing,%0A *        software distributed under the License is distributed on an%0A *        %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY%0A *        KIND, either express or implied.  See the License for the%0A *        specific language governing permissions and limitations%0A *        under the License.%0A *%0A */%0Apackage com.intelligentsia.dowsers.entity.manager;%0A%0Aimport java.util.List;%0A%0Aimport org.springframework.beans.factory.FactoryBean;%0A%0Aimport com.intelligentsia.dowsers.entity.view.View;%0Aimport com.intelligentsia.dowsers.entity.view.ViewManager;%0Aimport com.intelligentsia.dowsers.entity.view.ViewManagerControler;%0Aimport com.intelligentsia.dowsers.entity.view.ViewManagerControler.Behavior;%0A%0A/**%0A * ViewManagerFactory implements %7B@link FactoryBean%7D for %7B@link ViewManager%7D%0A * %0A * @author %3Ca href=%22mailto:jguibert@intelligents-ia.com%22%3EJerome Guibert%3C/a%3E%0A */%0Apublic class ViewManagerFactory implements FactoryBean%3CViewManager%3E %7B%0A%0A%09private Behavior behavior = Behavior.NO_FEED;%0A%09private List%3CView%3E views;%0A%09private EntityManager entityManager;%0A%09private boolean asynch = true;%0A%0A%09@Override%0A%09public ViewManager getObject() throws Exception %7B%0A%09%09// build ViewManager%0A%09%09ViewManager viewManager = new ViewManager(views, entityManager, asynch);%0A%09%09// do init%0A%09%09new ViewManagerControler(entityManager, viewManager, behavior).process();%0A%09%09// ok retrun%0A%09%09return viewManager;%0A%09%7D%0A%0A%09@Override%0A%09public Class%3C?%3E getObjectType() %7B%0A%09%09return ViewManager.class;%0A%09%7D%0A%0A%09@Override%0A%09public boolean isSingleton() %7B%0A%09%09return false;%0A%09%7D%0A%0A%09public Behavior getBehavior() %7B%0A%09%09return behavior;%0A%09%7D%0A%0A%09public void setBehavior(Behavior behavior) %7B%0A%09%09this.behavior = behavior;%0A%09%7D%0A%0A%09public List%3CView%3E getViews() %7B%0A%09%09return views;%0A%09%7D%0A%0A%09public void setViews(List%3CView%3E views) %7B%0A%09%09this.views = views;%0A%09%7D%0A%0A%09public EntityManager getEntityManager() %7B%0A%09%09return entityManager;%0A%09%7D%0A%0A%09public void setEntityManager(EntityManager entityManager) %7B%0A%09%09this.entityManager = entityManager;%0A%09%7D%0A%0A%09public boolean isAsynch() %7B%0A%09%09return asynch;%0A%09%7D%0A%0A%09public void setAsynch(boolean asynch) %7B%0A%09%09this.asynch = asynch;%0A%09%7D%0A%0A%7D%0A

add view manager spring factory