|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool
A deployment tool which creates generic EJB jars. Generic jars contains only those classes and META-INF entries specified in the EJB 1.1 standard This class is also used as a framework for the creation of vendor specific deployment tools. A number of template methods are provided through which the vendor specific tool can hook into the EJB creation process.
Field Summary | |
protected static java.lang.String |
EJB_DD
|
protected static java.lang.String |
META_DIR
Private constants that are used when constructing the standard jarfile |
Constructor Summary | |
GenericDeploymentTool()
|
Method Summary | |
protected void |
addFileToJar(java.util.jar.JarOutputStream jStream,
java.io.File inputFile,
java.lang.String logicalFilename)
Utility method that encapsulates the logic of adding a file entry to a .jar file. |
protected void |
addVendorFiles(java.util.Hashtable ejbFiles,
java.lang.String baseName)
Add any vendor specific files which should be included in the EJB Jar. |
protected void |
checkAndAddInherited(java.util.Hashtable checkEntries)
Check if a EJB Class Inherits from a Superclass, and if a Remote Interface extends an interface other then javax.ejb.EJBObject directly. |
void |
configure(org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.Config config)
Configure this tool for use in the ejbjar task. |
Path |
createClasspath()
Add the classpath for the user classes |
protected java.lang.ClassLoader |
getClassLoaderForBuild()
Returns a Classloader object which parses the passed in generic EjbJar classpath. |
protected Path |
getCombinedClasspath()
Get the classpath by combining the one from the surrounding task, if any and the one from tis tool. |
protected org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.Config |
getConfig()
Get the basename terminator. |
protected DescriptorHandler |
getDescriptorHandler(java.io.File srcDir)
|
protected java.io.File |
getDestDir()
Get the desitination directory. |
protected Task |
getTask()
Get the task for this tool. |
protected void |
log(java.lang.String message,
int level)
|
void |
processDescriptor(java.lang.String descriptorFileName,
javax.xml.parsers.SAXParser saxParser)
Process a deployment descriptor, generating the necessary vendor specific deployment files. |
void |
setClasspath(Path classpath)
Set the classpath to be used for this compilation. |
void |
setDestdir(java.io.File inDir)
Setter used to store the value of destination directory prior to execute() being called. |
void |
setGenericJarSuffix(java.lang.String inString)
Setter used to store the suffix for the generated jar file. |
void |
setTask(Task task)
Set the task which owns this tool |
protected boolean |
usingBaseJarName()
Returns true, if the meta-inf dir is being explicitly set, false otherwise. |
void |
validateConfigured()
Called to validate that the tool parameters have been configured. |
protected void |
writeJar(java.lang.String baseName,
java.io.File jarfile,
java.util.Hashtable files)
Method used to encapsulate the writing of the JAR file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String META_DIR
protected static final java.lang.String EJB_DD
Constructor Detail |
public GenericDeploymentTool()
Method Detail |
public void setDestdir(java.io.File inDir)
inDir
- the destination directory.protected java.io.File getDestDir()
public void setTask(Task task)
setTask
in interface EJBDeploymentTool
protected Task getTask()
protected org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.Config getConfig()
protected boolean usingBaseJarName()
public void setGenericJarSuffix(java.lang.String inString)
inString
- the string to use as the suffix.public Path createClasspath()
public void setClasspath(Path classpath)
protected Path getCombinedClasspath()
protected void log(java.lang.String message, int level)
public void configure(org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.Config config)
configure
in interface EJBDeploymentTool
protected void addFileToJar(java.util.jar.JarOutputStream jStream, java.io.File inputFile, java.lang.String logicalFilename) throws BuildException
jStream
- A JarOutputStream into which to write the
jar entry.inputFile
- A File from which to read the
contents the file being added.logicalFilename
- A String representing the name, including
all relevant path information, that should be stored for the entry
being added.protected DescriptorHandler getDescriptorHandler(java.io.File srcDir)
public void processDescriptor(java.lang.String descriptorFileName, javax.xml.parsers.SAXParser saxParser)
EJBDeploymentTool
processDescriptor
in interface EJBDeploymentTool
org.apache.tools.ant.taskdefs.optional.ejb.EJBDeploymentTool
descriptorFilename
- the name of the deployment descriptorsaxParser
- a SAX parser which can be used to parse the deployment descriptor.protected void addVendorFiles(java.util.Hashtable ejbFiles, java.lang.String baseName)
protected void writeJar(java.lang.String baseName, java.io.File jarfile, java.util.Hashtable files) throws BuildException
protected void checkAndAddInherited(java.util.Hashtable checkEntries) throws BuildException
protected java.lang.ClassLoader getClassLoaderForBuild()
public void validateConfigured() throws BuildException
validateConfigured
in interface EJBDeploymentTool
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |