01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.commons.betwixt.io.read;
18:
19: import org.apache.commons.betwixt.strategy.ActionMappingStrategy;
20:
21: /**
22: * Stores mapping phase configuration settings that apply only for bean reading.
23: *
24: * @author Robert Burrell Donkin
25: * @since 0.5
26: */
27: public class ReadConfiguration {
28:
29: /** Chain used to create beans defaults to BeanCreationChain.createDefaultChain() */
30: private BeanCreationChain beanCreationChain = BeanCreationChain
31: .createDefaultChain();
32: /** Pluggable strategy used to determine free mappings */
33: private ActionMappingStrategy actionMappingStrategy = ActionMappingStrategy.DEFAULT;
34:
35: /**
36: * Gets the BeanCreationChain that should be used to construct beans.
37: * @return the BeanCreationChain to use, not null
38: */
39: public BeanCreationChain getBeanCreationChain() {
40: return beanCreationChain;
41: }
42:
43: /**
44: * Sets the BeanCreationChain that should be used to construct beans.
45: * @param beanCreationChain the BeanCreationChain to use, not null
46: */
47: public void setBeanCreationChain(BeanCreationChain beanCreationChain) {
48: this .beanCreationChain = beanCreationChain;
49: }
50:
51: /**
52: * Gets the <code>ActionMappingStrategy</code> used to define
53: * default mapping actions.
54: * @return <code>ActionMappignStrategy</code>, not null
55: */
56: public ActionMappingStrategy getActionMappingStrategy() {
57: return actionMappingStrategy;
58: }
59:
60: /**
61: * Sets the <code>ActionMappingStrategy</code> used to define
62: * default mapping acitons.
63: * @param actionMappingStrategy <code>ActionMappignStrategy</code>, not null
64: */
65: public void setActionMappingStrategy(
66: ActionMappingStrategy actionMappingStrategy) {
67: this.actionMappingStrategy = actionMappingStrategy;
68: }
69:
70: }
|