1 5 package com.tc.config.schema; 6 7 import org.apache.commons.lang.builder.HashCodeBuilder; 8 import org.apache.xmlbeans.QNameSet; 9 import org.apache.xmlbeans.SchemaType; 10 import org.apache.xmlbeans.XmlCursor; 11 import org.apache.xmlbeans.XmlDocumentProperties; 12 import org.apache.xmlbeans.XmlObject; 13 import org.apache.xmlbeans.XmlOptions; 14 import org.apache.xmlbeans.xml.stream.XMLInputStream; 15 import org.w3c.dom.Node ; 16 import org.xml.sax.ContentHandler ; 17 import org.xml.sax.ext.LexicalHandler ; 18 19 import com.tc.exception.ImplementMe; 20 import com.tc.test.UniqueSequenceGenerator; 21 import com.terracottatech.config.Application; 22 import com.terracottatech.config.DsoApplication; 23 import com.terracottatech.config.Modules; 24 import com.terracottatech.config.SpringApplication; 25 26 import java.io.File ; 27 import java.io.InputStream ; 28 import java.io.OutputStream ; 29 import java.io.Reader ; 30 import java.io.Writer ; 31 32 import javax.xml.namespace.QName ; 33 import javax.xml.stream.XMLStreamReader; 34 35 38 public class MockApplication implements Application { 39 40 private final int identity; 41 42 public MockApplication() { 43 this(UniqueSequenceGenerator.getInstance().getNextInt()); 44 } 45 46 public MockApplication(int identity) { 47 this.identity = identity; 48 } 49 50 public boolean equals(Object that) { 51 return ((that instanceof MockApplication) && ((MockApplication) that).identity == this.identity); 52 } 53 54 public int hashCode() { 55 return new HashCodeBuilder().append(this.identity).toHashCode(); 56 } 57 58 public DsoApplication getDso() { 59 return null; 60 } 61 62 public boolean isSetDso() { 63 return true; 64 } 65 66 public void setDso(DsoApplication arg0) { 67 } 69 70 public DsoApplication addNewDso() { 71 return null; 72 } 73 74 public void unsetDso() { 75 } 77 78 public SchemaType schemaType() { 79 return null; 80 } 81 82 public boolean validate() { 83 return true; 84 } 85 86 public boolean validate(XmlOptions arg0) { 87 return true; 88 } 89 90 public XmlObject[] selectPath(String arg0) { 91 return null; 92 } 93 94 public XmlObject[] selectPath(String arg0, XmlOptions arg1) { 95 return null; 96 } 97 98 public XmlObject[] execQuery(String arg0) { 99 return null; 100 } 101 102 public XmlObject[] execQuery(String arg0, XmlOptions arg1) { 103 return null; 104 } 105 106 public XmlObject changeType(SchemaType arg0) { 107 return null; 108 } 109 110 public XmlObject substitute(QName arg0, SchemaType arg1) { 111 return null; 112 } 113 114 public boolean isNil() { 115 return false; 116 } 117 118 public void setNil() { 119 } 121 122 public boolean isImmutable() { 123 return false; 124 } 125 126 public XmlObject set(XmlObject arg0) { 127 return null; 128 } 129 130 public XmlObject copy() { 131 return null; 132 } 133 134 public boolean valueEquals(XmlObject arg0) { 135 return false; 136 } 137 138 public int valueHashCode() { 139 return 0; 140 } 141 142 public int compareTo(Object arg0) { 143 return 0; 144 } 145 146 public int compareValue(XmlObject arg0) { 147 return 0; 148 } 149 150 public XmlObject[] selectChildren(QName arg0) { 151 return null; 152 } 153 154 public XmlObject[] selectChildren(String arg0, String arg1) { 155 return null; 156 } 157 158 public XmlObject[] selectChildren(QNameSet arg0) { 159 return null; 160 } 161 162 public XmlObject selectAttribute(QName arg0) { 163 return null; 164 } 165 166 public XmlObject selectAttribute(String arg0, String arg1) { 167 return null; 168 } 169 170 public XmlObject[] selectAttributes(QNameSet arg0) { 171 return null; 172 } 173 174 public Object monitor() { 175 return null; 176 } 177 178 public XmlDocumentProperties documentProperties() { 179 return null; 180 } 181 182 public XmlCursor newCursor() { 183 return null; 184 } 185 186 public XMLInputStream newXMLInputStream() { 187 return null; 188 } 189 190 public XMLStreamReader newXMLStreamReader() { 191 return null; 192 } 193 194 public String xmlText() { 195 return null; 196 } 197 198 public InputStream newInputStream() { 199 return null; 200 } 201 202 public Reader newReader() { 203 return null; 204 } 205 206 public Node newDomNode() { 207 return null; 208 } 209 210 public Node getDomNode() { 211 return null; 212 } 213 214 public void save(ContentHandler arg0, LexicalHandler arg1) { 215 } 217 218 public void save(File arg0) { 219 } 221 222 public void save(OutputStream arg0) { 223 } 225 226 public void save(Writer arg0) { 227 } 229 230 public XMLInputStream newXMLInputStream(XmlOptions arg0) { 231 return null; 232 } 233 234 public XMLStreamReader newXMLStreamReader(XmlOptions arg0) { 235 return null; 236 } 237 238 public String xmlText(XmlOptions arg0) { 239 return null; 240 } 241 242 public InputStream newInputStream(XmlOptions arg0) { 243 return null; 244 } 245 246 public Reader newReader(XmlOptions arg0) { 247 return null; 248 } 249 250 public Node newDomNode(XmlOptions arg0) { 251 return null; 252 } 253 254 public void save(ContentHandler arg0, LexicalHandler arg1, XmlOptions arg2) { 255 } 257 258 public void save(File arg0, XmlOptions arg1) { 259 } 261 262 public void save(OutputStream arg0, XmlOptions arg1) { 263 } 265 266 public void save(Writer arg0, XmlOptions arg1) { 267 } 269 270 public void dump() { 271 } 273 274 public String toString() { 275 return "<MockApplication: " + this.identity + ">"; 276 } 277 278 public SpringApplication addNewSpring() { 279 throw new ImplementMe(); 280 } 281 282 public SpringApplication getSpring() { 283 throw new ImplementMe(); 284 } 285 286 public boolean isSetSpring() { 287 throw new ImplementMe(); 288 } 289 290 public void setSpring(SpringApplication arg0) { 291 throw new ImplementMe(); 292 } 293 294 public void unsetSpring() { 295 throw new ImplementMe(); 296 } 297 298 public Modules addNewModules() { 299 throw new ImplementMe(); 300 } 301 302 public Modules getModules() { 303 throw new ImplementMe(); 304 } 305 306 public boolean isSetModules() { 307 throw new ImplementMe(); 308 } 309 310 public void setModules(Modules arg0) { 311 throw new ImplementMe(); 312 } 313 314 public void unsetModules() { 315 throw new ImplementMe(); 316 } 317 318 } 319 | Popular Tags |