KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > beans > factory > xml > DocumentDefaultsDefinition


1 /*
2  * Copyright 2002-2007 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.beans.factory.xml;
18
19 import org.springframework.beans.factory.parsing.DefaultsDefinition;
20
21 /**
22  * Simple JavaBean that holds the defaults specified at the <code>%lt;beans&gt;</code>
23  * level in a standard Spring XML bean definition document:
24  * <code>default-lazy-init</code>, <code>default-autowire</code>, etc
25  *
26  * @author Juergen Hoeller
27  * @since 2.0.2
28  */

29 public class DocumentDefaultsDefinition implements DefaultsDefinition {
30
31     private String JavaDoc lazyInit;
32
33     private String JavaDoc autowire;
34
35     private String JavaDoc dependencyCheck;
36
37     private String JavaDoc initMethod;
38
39     private String JavaDoc destroyMethod;
40
41     private String JavaDoc merge;
42
43     private Object JavaDoc source;
44
45
46     /**
47      * Set the default lazy-init flag for the document that's currently parsed.
48      */

49     public void setLazyInit(String JavaDoc lazyInit) {
50         this.lazyInit = lazyInit;
51     }
52
53     /**
54      * Return the default lazy-init flag for the document that's currently parsed.
55      */

56     public String JavaDoc getLazyInit() {
57         return this.lazyInit;
58     }
59
60     /**
61      * Set the default autowire setting for the document that's currently parsed.
62      */

63     public void setAutowire(String JavaDoc autowire) {
64         this.autowire = autowire;
65     }
66
67     /**
68      * Return the default autowire setting for the document that's currently parsed.
69      */

70     public String JavaDoc getAutowire() {
71         return this.autowire;
72     }
73
74     /**
75      * Set the default dependency-check setting for the document that's currently parsed.
76      */

77     public void setDependencyCheck(String JavaDoc dependencyCheck) {
78         this.dependencyCheck = dependencyCheck;
79     }
80
81     /**
82      * Return the default dependency-check setting for the document that's currently parsed.
83      */

84     public String JavaDoc getDependencyCheck() {
85         return this.dependencyCheck;
86     }
87
88     /**
89      * Set the default init-method setting for the document that's currently parsed.
90      */

91     public void setInitMethod(String JavaDoc initMethod) {
92         this.initMethod = initMethod;
93     }
94
95     /**
96      * Return the default init-method setting for the document that's currently parsed.
97      */

98     public String JavaDoc getInitMethod() {
99         return this.initMethod;
100     }
101
102     /**
103      * Set the default destroy-method setting for the document that's currently parsed.
104      */

105     public void setDestroyMethod(String JavaDoc destroyMethod) {
106         this.destroyMethod = destroyMethod;
107     }
108
109     /**
110      * Return the default destroy-method setting for the document that's currently parsed.
111      */

112     public String JavaDoc getDestroyMethod() {
113         return this.destroyMethod;
114     }
115
116     /**
117      * Set the default merge setting for the document that's currently parsed.
118      */

119     public void setMerge(String JavaDoc merge) {
120         this.merge = merge;
121     }
122
123     /**
124      * Return the default merge setting for the document that's currently parsed.
125      */

126     public String JavaDoc getMerge() {
127         return this.merge;
128     }
129
130
131     /**
132      * Set the configuration source <code>Object</code> for this metadata element.
133      * <p>The exact type of the object will depend on the configuration mechanism used.
134      */

135     public void setSource(Object JavaDoc source) {
136         this.source = source;
137     }
138
139     public Object JavaDoc getSource() {
140         return this.source;
141     }
142
143 }
144
Popular Tags