1 23 24 29 30 package com.sun.enterprise.tools.common.dd.ejb; 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 GenClasses extends com.sun.enterprise.tools.common.dd.SunBaseBean 40 { 41 42 static Vector comparators = new Vector(); 43 44 static public final String REMOTE_IMPL = "RemoteImpl"; static public final String LOCAL_IMPL = "LocalImpl"; static public final String REMOTE_HOME_IMPL = "RemoteHomeImpl"; static public final String LOCAL_HOME_IMPL = "LocalHomeImpl"; 49 public GenClasses() { 50 this(Common.USE_DEFAULT_VALUES); 51 } 52 53 public GenClasses(int options) 54 { 55 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 56 this.createProperty("remote-impl", REMOTE_IMPL, 59 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 60 String .class); 61 this.createProperty("local-impl", LOCAL_IMPL, 63 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 64 String .class); 65 this.createProperty("remote-home-impl", REMOTE_HOME_IMPL, 67 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 68 String .class); 69 this.createProperty("local-home-impl", LOCAL_HOME_IMPL, 71 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 72 String .class); 73 this.initialize(options); 74 } 75 76 void initialize(int options) 78 { 79 80 } 81 82 public void setRemoteImpl(String value) { 84 this.setValue(REMOTE_IMPL, value); 85 } 86 87 public String getRemoteImpl() { 89 return (String )this.getValue(REMOTE_IMPL); 90 } 91 92 public void setLocalImpl(String value) { 94 this.setValue(LOCAL_IMPL, value); 95 } 96 97 public String getLocalImpl() { 99 return (String )this.getValue(LOCAL_IMPL); 100 } 101 102 public void setRemoteHomeImpl(String value) { 104 this.setValue(REMOTE_HOME_IMPL, value); 105 } 106 107 public String getRemoteHomeImpl() { 109 return (String )this.getValue(REMOTE_HOME_IMPL); 110 } 111 112 public void setLocalHomeImpl(String value) { 114 this.setValue(LOCAL_HOME_IMPL, value); 115 } 116 117 public String getLocalHomeImpl() { 119 return (String )this.getValue(LOCAL_HOME_IMPL); 120 } 121 122 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 124 comparators.add(c); 125 } 126 127 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 129 comparators.remove(c); 130 } 131 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 132 boolean restrictionFailure = false; 133 if (getRemoteImpl() != null) { 135 } 136 if (getLocalImpl() != null) { 138 } 139 if (getRemoteHomeImpl() != null) { 141 } 142 if (getLocalHomeImpl() != null) { 144 } 145 } 146 147 public void dump(StringBuffer str, String indent){ 149 String s; 150 Object o; 151 org.netbeans.modules.schema2beans.BaseBean n; 152 str.append(indent); 153 str.append("RemoteImpl"); str.append(indent+"\t"); str.append("<"); s = this.getRemoteImpl(); 157 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(REMOTE_IMPL, 0, str, indent); 160 161 str.append(indent); 162 str.append("LocalImpl"); str.append(indent+"\t"); str.append("<"); s = this.getLocalImpl(); 166 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(LOCAL_IMPL, 0, str, indent); 169 170 str.append(indent); 171 str.append("RemoteHomeImpl"); str.append(indent+"\t"); str.append("<"); s = this.getRemoteHomeImpl(); 175 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(REMOTE_HOME_IMPL, 0, str, indent); 178 179 str.append(indent); 180 str.append("LocalHomeImpl"); str.append(indent+"\t"); str.append("<"); s = this.getLocalHomeImpl(); 184 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(LOCAL_HOME_IMPL, 0, str, indent); 187 188 } 189 public String dumpBeanNode(){ 190 StringBuffer str = new StringBuffer (); 191 str.append("GenClasses\n"); this.dump(str, "\n "); return str.toString(); 194 }} 195 196 198 199 1043 | Popular Tags |