Index: topia/src/java/org/codelutin/topia/generators/ejb/jboss/ObjectModelToJBossEJBJARFileGenerator.java diff -u /dev/null topia/src/java/org/codelutin/topia/generators/ejb/jboss/ObjectModelToJBossEJBJARFileGenerator.java:1.1 --- /dev/null Sat Feb 5 10:47:14 2005 +++ topia/src/java/org/codelutin/topia/generators/ejb/jboss/ObjectModelToJBossEJBJARFileGenerator.java Sat Feb 5 10:47:09 2005 @@ -0,0 +1,93 @@ +/* *##% + * 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.1 $ + * + * Last update : $Date: 2005/02/05 10:47:09 $ + * by : $Author: pineau $ + */ + package org.codelutin.topia.generators.ejb.jboss; + +import java.io.IOException; +import java.io.Writer; +import java.util.Iterator; + +import org.codelutin.generator.Generator; +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 ObjectModelToJBossEJBJARFileGenerator extends ObjectModelGenerator { + + public ObjectModelToJBossEJBJARFileGenerator(Generator parent){ + super(parent); + } + + public ObjectModelToJBossEJBJARFileGenerator(){ + super(); + } + + public String getFilenameForModel(ObjectModel model) { + return "application/META-INF/jboss.xml"; + } + + + public void generateFromModel(Writer output, ObjectModel model) throws IOException { +// ------------- start +/*{ + + + + + org.codelutin.topia.persistence.ejb.PersistenceHelperSB + PersistenceHelperSB + +}*/ + 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()%> + +}*/ + } +} \ No newline at end of file