1 package org.sapia.gumby.factory; 2 3 import java.util.ArrayList ; 4 import java.util.List ; 5 6 import org.sapia.util.xml.confix.ConfigurationException; 7 import org.sapia.util.xml.confix.ObjectCreationCallback; 8 9 24 public class Namespace implements ObjectCreationCallback { 25 26 private GumbyObjectFactory _fac; 27 28 private String _prefix; 29 private List _defs = new ArrayList (); 30 31 Namespace(GumbyObjectFactory fac) { 32 _fac = fac; 33 } 34 35 public void setPrefix(String prefix) { 36 _prefix = prefix; 37 } 38 39 public String getPrefix() { 40 return _prefix; 41 } 42 43 public Def createDef() { 44 Def def = new Def(); 45 _defs.add(def); 46 return def; 47 } 48 49 public List getDefs() { 50 return _defs; 51 } 52 53 56 public Object onCreate() throws ConfigurationException { 57 _fac.registerDefs(this); 58 return this; 59 } 60 61 } 62 | Popular Tags |