1 5 package ve.luz.ica.jackass.component; 6 7 import java.util.Hashtable ; 8 9 import org.omg.CosNaming.NamingContextExt ; 10 import ve.luz.ica.jackass.deploy.descriptor.standard.Property; 11 12 16 public abstract class AbstractJackassContext implements JackassContextOperations 17 { 18 private Hashtable properties; 19 private NamingContextExt rootNamingContext; 20 private ve.luz.ica.jackass.component.Property[] propertyArray; 21 22 27 protected AbstractJackassContext(NamingContextExt rootContext, Property[] props) 28 { 29 this.rootNamingContext = rootContext; 30 this.properties = new Hashtable (); 31 32 if (props == null) 33 { 34 this.propertyArray = new ve.luz.ica.jackass.component.Property[0]; 35 return; 36 } 37 38 this.propertyArray = new ve.luz.ica.jackass.component.Property[props.length]; 39 40 for (int i = 0; i < props.length; i++) 41 { 42 String name = props[i].getName(); 43 String value = props[i].getValue(); 44 45 this.properties.put(name, value); 46 this.propertyArray[i] = new ve.luz.ica.jackass.component.Property(name, value); 47 } 48 } 49 50 55 public NamingContextExt getRootNamingContext() 56 { 57 return rootNamingContext; 58 } 59 60 66 public String getProperty(String name) 67 { 68 return (String ) properties.get(name); 69 } 70 71 75 public ve.luz.ica.jackass.component.Property[] getProperties() 76 { 77 return propertyArray; 78 } 79 } 80 | Popular Tags |