01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.config.schema.test;
05:
06: import com.tc.config.schema.builder.DSOApplicationConfigBuilder;
07: import com.tc.config.schema.builder.SpringConfigBuilder;
08:
09: public class ApplicationConfigBuilder extends BaseConfigBuilder {
10:
11: public ApplicationConfigBuilder() {
12: super (1, ALL_PROPERTIES);
13: }
14:
15: public void setDSO(String value) {
16: setProperty("dso", value);
17: }
18:
19: public void setDSO(DSOApplicationConfigBuilder value) {
20: setProperty("dso", value);
21: }
22:
23: public DSOApplicationConfigBuilder getDSO() {
24: if (!isSet("dso"))
25: setDSO(DSOApplicationConfigBuilderImpl.newMinimalInstance());
26: return (DSOApplicationConfigBuilder) getRawProperty("dso");
27: }
28:
29: public void setSpring(String value) {
30: setProperty("spring", value);
31: }
32:
33: public void setSpring(SpringConfigBuilder value) {
34: setProperty("spring", value);
35: }
36:
37: public SpringConfigBuilder getSpring() {
38: if (!isSet("spring"))
39: setSpring(SpringConfigBuilderImpl.newMinimalInstance());
40: return (SpringConfigBuilder) getRawProperty("spring");
41: }
42:
43: private static final String[] ALL_PROPERTIES = new String[] {
44: "dso", "spring" };
45:
46: public String toString() {
47: return elements(ALL_PROPERTIES);
48: }
49:
50: public static ApplicationConfigBuilder newMinimalInstance() {
51: return new ApplicationConfigBuilder();
52: }
53:
54: }
|