Index: topia/src/java/org/codelutin/topia/generators/ejb/jonas/ObjectModelToJOnASEJBJARFileGenerator.java diff -u /dev/null topia/src/java/org/codelutin/topia/generators/ejb/jonas/ObjectModelToJOnASEJBJARFileGenerator.java:1.6 --- /dev/null Fri Jul 30 14:39:04 2004 +++ topia/src/java/org/codelutin/topia/generators/ejb/jonas/ObjectModelToJOnASEJBJARFileGenerator.java Fri Jul 30 14:38:59 2004 @@ -0,0 +1,82 @@ +/* *##% + * Copyright (C) 2002, 2003, 2004 + * Code Lutin, Cédric Pineau, Benjamin Poussin + * Initial Work of Ye Fang & Zhou Kun (trainee at Code Lutin, summer 2004) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * ObjectModelToJOnASEJBJARFileGenerator.java + * + * Created: 14 janv. 2004 + * + * @author Cédric Pineau + * @version $Revision: 1.6 $ + * + * Last update : $Date: 2004/07/30 14:38:59 $ + * by : $Author: pineau $ + */ + package org.codelutin.topia.generators.ejb.jonas; + +import java.io.IOException; +import java.io.Writer; +import java.util.Iterator; + +import org.codelutin.generator.ObjectModelGenerator; +import org.codelutin.generator.models.object.ObjectModel; +import org.codelutin.generator.models.object.ObjectModelClass; +import org.codelutin.topia.generators.Util; + +/** +* +*/ +public class ObjectModelToJOnASEJBJARFileGenerator extends ObjectModelGenerator { + + + public String getFilenameForModel(ObjectModel model) { + return "META-INF/jonas-ejb-jar.xml"; + } + + + public void generateFromModel(Writer output, ObjectModel model) throws IOException { +// ------------- start +/*{ + + +}*/ + Iterator classes = model.getClasses().iterator(); + while (classes.hasNext()) { + ObjectModelClass clazz = (ObjectModelClass) classes.next(); + generate(output, clazz); + } + + } + + public void generate(Writer output, ObjectModelClass clazz) throws IOException{ + if(! Util.isService(clazz)) return; + +/*{ + + +<%=clazz.getPackageName()%>.<%=clazz.getName()%> +<%=clazz.getPackageName()%>.<%=clazz.getName()%> + + +}*/ + } +} + +