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 Session extends com.sun.enterprise.tools.common.dd.SunBaseBean 40 { 41 42 static Vector comparators = new Vector(); 43 44 static public final String CHECKPOINT_LOCATION = "CheckpointLocation"; static public final String QUICK_CHECKPOINT = "QuickCheckpoint"; static public final String CHECKPOINTED_METHODS = "CheckpointedMethods"; 48 public Session() { 49 this(Common.USE_DEFAULT_VALUES); 50 } 51 52 public Session(int options) 53 { 54 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 55 this.createProperty("checkpoint-location", CHECKPOINT_LOCATION, 58 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 59 String .class); 60 this.createProperty("quick-checkpoint", QUICK_CHECKPOINT, 62 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 63 String .class); 64 this.createProperty("checkpointed-methods", CHECKPOINTED_METHODS, 66 Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 67 CheckpointedMethods.class); 68 this.initialize(options); 69 } 70 71 void initialize(int options) 73 { 74 75 } 76 77 public void setCheckpointLocation(String value) { 79 this.setValue(CHECKPOINT_LOCATION, value); 80 } 81 82 public String getCheckpointLocation() { 84 return (String )this.getValue(CHECKPOINT_LOCATION); 85 } 86 87 public void setQuickCheckpoint(String value) { 89 this.setValue(QUICK_CHECKPOINT, value); 90 } 91 92 public String getQuickCheckpoint() { 94 return (String )this.getValue(QUICK_CHECKPOINT); 95 } 96 97 public void setCheckpointedMethods(CheckpointedMethods value) { 99 this.setValue(CHECKPOINTED_METHODS, value); 100 } 101 102 public CheckpointedMethods getCheckpointedMethods() { 104 return (CheckpointedMethods)this.getValue(CHECKPOINTED_METHODS); 105 } 106 107 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 109 comparators.add(c); 110 } 111 112 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 114 comparators.remove(c); 115 } 116 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 117 boolean restrictionFailure = false; 118 if (getCheckpointLocation() != null) { 120 } 121 if (getQuickCheckpoint() != null) { 123 } 124 if (getCheckpointedMethods() != null) { 126 getCheckpointedMethods().validate(); 127 } 128 } 129 130 public void dump(StringBuffer str, String indent){ 132 String s; 133 Object o; 134 org.netbeans.modules.schema2beans.BaseBean n; 135 str.append(indent); 136 str.append("CheckpointLocation"); str.append(indent+"\t"); str.append("<"); s = this.getCheckpointLocation(); 140 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(CHECKPOINT_LOCATION, 0, str, indent); 143 144 str.append(indent); 145 str.append("QuickCheckpoint"); str.append(indent+"\t"); str.append("<"); s = this.getQuickCheckpoint(); 149 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(QUICK_CHECKPOINT, 0, str, indent); 152 153 str.append(indent); 154 str.append("CheckpointedMethods"); n = (org.netbeans.modules.schema2beans.BaseBean) this.getCheckpointedMethods(); 156 if (n != null) 157 n.dump(str, indent + "\t"); else 159 str.append(indent+"\tnull"); this.dumpAttributes(CHECKPOINTED_METHODS, 0, str, indent); 161 162 } 163 public String dumpBeanNode(){ 164 StringBuffer str = new StringBuffer (); 165 str.append("Session\n"); this.dump(str, "\n "); return str.toString(); 168 }} 169 170 172 173 1017 | Popular Tags |