1 /* 2 * $Id: ViewFactory.java,v 1.4 2002/06/06 12:23:54 lhoriman Exp $ 3 * $Source: /cvsroot/mav/maverick/src/java/org/infohazard/maverick/flow/ViewFactory.java,v $ 4 */ 5 6 package org.infohazard.maverick.flow; 7 8 import javax.servlet.ServletConfig; 9 import org.jdom.Element; 10 11 12 /** 13 * This interface allows user-defined view factories to be added to 14 * the system. 15 */ 16 public interface ViewFactory 17 { 18 /** 19 * The factory will be initialized with the XML element from from the 20 * maverick configuration file. 21 */ 22 public void init(Element factoryNode, ServletConfig servletCfg) throws ConfigException; 23 24 /** 25 * Creates a specific instance of the View from the XML element 26 * in the maverick configuration file. 27 */ 28 public View createView(Element viewNode) throws ConfigException; 29 }