1 23 24 29 30 package com.sun.enterprise.tools.common.dd; 31 32 import org.w3c.dom.*; 33 import org.netbeans.modules.schema2beans.*; 34 import java.beans.*; 35 import java.util.*; 36 37 39 public class PluginData extends com.sun.enterprise.tools.common.dd.SunBaseBean 40 { 41 42 static Vector comparators = new Vector(); 43 44 static public final String AUTO_GENERATE_SQL = "AutoGenerateSql"; static public final String CLIENT_JAR_PATH = "ClientJarPath"; static public final String CLIENT_ARGS = "ClientArgs"; 48 public PluginData() { 49 this(Common.USE_DEFAULT_VALUES); 50 } 51 52 public PluginData(int options) 53 { 54 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 55 this.createProperty("auto-generate-sql", AUTO_GENERATE_SQL, 58 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 59 String .class); 60 this.createProperty("client-jar-path", CLIENT_JAR_PATH, 62 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 63 String .class); 64 this.createProperty("client-args", CLIENT_ARGS, 66 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 67 String .class); 68 this.initialize(options); 69 } 70 71 void initialize(int options) 73 { 74 75 } 76 77 public void setAutoGenerateSql(String value) { 79 this.setValue(AUTO_GENERATE_SQL, value); 80 } 81 82 public String getAutoGenerateSql() { 84 return (String )this.getValue(AUTO_GENERATE_SQL); 85 } 86 87 public void setClientJarPath(String value) { 89 this.setValue(CLIENT_JAR_PATH, value); 90 } 91 92 public String getClientJarPath() { 94 return (String )this.getValue(CLIENT_JAR_PATH); 95 } 96 97 public void setClientArgs(String value) { 99 this.setValue(CLIENT_ARGS, value); 100 } 101 102 public String getClientArgs() { 104 return (String )this.getValue(CLIENT_ARGS); 105 } 106 107 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 109 comparators.add(c); 110 } 111 112 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 114 comparators.remove(c); 115 } 116 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 117 boolean restrictionFailure = false; 118 if (getAutoGenerateSql() != null) { 120 } 121 if (getClientJarPath() != null) { 123 } 124 if (getClientArgs() != null) { 126 } 127 } 128 129 public void dump(StringBuffer str, String indent){ 131 String s; 132 Object o; 133 org.netbeans.modules.schema2beans.BaseBean n; 134 str.append(indent); 135 str.append("AutoGenerateSql"); str.append(indent+"\t"); str.append("<"); s = this.getAutoGenerateSql(); 139 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(AUTO_GENERATE_SQL, 0, str, indent); 142 143 str.append(indent); 144 str.append("ClientJarPath"); str.append(indent+"\t"); str.append("<"); s = this.getClientJarPath(); 148 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(CLIENT_JAR_PATH, 0, str, indent); 151 152 str.append(indent); 153 str.append("ClientArgs"); str.append(indent+"\t"); str.append("<"); s = this.getClientArgs(); 157 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(CLIENT_ARGS, 0, str, indent); 160 161 } 162 public String dumpBeanNode(){ 163 StringBuffer str = new StringBuffer (); 164 str.append("PluginData\n"); this.dump(str, "\n "); return str.toString(); 167 }} 168 169 171 172 445 | Popular Tags |