View Javadoc
1   /*
2    * Copyright 2005 Werner Guttmann
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5    * in compliance with the License. You may obtain a copy of the License at
6    *
7    * http://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software distributed under the License
10   * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11   * or implied. See the License for the specific language governing permissions and limitations under
12   * the License.
13   */
14  package org.castor.mapping;
15  
16  import org.exolab.castor.mapping.MappingException;
17  import org.exolab.castor.mapping.MappingLoader;
18  
19  /**
20   * A factory for properly acquiring <tt>org.exolab.castor.mapping.MappingLoader</tt> instances. To
21   * provide an implementation for a specific MappingLoader, implement this interface.
22   *
23   * @author <a href=" mailto:werner DOT guttmann AT gmx DOT net">Werner Guttmann</a>
24   * @version $Revision: 5951 $ $Date: 2005-12-19 15:48:30 -0700 (Mon, 19 Dec 2005) $
25   * @since 1.0.4
26   */
27  public interface MappingLoaderFactory {
28  
29    /**
30     * Returns the short alias for this factory instance.
31     * 
32     * @return The short alias name.
33     */
34    String getName();
35  
36    /**
37     * Acquires the appropriate <tt>org.exolab.castor.mapping.MappingLoader</tt> with the given
38     * properties.
39     * 
40     * @return The transaction manager.
41     * @throws MappingException If any failure occured when loading the MappingLoader.
42     */
43    MappingLoader getMappingLoader() throws MappingException;
44  
45    /**
46     * Defines the source type of the underlying MappingLoader
47     * 
48     * @return The source type.
49     */
50    String getSourceType();
51  
52    /**
53     * Defines the binding type of the underlying MappingLoader.
54     * 
55     * @return the binding type of the underlying MappingLoader
56     */
57    BindingType getBindingType();
58  
59  }