org.openejb.webadmin.ejbgen
Class EJBTemplate

java.lang.Object
  extended by org.openejb.webadmin.ejbgen.EJBTemplate
Direct Known Subclasses:
BMPBean, CMPBean, StatefulBean, StatelessBean

public abstract class EJBTemplate
extends java.lang.Object


Constructor Summary
EJBTemplate()
           
 
Method Summary
 void buildZipFile()
          This will build a zip file for all the files built by the EJB Generator
 void createBackup()
          This method backs up all structure and classes for the EJB if there are already classes in the save location with the same name.
abstract  void createBenCode()
           
 void createClass(java.lang.String ejbname, java.lang.String ejbobj)
          This method actually creates the file for the proper class.
abstract  void createEJB()
           
abstract  void createEJBXML()
           
abstract  void createHmeCode()
           
abstract  void createObjCode()
           
 void createPackage()
          This method creates the directory structure to fit the same structure as the package input by the user.
 void createXML(java.lang.String filename, java.lang.String code)
          Same as writeClass() method but it creates the structure and files that are XML Files.
 java.lang.String getBeanDir()
          This method is used to get the path to where the EJB Template's source is stored locally on the computer.
 void setVars(java.lang.String ejbname, java.lang.String ejbdesc, java.lang.String ejbauth, java.lang.String ejbpack, java.lang.String ejbsloc, java.lang.String ejbstyp)
          The setVars method will initialize all String variables needed for the methods in this class.
 void writeClass(java.lang.String filename, java.lang.String code)
          This method does the writing to the class created by the createClass() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJBTemplate

public EJBTemplate()
Method Detail

createEJB

public abstract void createEJB()

createEJBXML

public abstract void createEJBXML()

createObjCode

public abstract void createObjCode()

createHmeCode

public abstract void createHmeCode()

createBenCode

public abstract void createBenCode()

setVars

public void setVars(java.lang.String ejbname,
                    java.lang.String ejbdesc,
                    java.lang.String ejbauth,
                    java.lang.String ejbpack,
                    java.lang.String ejbsloc,
                    java.lang.String ejbstyp)
The setVars method will initialize all String variables needed for the methods in this class.

Parameters:
ejbname - the ejb's name
ejbdesc - the ejb's description
ejbauth - the ejb's author
ejbpack - the ejb's package
ejbsloc - the ejb's save location

createBackup

public void createBackup()
This method backs up all structure and classes for the EJB if there are already classes in the save location with the same name.


createPackage

public void createPackage()
This method creates the directory structure to fit the same structure as the package input by the user.


createClass

public void createClass(java.lang.String ejbname,
                        java.lang.String ejbobj)
This method actually creates the file for the proper class. It's results depend on what is passed to it. It concats the two parameters together to form a single file name.

Parameters:
ejbname - the name of the class
ejbobj - the type of the class

writeClass

public void writeClass(java.lang.String filename,
                       java.lang.String code)
This method does the writing to the class created by the createClass() method. It will create a File object of the filename passed and write code to it as passed by code.

Parameters:
filename - the filename in String datatype
code - the code to be written to the filename

createXML

public void createXML(java.lang.String filename,
                      java.lang.String code)
Same as writeClass() method but it creates the structure and files that are XML Files.

Parameters:
filename - the filename in String datatype
code - the code to be written to the filename

buildZipFile

public void buildZipFile()
This will build a zip file for all the files built by the EJB Generator


getBeanDir

public java.lang.String getBeanDir()
This method is used to get the path to where the EJB Template's source is stored locally on the computer.

Returns:
Returns the full path to the local directory


Copyright © 1999-2011 OpenEJB. All Rights Reserved.