1 /* 2 * Copyright 2005 Werner Guttmann 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.castor.mapping; 17 18 import org.exolab.castor.mapping.MappingException; 19 import org.exolab.castor.mapping.MappingLoader; 20 21 /** 22 * A factory for properly acquiring <tt>org.exolab.castor.mapping.MappingLoader</tt> 23 * instances. To provide an implementation for a specific MappingLoader, 24 * implement this interface. 25 * 26 * @author <a href=" mailto:werner DOT guttmann AT gmx DOT net">Werner Guttmann</a> 27 * @version $Revision: 5951 $ $Date: 2005-12-19 15:48:30 -0700 (Mon, 19 Dec 2005) $ 28 * @since 1.0.4 29 */ 30 public interface MappingLoaderFactory { 31 32 /** 33 * Returns the short alias for this factory instance. 34 * 35 * @return The short alias name. 36 */ 37 String getName(); 38 39 /** 40 * Acquires the appropriate <tt>org.exolab.castor.mapping.MappingLoader</tt> with the 41 * given properties. 42 * 43 * @return The transaction manager. 44 * @throws MappingException If any failure occured when loading 45 * the MappingLoader. 46 */ 47 MappingLoader getMappingLoader() 48 throws MappingException; 49 50 /** 51 * Defines the source type of the underlying MappingLoader 52 * @return The source type. 53 */ 54 String getSourceType(); 55 56 /** 57 * Defines the binding type of the underlying MappingLoader. 58 * @return the binding type of the underlying MappingLoader 59 */ 60 BindingType getBindingType(); 61 62 }