1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.geronimo.ews.ws4j2ee.toWs.ejb;
17
18 import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
19 import org.apache.geronimo.ews.ws4j2ee.context.j2eeDD.EJBContext;
20 import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
21 import org.apache.geronimo.ews.ws4j2ee.toWs.JavaInterfaceWriter;
22
23 /***
24 * This class can be used to write the appropriate EJB LocalHome interface
25 * class for the given port type.
26 *
27 * @author Rajith Priyanga
28 * @author Srinath Perera
29 * @date Nov 26, 2003
30 */
31 public class EJBLocalHomeWriter extends JavaInterfaceWriter {
32 private String name;
33 protected EJBContext ejbcontext;
34
35 /***
36 * Constructs a EJBLocalHomeWriter.
37 *
38 * @param portType The port type which contains the details.
39 * @throws GenerationFault
40 */
41 public EJBLocalHomeWriter(J2EEWebServiceContext context, EJBContext ejbcontext) throws GenerationFault {
42 super(context, ejbcontext.getEjbLocalHomeInterfce());
43 this.ejbcontext = ejbcontext;
44 }
45
46 protected void writeAttributes() throws GenerationFault {
47 }
48
49 protected void writeMethods() throws GenerationFault {
50 out.write("\tpublic " + ejbcontext.getEjbLocalInterface() + " create()throws javax.ejb.CreateException;\n");
51 }
52
53 protected String getExtendsPart() {
54 return " extends javax.ejb.EJBLocalHome ";
55 }
56
57 }