Modifier and Type | Field and Description |
---|---|
private Set | addedfiles
Set of files have been loaded into the EJB jar |
public static final String | ANALYZER_CLASS_FULL
The analyzer class for the super analyzer |
public static final String | ANALYZER_CLASS_SUPER
The analyzer class for the super analyzer |
public static final String | ANALYZER_FULL
A dependency analyzer name to find all related classes |
public static final String | ANALYZER_NONE
A dependency analyzer name for no analyzer |
public static final String | ANALYZER_SUPER
A dependency analyzer name to find ancestor classes |
private Path | classpath
The classpath to use with this deployment tool. |
private ClassLoader | classpathLoader
The classloader generated from the given classpath to load the super classes and super interfaces. |
private EjbJar. | config
The configuration from the containing task. |
public static final String | DEFAULT_ANALYZER
The default analyzer |
public static final int | DEFAULT_BUFFER_SIZE
The default buffer byte size to use for IO |
private DependencyAnalyzer | dependencyAnalyzer
Dependency analyzer used to collect class dependencies |
private File | destDir
Stores a handle to the directory to put the Jar files in |
protected static final String | EJB_DD
Name for EJB Deployment descriptor within EJB jars |
private String | genericJarSuffix
Instance variable that stores the suffix for the generated jarfile. |
private DescriptorHandler | handler
Handler used to parse the EJB XML descriptor |
public static final int | JAR_COMPRESS_LEVEL
The level to use for compression |
protected static final String | MANIFEST
The standard MANIFEST file |
protected static final String | META_DIR
The standard META-INF directory in jar files |
private Task | task
The task to which this tool belongs. |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
protected void | addFileToJar(JarOutputStream
A JarOutputStream into which to write the
jar entry. jStream, File A File from which to read the
contents the file being added. inputFile, String A String representing the name, including
all relevant path information, that should be stored for the entry
being added. logicalFilename)Utility method that encapsulates the logic of adding a file entry to a .jar file. |
protected void | addSupportClasses(Hashtable<String, File>
Hashtable of EJB classes (and other) files that will be
added to the completed JAR file ejbFiles)Adds any classes the user specifies using support nested elements
to the |
protected void | addVendorFiles(Hashtable<String, File>
a hashtable entryname -> file. ejbFiles, String a prefix to use. ddPrefix)Add any vendor specific files which should be included in the EJB Jar. |
protected void | checkAndAddDependants(Hashtable<String, File>
files, that are extracted from the deployment descriptor checkEntries)Add all available classes, that depend on Remote, Home, Bean, PK |
protected void | checkConfiguration(String
String representing the file name of an EJB
descriptor to be processed descriptorFileName, SAXParser SAXParser which may be used to parse the XML
descriptor saxParser)This method is called as the first step in the processDescriptor method to allow vendor-specific subclasses to validate the task configuration prior to processing the descriptor. |
public void | configure(EjbJar.
the configuration from the surrounding ejbjar task. configImplements org. |
private void | |
public Path | Returns: a Path instance to be configured by Ant.Add the classpath for the user classes |
protected ClassLoader | Returns: a classloader.Returns a Classloader object which parses the passed in generic EjbJar classpath. |
protected Path | Returns: the combined classpathGet the classpath by combining the one from the surrounding task, if any and the one from this tool. |
protected EjbJar. | |
protected DescriptorHandler | Returns: a handler.the source directory. srcDir)
Deprecated
as a consequence of
Get a descriptionHandler.
DescriptorHandler being deprecated.
|
protected File | Returns: the destination directory into which EJB jars are to be writtenGet the destination directory. |
protected String | Returns: The "basename" which will be used to name the completed JAR fileString representing the file name of an EJB
descriptor to be processed descriptorFileName)Using the EJB descriptor file name passed from the |
protected Location | Returns: the task's location instance.Get the build file location associated with this element's task. |
protected File | Returns: the manifest file or null if the manifest file does not existthe prefix where to llook for the manifest file based on
the naming convention. prefix)Get the manifest file to use for building the generic jar. |
protected String | Returns: Public ID of the DTD specified in the EJB descriptor.Returns the Public ID of the DTD specified in the EJB descriptor. |
protected Task | |
public String | Returns: the prefix.the base name to use. baseName, String the file name to use. descriptorFileName)Get the prefix for vendor deployment descriptors. |
pack-priv File | Returns: Filethe basename to use. baseName)Get the vendor specific name of the Jar that will be output. |
protected void | |
protected boolean | Returns: boolean indicating whether or not thejarFile
is up to dateHashtable of EJB classes (and other) files that will be
added to the completed JAR file ejbFiles, File JAR file which will contain all of the EJB classes (and
other) files jarFile)This method checks the timestamp on each file listed in the |
protected Hashtable | Returns: Hashtable of EJB class (and other) files to be added to the completed JAR fileString representing the file name of an EJB
descriptor to be processed descriptorFileName, SAXParser SAXParser which may be used to parse the XML
descriptor saxParser)This method returns a list of EJB files found when the specified EJB descriptor is parsed and processed. |
public void | processDescriptor(String
the name of the deployment descriptor descriptorFileName, SAXParser a SAX parser which can be used to parse the deployment descriptor. saxParser)Implements org. |
protected void | registerKnownDTDs(DescriptorHandler
no used in this class. handler)
Deprecated
as a consequence of
Register the locations of all known DTDs.
DescriptorHandler being deprecated.
|
public void | setClasspath(Path
the classpath to be used for this build. classpath)Set the classpath to be used for this compilation. |
public void | |
public void | setGenericJarSuffix(String
the string to use as the suffix. inString)Set the suffix for the generated jar file. |
public void | setTask(Task
the Task to which this deployment tool is associated. task)Implements org. |
protected boolean | Returns: true if the name of the generated jar is coming from the basejarname attributeIndicate if this build is using the base jar name. |
public void | validateConfigured()
Implements org. |
protected void |
addedfiles | back to summary |
---|---|
private Set<String> addedfiles Set of files have been loaded into the EJB jar |
ANALYZER_CLASS_FULL | back to summary |
---|---|
public static final String ANALYZER_CLASS_FULL The analyzer class for the super analyzer |
ANALYZER_CLASS_SUPER | back to summary |
---|---|
public static final String ANALYZER_CLASS_SUPER The analyzer class for the super analyzer |
ANALYZER_FULL | back to summary |
---|---|
public static final String ANALYZER_FULL A dependency analyzer name to find all related classes |
ANALYZER_NONE | back to summary |
---|---|
public static final String ANALYZER_NONE A dependency analyzer name for no analyzer |
ANALYZER_SUPER | back to summary |
---|---|
public static final String ANALYZER_SUPER A dependency analyzer name to find ancestor classes |
classpath | back to summary |
---|---|
private Path classpath The classpath to use with this deployment tool. This is appended to any paths from the ejbjar task itself. |
classpathLoader | back to summary |
---|---|
private ClassLoader classpathLoader The classloader generated from the given classpath to load the super classes and super interfaces. |
config | back to summary |
---|---|
private EjbJar. The configuration from the containing task. This config combined with the settings of the individual attributes here constitues the complete config for this deployment tool. |
DEFAULT_ANALYZER | back to summary |
---|---|
public static final String DEFAULT_ANALYZER The default analyzer |
DEFAULT_BUFFER_SIZE | back to summary |
---|---|
public static final int DEFAULT_BUFFER_SIZE The default buffer byte size to use for IO |
dependencyAnalyzer | back to summary |
---|---|
private DependencyAnalyzer dependencyAnalyzer Dependency analyzer used to collect class dependencies |
destDir | back to summary |
---|---|
private File destDir Stores a handle to the directory to put the Jar files in |
EJB_DD | back to summary |
---|---|
protected static final String EJB_DD Name for EJB Deployment descriptor within EJB jars |
genericJarSuffix | back to summary |
---|---|
private String genericJarSuffix Instance variable that stores the suffix for the generated jarfile. |
handler | back to summary |
---|---|
private DescriptorHandler handler
Deprecated as a consequence of Handler used to parse the EJB XML descriptor |
JAR_COMPRESS_LEVEL | back to summary |
---|---|
public static final int JAR_COMPRESS_LEVEL The level to use for compression |
MANIFEST | back to summary |
---|---|
protected static final String MANIFEST The standard MANIFEST file |
META_DIR | back to summary |
---|---|
protected static final String META_DIR The standard META-INF directory in jar files |
task | back to summary |
---|---|
private Task task The task to which this tool belongs. This is used to access services provided by the ant core, such as logging. |
GenericDeploymentTool | back to summary |
---|---|
public GenericDeploymentTool() |
addFileToJar | back to summary |
---|---|
protected void addFileToJar(JarOutputStream jStream, File inputFile, String logicalFilename) throws BuildException Utility method that encapsulates the logic of adding a file entry to a .jar file. Used by execute() to add entries to the jar file as it is constructed.
|
addSupportClasses | back to summary |
---|---|
protected void addSupportClasses(Hashtable<String, File> ejbFiles) Adds any classes the user specifies using support nested elements
to the |
addVendorFiles | back to summary |
---|---|
protected void addVendorFiles(Hashtable<String, File> ejbFiles, String ddPrefix) Add any vendor specific files which should be included in the EJB Jar. |
checkAndAddDependants | back to summary |
---|---|
protected void checkAndAddDependants(Hashtable<String, File> checkEntries) throws BuildException Add all available classes, that depend on Remote, Home, Bean, PK
|
checkConfiguration | back to summary |
---|---|
protected void checkConfiguration(String descriptorFileName, SAXParser saxParser) throws BuildException This method is called as the first step in the processDescriptor method to allow vendor-specific subclasses to validate the task configuration prior to processing the descriptor. If the configuration is invalid, a BuildException should be thrown.
|
configure | back to summary |
---|---|
public void configure(EjbJar. Implements org. Configure this tool for use in the ejbjar task. |
createAnalyzer | back to summary |
---|---|
private void createAnalyzer() |
createClasspath | back to summary |
---|---|
public Path createClasspath() Add the classpath for the user classes
|
getClassLoaderForBuild | back to summary |
---|---|
protected ClassLoader getClassLoaderForBuild() Returns a Classloader object which parses the passed in generic EjbJar classpath. The loader is used to dynamically load classes from javax.ejb.* and the classes being added to the jar.
|
getCombinedClasspath | back to summary |
---|---|
protected Path getCombinedClasspath() Get the classpath by combining the one from the surrounding task, if any and the one from this tool.
|
getConfig | back to summary |
---|---|
protected EjbJar. Get the basename terminator. |
getDescriptorHandler | back to summary |
---|---|
protected DescriptorHandler getDescriptorHandler(File srcDir)
Deprecated as a consequence of Get a descriptionHandler.
|
getDestDir | back to summary |
---|---|
protected File getDestDir() Get the destination directory.
|
getJarBaseName | back to summary |
---|---|
protected String getJarBaseName(String descriptorFileName) Using the EJB descriptor file name passed from the |
getLocation | back to summary |
---|---|
protected Location getLocation() Get the build file location associated with this element's task.
|
getManifestFile | back to summary |
---|---|
protected File getManifestFile(String prefix) Get the manifest file to use for building the generic jar. If the file does not exist the global manifest from the config is used otherwise the default Ant manifest will be used. |
getPublicId | back to summary |
---|---|
protected String getPublicId() Returns the Public ID of the DTD specified in the EJB descriptor. Not
every vendor-specific
|
getTask | back to summary |
---|---|
protected Task getTask() Get the task for this tool.
|
getVendorDDPrefix | back to summary |
---|---|
public String getVendorDDPrefix(String baseName, String descriptorFileName) Get the prefix for vendor deployment descriptors. This will contain the path and the start of the descriptor name, depending on the naming scheme |
getVendorOutputJarFile | back to summary |
---|---|
pack-priv File getVendorOutputJarFile(String baseName) Get the vendor specific name of the Jar that will be output. The modification date of this jar will be checked against the dependent bean classes. |
log | back to summary |
---|---|
protected void log(String message, int level) Log a message to the Ant output.
|
needToRebuild | back to summary |
---|---|
protected boolean needToRebuild(Hashtable<String, File> ejbFiles, File jarFile) This method checks the timestamp on each file listed in the |
parseEjbFiles | back to summary |
---|---|
protected Hashtable This method returns a list of EJB files found when the specified EJB descriptor is parsed and processed.
|
processDescriptor | back to summary |
---|---|
public void processDescriptor(String descriptorFileName, SAXParser saxParser) Implements org. Doc from org. Process a deployment descriptor, generating the necessary vendor specific deployment files.. |
registerKnownDTDs | back to summary |
---|---|
protected void registerKnownDTDs(DescriptorHandler handler)
Deprecated as a consequence of Register the locations of all known DTDs. vendor-specific subclasses should override this method to define the vendor-specific locations of the EJB DTDs
|
setClasspath | back to summary |
---|---|
public void setClasspath(Path classpath) Set the classpath to be used for this compilation.
|
setDestdir | back to summary |
---|---|
public void setDestdir(File inDir) Set the destination directory; required.
|
setGenericJarSuffix | back to summary |
---|---|
public void setGenericJarSuffix(String inString) Set the suffix for the generated jar file.
|
setTask | back to summary |
---|---|
public void setTask(Task task) Implements org. Set the task which owns this tool |
usingBaseJarName | back to summary |
---|---|
protected boolean usingBaseJarName() Indicate if this build is using the base jar name.
|
validateConfigured | back to summary |
---|---|
public void validateConfigured() throws BuildException Implements org. Called to validate that the tool parameters have been configured.
|
writeJar | back to summary |
---|---|
protected void writeJar(String baseName, File jarfile, Hashtable<String, File> files, String publicId) throws BuildException Method used to encapsulate the writing of the JAR file. Iterates over the filenames/java.io.Files in the Hashtable stored on the instance variable ejbFiles. |