1 23 24 29 30 package com.sun.enterprise.tools.common.dd.webapp; 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 SessionManager extends com.sun.enterprise.tools.common.dd.SunBaseBean 40 { 41 42 static Vector comparators = new Vector(); 43 44 static public final String PERSISTENCETYPE = "PersistenceType"; static public final String MANAGER_PROPERTIES = "ManagerProperties"; static public final String STORE_PROPERTIES = "StoreProperties"; 48 public SessionManager() { 49 this(Common.USE_DEFAULT_VALUES); 50 } 51 52 public SessionManager(int options) 53 { 54 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 55 this.createProperty("manager-properties", MANAGER_PROPERTIES, 58 Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 59 ManagerProperties.class); 60 this.createProperty("store-properties", STORE_PROPERTIES, 62 Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 63 StoreProperties.class); 64 this.initialize(options); 65 } 66 67 void initialize(int options) 69 { 70 71 } 72 73 public void setPersistenceType(java.lang.String value) { 75 setAttributeValue(PERSISTENCETYPE, value); 76 } 77 78 public java.lang.String getPersistenceType() { 80 return getAttributeValue(PERSISTENCETYPE); 81 } 82 83 public void setManagerProperties(ManagerProperties value) { 85 this.setValue(MANAGER_PROPERTIES, value); 86 } 87 88 public ManagerProperties getManagerProperties() { 90 return (ManagerProperties)this.getValue(MANAGER_PROPERTIES); 91 } 92 93 public void setStoreProperties(StoreProperties value) { 95 this.setValue(STORE_PROPERTIES, value); 96 } 97 98 public StoreProperties getStoreProperties() { 100 return (StoreProperties)this.getValue(STORE_PROPERTIES); 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 if (getPersistenceType() == null) { 116 throw new org.netbeans.modules.schema2beans.ValidateException("getPersistenceType() == null", "persistenceType", this); } 118 if (getManagerProperties() != null) { 120 getManagerProperties().validate(); 121 } 122 if (getStoreProperties() != null) { 124 getStoreProperties().validate(); 125 } 126 } 127 128 public void dump(StringBuffer str, String indent){ 130 String s; 131 Object o; 132 org.netbeans.modules.schema2beans.BaseBean n; 133 str.append(indent); 134 str.append("ManagerProperties"); n = (org.netbeans.modules.schema2beans.BaseBean) this.getManagerProperties(); 136 if (n != null) 137 n.dump(str, indent + "\t"); else 139 str.append(indent+"\tnull"); this.dumpAttributes(MANAGER_PROPERTIES, 0, str, indent); 141 142 str.append(indent); 143 str.append("StoreProperties"); n = (org.netbeans.modules.schema2beans.BaseBean) this.getStoreProperties(); 145 if (n != null) 146 n.dump(str, indent + "\t"); else 148 str.append(indent+"\tnull"); this.dumpAttributes(STORE_PROPERTIES, 0, str, indent); 150 151 } 152 public String dumpBeanNode(){ 153 StringBuffer str = new StringBuffer (); 154 str.append("SessionManager\n"); this.dump(str, "\n "); return str.toString(); 157 }} 158 159 161 162 629 | Popular Tags |