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 ActivationConfigProperty extends com.sun.enterprise.tools.common.dd.SunBaseBean 40 { 41 42 static Vector comparators = new Vector(); 43 44 static public final String ACTIVATION_CONFIG_PROPERTY_NAME = "ActivationConfigPropertyName"; static public final String ACTIVATION_CONFIG_PROPERTY_VALUE = "ActivationConfigPropertyValue"; 47 public ActivationConfigProperty() { 48 this(Common.USE_DEFAULT_VALUES); 49 } 50 51 public ActivationConfigProperty(int options) 52 { 53 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 54 this.createProperty("activation-config-property-name", ACTIVATION_CONFIG_PROPERTY_NAME, 57 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 58 String .class); 59 this.createProperty("activation-config-property-value", ACTIVATION_CONFIG_PROPERTY_VALUE, 61 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 62 String .class); 63 this.initialize(options); 64 } 65 66 void initialize(int options) 68 { 69 70 } 71 72 public void setActivationConfigPropertyName(String value) { 74 this.setValue(ACTIVATION_CONFIG_PROPERTY_NAME, value); 75 } 76 77 public String getActivationConfigPropertyName() { 79 return (String )this.getValue(ACTIVATION_CONFIG_PROPERTY_NAME); 80 } 81 82 public void setActivationConfigPropertyValue(String value) { 84 this.setValue(ACTIVATION_CONFIG_PROPERTY_VALUE, value); 85 } 86 87 public String getActivationConfigPropertyValue() { 89 return (String )this.getValue(ACTIVATION_CONFIG_PROPERTY_VALUE); 90 } 91 92 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 94 comparators.add(c); 95 } 96 97 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 99 comparators.remove(c); 100 } 101 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 102 boolean restrictionFailure = false; 103 if (getActivationConfigPropertyName() == null) { 105 throw new org.netbeans.modules.schema2beans.ValidateException("getActivationConfigPropertyName() == null", "activationConfigPropertyName", this); } 107 if (getActivationConfigPropertyValue() == null) { 109 throw new org.netbeans.modules.schema2beans.ValidateException("getActivationConfigPropertyValue() == null", "activationConfigPropertyValue", this); } 111 } 112 113 public void dump(StringBuffer str, String indent){ 115 String s; 116 Object o; 117 org.netbeans.modules.schema2beans.BaseBean n; 118 str.append(indent); 119 str.append("ActivationConfigPropertyName"); str.append(indent+"\t"); str.append("<"); s = this.getActivationConfigPropertyName(); 123 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(ACTIVATION_CONFIG_PROPERTY_NAME, 0, str, indent); 126 127 str.append(indent); 128 str.append("ActivationConfigPropertyValue"); str.append(indent+"\t"); str.append("<"); s = this.getActivationConfigPropertyValue(); 132 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(ACTIVATION_CONFIG_PROPERTY_VALUE, 0, str, indent); 135 136 } 137 public String dumpBeanNode(){ 138 StringBuffer str = new StringBuffer (); 139 str.append("ActivationConfigProperty\n"); this.dump(str, "\n "); return str.toString(); 142 }} 143 144 146 147 991 | Popular Tags |