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 Home 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 EJBHomeWriter extends JavaInterfaceWriter {
32 private String name;
33 protected EJBContext ejbcontext;
34
35 /***
36 * Constructs a EJBHomeWriter.
37 *
38 * @param portType The port type which contains the details.
39 * @throws GenerationFault
40 */
41 public EJBHomeWriter(J2EEWebServiceContext context, EJBContext ejbcontext) throws GenerationFault {
42 super(context, ejbcontext.getEjbhomeInterface());
43 this.ejbcontext = ejbcontext;
44 }
45
46 /***
47 // * Returns the complete file name of the source code file which is
48 // * generated by the writer.
49 // */
50
51
52
53
54
55
56
57
58
59 protected void writeAttributes() throws GenerationFault {
60 }
61
62 protected void writeMethods() throws GenerationFault {
63 out.write("\tpublic " + ejbcontext.getEjbRemoteInterface() + " create()throws java.rmi.RemoteException,javax.ejb.CreateException;\n");
64 }
65
66 protected String getExtendsPart() {
67 return " extends javax.ejb.EJBHome";
68 }
69
70 }