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 Principal extends com.sun.enterprise.tools.common.dd.SunBaseBean 40 { 41 42 static Vector comparators = new Vector(); 43 44 static public final String NAME = "Name"; 46 public Principal() { 47 this(Common.USE_DEFAULT_VALUES); 48 } 49 50 public Principal(int options) 51 { 52 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 53 this.createProperty("name", NAME, 56 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 57 String .class); 58 this.initialize(options); 59 } 60 61 void initialize(int options) 63 { 64 65 } 66 67 public void setName(String value) { 69 this.setValue(NAME, value); 70 } 71 72 public String getName() { 74 return (String )this.getValue(NAME); 75 } 76 77 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 79 comparators.add(c); 80 } 81 82 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 84 comparators.remove(c); 85 } 86 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 87 boolean restrictionFailure = false; 88 if (getName() == null) { 90 throw new org.netbeans.modules.schema2beans.ValidateException("getName() == null", "name", this); } 92 } 93 94 public void dump(StringBuffer str, String indent){ 96 String s; 97 Object o; 98 org.netbeans.modules.schema2beans.BaseBean n; 99 str.append(indent); 100 str.append("Name"); str.append(indent+"\t"); str.append("<"); s = this.getName(); 104 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(NAME, 0, str, indent); 107 108 } 109 public String dumpBeanNode(){ 110 StringBuffer str = new StringBuffer (); 111 str.append("Principal\n"); this.dump(str, "\n "); return str.toString(); 114 }} 115 116 118 119 963 | Popular Tags |