1 /** 2 * JORM: an implementation of a generic mapping system for persistent Java 3 * objects. Two mapping are supported: to RDBMS and to binary files. 4 * Copyright (C) 2001-2003 France Telecom R&D - INRIA 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * 20 * Contact: jorm-team@objectweb.org 21 * 22 */ 23 24 package org.objectweb.jorm.compiler.api; 25 26 import org.objectweb.jorm.api.PException; 27 import org.objectweb.jorm.api.JormConfigurator; 28 import org.objectweb.jorm.generator.api.Generator; 29 import org.objectweb.jorm.generator.api.MOPFactory; 30 import org.objectweb.jorm.verifier.api.MappingVerifier; 31 import org.objectweb.jorm.verifier.api.Verifier; 32 33 import java.io.InputStream; 34 35 /** 36 * Used to hold the configuration information related to a JORM compiler 37 * instance. 38 * @author P. Dechamboux 39 */ 40 public interface JormCompilerConfigurator extends JormConfigurator { 41 final String LOGGER_NAME = "org.objectweb.jorm.compiler.config"; 42 final String DEFAULT_JORM_CONFIGURATION_FILE = "jorm.properties"; 43 final String USE_CONTEXT_CLASSLOADER = "use.context.classloader"; 44 45 /** 46 * Gets the verifier to be used by JORM. 47 * @return That verifier. 48 */ 49 Verifier getVerifier() throws PException; 50 51 /** 52 * Gets the generator to be used by JORM. 53 * @return That generator. 54 */ 55 Generator getGenerator() throws PException; 56 57 /** 58 * Gets the name to be used for the compiler options file. 59 * @return That name. 60 */ 61 String getJormcOptsFile() throws PException; 62 63 /** 64 * Gets the MOP factory associated with the given mapper. 65 * @param mappername The name of the concerned mapper. 66 * @return The MOPFactory object. 67 * @throws PException 68 */ 69 MOPFactory getMOPFactory(String mappername) throws PException; 70 71 /** 72 * Gets an InputStream for reading the global compiler parameters. 73 * @return The allocated InputStream. 74 * @throws PException 75 */ 76 InputStream getGlobalJormcOptsFile() throws PException; 77 78 /** 79 * Gets the verifier associated with the given mapper. 80 * @param mappername The name of the concerned mapper. 81 * @return The MappingVerifier object. 82 * @throws PException 83 */ 84 MappingVerifier getMappingVerifier(String mappername) throws PException; 85 } 86