001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     * 
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     * 
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */ 
017    package org.apache.commons.betwixt.io.read;
018    
019    import org.apache.commons.betwixt.strategy.ActionMappingStrategy;
020    
021    /**  
022      * Stores mapping phase configuration settings that apply only for bean reading.
023      *
024      * @author Robert Burrell Donkin
025      * @since 0.5
026      */
027    public class ReadConfiguration {
028        
029        /** Chain used to create beans defaults to BeanCreationChain.createDefaultChain() */
030        private BeanCreationChain beanCreationChain = BeanCreationChain.createDefaultChain();
031        /** Pluggable strategy used to determine free mappings */
032        private ActionMappingStrategy actionMappingStrategy = ActionMappingStrategy.DEFAULT;
033        
034        /**
035          * Gets the BeanCreationChain that should be used to construct beans.
036          * @return the BeanCreationChain to use, not null
037          */
038        public BeanCreationChain getBeanCreationChain() {
039            return beanCreationChain;
040        }
041        
042        /**
043          * Sets the BeanCreationChain that should be used to construct beans.
044          * @param beanCreationChain the BeanCreationChain to use, not null
045          */
046        public void setBeanCreationChain( BeanCreationChain beanCreationChain ) {
047            this.beanCreationChain = beanCreationChain;
048        }
049        
050        /**
051         * Gets the <code>ActionMappingStrategy</code> used to define
052         * default mapping actions. 
053         * @return <code>ActionMappignStrategy</code>, not null
054         */
055        public ActionMappingStrategy getActionMappingStrategy() {
056            return actionMappingStrategy;
057        }
058    
059       /**
060        * Sets the <code>ActionMappingStrategy</code> used to define
061        * default mapping acitons.
062        * @param actionMappingStrategy <code>ActionMappignStrategy</code>, not null
063        */
064        public void setActionMappingStrategy(ActionMappingStrategy actionMappingStrategy) {
065            this.actionMappingStrategy = actionMappingStrategy;
066        }
067    
068    }