1 23 24 29 30 package com.sun.enterprise.tools.common.dd.connector; 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 USERNAME = "UserName"; static public final String DESCRIPTION = "Description"; 47 public Principal() { 48 this(Common.USE_DEFAULT_VALUES); 49 } 50 51 public Principal(int options) 52 { 53 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 54 this.createProperty("description", DESCRIPTION, 57 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 58 String .class); 59 this.initialize(options); 60 } 61 62 void initialize(int options) 64 { 65 66 } 67 68 public void setUserName(java.lang.String value) { 70 setAttributeValue(USERNAME, value); 71 } 72 73 public java.lang.String getUserName() { 75 return getAttributeValue(USERNAME); 76 } 77 78 public void setDescription(String value) { 80 this.setValue(DESCRIPTION, value); 81 } 82 83 public String getDescription() { 85 return (String )this.getValue(DESCRIPTION); 86 } 87 88 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 90 comparators.add(c); 91 } 92 93 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 95 comparators.remove(c); 96 } 97 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 98 boolean restrictionFailure = false; 99 if (getUserName() == null) { 101 throw new org.netbeans.modules.schema2beans.ValidateException("getUserName() == null", "userName", this); } 103 if (getDescription() != null) { 105 } 106 } 107 108 public void dump(StringBuffer str, String indent){ 110 String s; 111 Object o; 112 org.netbeans.modules.schema2beans.BaseBean n; 113 str.append(indent); 114 str.append("Description"); str.append(indent+"\t"); str.append("<"); s = this.getDescription(); 118 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DESCRIPTION, 0, str, indent); 121 122 } 123 public String dumpBeanNode(){ 124 StringBuffer str = new StringBuffer (); 125 str.append("Principal\n"); this.dump(str, "\n "); return str.toString(); 128 }} 129 130 132 133 204 | Popular Tags |