KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > betwixt > io > read > ReadConfiguration


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
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 package org.apache.commons.betwixt.io.read;
17
18 import org.apache.commons.betwixt.strategy.ActionMappingStrategy;
19
20 /**
21   * Stores mapping phase configuration settings that apply only for bean reading.
22   *
23   * @author Robert Burrell Donkin
24   * @since 0.5
25   */

26 public class ReadConfiguration {
27     
28     /** Chain used to create beans defaults to BeanCreationChain.createDefaultChain() */
29     private BeanCreationChain beanCreationChain = BeanCreationChain.createDefaultChain();
30     /** Pluggable strategy used to determine free mappings */
31     private ActionMappingStrategy actionMappingStrategy = ActionMappingStrategy.DEFAULT;
32     
33     /**
34       * Gets the BeanCreationChain that should be used to construct beans.
35       * @return the BeanCreationChain to use, not null
36       */

37     public BeanCreationChain getBeanCreationChain() {
38         return beanCreationChain;
39     }
40     
41     /**
42       * Sets the BeanCreationChain that should be used to construct beans.
43       * @param beanCreationChain the BeanCreationChain to use, not null
44       */

45     public void setBeanCreationChain( BeanCreationChain beanCreationChain ) {
46         this.beanCreationChain = beanCreationChain;
47     }
48     
49     /**
50      * Gets the <code>ActionMappingStrategy</code> used to define
51      * default mapping actions.
52      * @return <code>ActionMappignStrategy</code>, not null
53      */

54     public ActionMappingStrategy getActionMappingStrategy() {
55         return actionMappingStrategy;
56     }
57
58    /**
59     * Sets the <code>ActionMappingStrategy</code> used to define
60     * default mapping acitons.
61     * @param actionMappingStrategy <code>ActionMappignStrategy</code>, not null
62     */

63     public void setActionMappingStrategy(ActionMappingStrategy actionMappingStrategy) {
64         this.actionMappingStrategy = actionMappingStrategy;
65     }
66
67 }
68
Popular Tags