View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    * 
9    *      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.createDefaultChain();
31      /** Pluggable strategy used to determine free mappings */
32      private ActionMappingStrategy actionMappingStrategy = ActionMappingStrategy.DEFAULT;
33      
34      /**
35        * Gets the BeanCreationChain that should be used to construct beans.
36        * @return the BeanCreationChain to use, not null
37        */
38      public BeanCreationChain getBeanCreationChain() {
39          return beanCreationChain;
40      }
41      
42      /**
43        * Sets the BeanCreationChain that should be used to construct beans.
44        * @param beanCreationChain the BeanCreationChain to use, not null
45        */
46      public void setBeanCreationChain( BeanCreationChain beanCreationChain ) {
47          this.beanCreationChain = beanCreationChain;
48      }
49      
50      /**
51       * Gets the <code>ActionMappingStrategy</code> used to define
52       * default mapping actions. 
53       * @return <code>ActionMappignStrategy</code>, not null
54       */
55      public ActionMappingStrategy getActionMappingStrategy() {
56          return actionMappingStrategy;
57      }
58  
59     /**
60      * Sets the <code>ActionMappingStrategy</code> used to define
61      * default mapping acitons.
62      * @param actionMappingStrategy <code>ActionMappignStrategy</code>, not null
63      */
64      public void setActionMappingStrategy(ActionMappingStrategy actionMappingStrategy) {
65          this.actionMappingStrategy = actionMappingStrategy;
66      }
67  
68  }