1 5 6 package org.infohazard.maverick.flow; 7 8 import java.util.Map ; 9 import java.util.HashMap ; 10 11 14 class ViewRegistrySimple extends ViewRegistry 15 { 16 19 protected Map globalViews = new HashMap (); 20 21 23 public ViewRegistrySimple(MasterFactory masterFact) 24 { 25 super(masterFact); 26 } 27 28 30 protected void defineGlobalView(String id, String mode, View v) throws ConfigException 31 { 32 this.globalViews.put(id, v); 33 } 34 35 37 protected void addView(Map target, String viewName, String ref) throws ConfigException 38 { 39 View v = (View)this.globalViews.get(ref); 40 if (v == null) 41 throw new ConfigException("Reference to unknown global view \"" + ref + "\"."); 42 43 target.put(viewName, v); 44 } 45 46 48 protected void addView(Map target, String viewName, String mode, View v) throws ConfigException 49 { 50 target.put(viewName, v); 51 } 52 } | Popular Tags |