1 18 19 20 package org.apache.struts.config; 21 22 23 import java.io.Serializable ; 24 import java.util.HashMap ; 25 import java.util.Map ; 26 27 28 36 37 public class PlugInConfig implements Serializable { 38 39 40 42 43 46 protected boolean configured = false; 47 48 49 53 protected Map properties = new HashMap (); 54 55 56 58 59 63 protected String className = null; 64 65 public String getClassName() { 66 return (this.className); 67 } 68 69 public void setClassName(String className) { 70 this.className = className; 71 } 72 73 74 76 77 84 public void addProperty(String name, String value) { 85 86 if (configured) { 87 throw new IllegalStateException ("Configuration is frozen"); 88 } 89 properties.put(name, value); 90 91 } 92 93 94 97 public void freeze() { 98 99 configured = true; 100 101 } 102 103 104 108 public Map getProperties() { 109 110 return (properties); 111 112 } 113 114 115 } 116 | Popular Tags |