1 19 package org.netbeans.modules.j2ee.websphere6.dd.beans; 20 21 import org.w3c.dom.*; 22 import org.netbeans.modules.schema2beans.*; 23 import java.beans.*; 24 import java.util.*; 25 26 28 public class AuthorizationTableType extends org.netbeans.modules.schema2beans.BaseBean implements DDXmiConstants { 29 30 static Vector comparators = new Vector(); 31 static private final org.netbeans.modules.schema2beans.Version runtimeVersion = new org.netbeans.modules.schema2beans.Version(4, 2, 0); 32 public AuthorizationTableType() { 33 this(Common.USE_DEFAULT_VALUES); 34 } 35 36 public AuthorizationTableType(int options) { 37 super(comparators, runtimeVersion); 38 initPropertyTables(1); 40 this.createProperty(AUTHORIZATIONS, 41 AUTHORIZATION, 42 Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 43 AuthorizationsType.class); 44 this.createAttribute(AUTHORIZATION, XMI_ID_ID, AUTH_ID, 45 AttrProp.CDATA | AttrProp.IMPLIED, 46 null, null); 47 this.initialize(options); 48 } 49 50 void initialize(int options) { 52 53 } 54 55 public void setAuthorization(int index, AuthorizationsType value) { 57 this.setValue(AUTHORIZATION, index, value); 58 } 59 60 public AuthorizationsType getAuthorization(int index) { 62 return (AuthorizationsType)this.getValue(AUTHORIZATION, index); 63 } 64 65 public int sizeAuthorizations() { 67 return this.size(AUTHORIZATION); 68 } 69 70 public void setAuthorization(AuthorizationsType[] value) { 72 this.setValue(AUTHORIZATION, value); 73 } 74 75 public AuthorizationsType[] getAuthorizations() { 77 return (AuthorizationsType[])this.getValues(AUTHORIZATION); 78 } 79 80 public int addAuthorization(AuthorizationsType value) { 82 int positionOfNewItem = this.addValue(AUTHORIZATION, value); 83 return positionOfNewItem; 84 } 85 86 public int removeAuthorization(AuthorizationsType value) { 91 return this.removeValue(AUTHORIZATION, value); 92 } 93 94 98 public AuthorizationsType newApplicationType() { 99 return new AuthorizationsType(); 100 } 101 102 103 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 105 comparators.add(c); 106 } 107 108 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 110 comparators.remove(c); 111 } 112 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 113 boolean restrictionFailure = false; 114 boolean restrictionPassed = false; 115 for (int _index = 0; _index < sizeAuthorizations(); ++_index) { 117 AuthorizationsType element = getAuthorization(_index); 118 if (element != null) { 119 element.validate(); 120 } 121 } 122 123 } 124 125 public void dump(StringBuffer str, String indent){ 127 String s; 128 Object o; 129 org.netbeans.modules.schema2beans.BaseBean n; 130 str.append(indent); 131 str.append("Authorizations["+this.sizeAuthorizations()+"]"); for(int i=0; i<this.sizeAuthorizations(); i++) { 133 str.append(indent+"\t"); 134 str.append("#"+i+":"); 135 n = (org.netbeans.modules.schema2beans.BaseBean) this.getAuthorization(i); 136 if (n != null) 137 n.dump(str, indent + "\t"); else 139 str.append(indent+"\tnull"); this.dumpAttributes(AUTHORIZATION, i, str, indent); 141 } 142 143 } 144 public String dumpBeanNode(){ 145 StringBuffer str = new StringBuffer (); 146 str.append(getClass().getName()); this.dump(str, "\n "); return str.toString(); 149 }} 150 151 153 | Popular Tags |