001: /*
002: * Copyright 2002-2007 the original author or authors.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016:
017: package org.springframework.beans.factory.xml;
018:
019: import org.springframework.beans.factory.parsing.DefaultsDefinition;
020:
021: /**
022: * Simple JavaBean that holds the defaults specified at the <code>%lt;beans></code>
023: * level in a standard Spring XML bean definition document:
024: * <code>default-lazy-init</code>, <code>default-autowire</code>, etc
025: *
026: * @author Juergen Hoeller
027: * @since 2.0.2
028: */
029: public class DocumentDefaultsDefinition implements DefaultsDefinition {
030:
031: private String lazyInit;
032:
033: private String autowire;
034:
035: private String dependencyCheck;
036:
037: private String initMethod;
038:
039: private String destroyMethod;
040:
041: private String merge;
042:
043: private Object source;
044:
045: /**
046: * Set the default lazy-init flag for the document that's currently parsed.
047: */
048: public void setLazyInit(String lazyInit) {
049: this .lazyInit = lazyInit;
050: }
051:
052: /**
053: * Return the default lazy-init flag for the document that's currently parsed.
054: */
055: public String getLazyInit() {
056: return this .lazyInit;
057: }
058:
059: /**
060: * Set the default autowire setting for the document that's currently parsed.
061: */
062: public void setAutowire(String autowire) {
063: this .autowire = autowire;
064: }
065:
066: /**
067: * Return the default autowire setting for the document that's currently parsed.
068: */
069: public String getAutowire() {
070: return this .autowire;
071: }
072:
073: /**
074: * Set the default dependency-check setting for the document that's currently parsed.
075: */
076: public void setDependencyCheck(String dependencyCheck) {
077: this .dependencyCheck = dependencyCheck;
078: }
079:
080: /**
081: * Return the default dependency-check setting for the document that's currently parsed.
082: */
083: public String getDependencyCheck() {
084: return this .dependencyCheck;
085: }
086:
087: /**
088: * Set the default init-method setting for the document that's currently parsed.
089: */
090: public void setInitMethod(String initMethod) {
091: this .initMethod = initMethod;
092: }
093:
094: /**
095: * Return the default init-method setting for the document that's currently parsed.
096: */
097: public String getInitMethod() {
098: return this .initMethod;
099: }
100:
101: /**
102: * Set the default destroy-method setting for the document that's currently parsed.
103: */
104: public void setDestroyMethod(String destroyMethod) {
105: this .destroyMethod = destroyMethod;
106: }
107:
108: /**
109: * Return the default destroy-method setting for the document that's currently parsed.
110: */
111: public String getDestroyMethod() {
112: return this .destroyMethod;
113: }
114:
115: /**
116: * Set the default merge setting for the document that's currently parsed.
117: */
118: public void setMerge(String merge) {
119: this .merge = merge;
120: }
121:
122: /**
123: * Return the default merge setting for the document that's currently parsed.
124: */
125: public String getMerge() {
126: return this .merge;
127: }
128:
129: /**
130: * Set the configuration source <code>Object</code> for this metadata element.
131: * <p>The exact type of the object will depend on the configuration mechanism used.
132: */
133: public void setSource(Object source) {
134: this .source = source;
135: }
136:
137: public Object getSource() {
138: return this.source;
139: }
140:
141: }
|