Java Doc for GenericDeploymentTool.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » ant » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » JOnAS 4.8.6 » org.objectweb.jonas.ant 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.objectweb.jonas.ant.GenericDeploymentTool

All known Subclasses:   org.objectweb.jonas.ant.JonasDeploymentTool,
GenericDeploymentTool
public class GenericDeploymentTool implements EJBDeploymentTool(Code)


Field Summary
final public static  StringANALYZER_CLASS_FULL
    
final public static  StringANALYZER_CLASS_SUPER
    
final public static  StringANALYZER_FULL
    
final public static  StringANALYZER_NONE
    
final public static  StringANALYZER_SUPER
    
final public static  StringDEFAULT_ANALYZER
    
final protected static  StringEJB_DD
    
final protected static  StringMANIFEST
    
final protected static  StringMETA_DIR
    

Constructor Summary
public  GenericDeploymentTool()
    

Method Summary
protected  voidaddFileToJar(JarOutputStream jStream, File inputFile, String logicalFilename)
     Utility method that encapsulates the logic of adding a file entry to a .jar file.
protected  voidaddSupportClasses(Hashtable ejbFiles)
     Adds any classes the user specifies using support nested elements to the ejbFiles Hashtable.
protected  voidaddVendorFiles(Hashtable ejbFiles, String ddPrefix)
     Add any vendor specific files which should be included in the EJB Jar.
protected  voidcheckAndAddDependants(Hashtable checkEntries)
    
protected  voidcheckConfiguration(String descriptorFileName, SAXParser 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  voidconfigure(EjbJar.Config config)
     Configure this tool for use in the ejbjar task.
public  PathcreateClasspath()
    
protected  ClassLoadergetClassLoaderForBuild()
     Returns a Classloader object which parses the passed in generic EjbJar classpath.
protected  PathgetCombinedClasspath()
     Get the classpath by combining the one from the surrounding task, if any and the one from this tool.
protected  EjbJar.ConfiggetConfig()
     Get the basename terminator.
protected  DescriptorHandlergetDescriptorHandler(File srcDir)
    
protected  FilegetDestDir()
     Get the destination directory.
protected  StringgetJarBaseName(String descriptorFileName)
     Using the EJB descriptor file name passed from the ejbjar task, this method returns the "basename" which will be used to name the completed JAR file.
protected  LocationgetLocation()
     Get the build file location associated with this element's task.
protected  FilegetManifestFile(String prefix)
     Get the manifets 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.
Parameters:
  prefix - the prefix where to llook for the manifest file based onthe naming convention.
protected  StringgetPublicId()
     Returns the Public ID of the DTD specified in the EJB descriptor.
protected  TaskgetTask()
     Get the task for this tool.
public  StringgetVendorDDPrefix(String baseName, String descriptorFileName)
     Get the prefix for vendor deployment descriptors.
 FilegetVendorOutputJarFile(String baseName)
     Get the vendor specific name of the Jar that will be output.
protected  voidlog(String message, int level)
     Log a message to the Ant output.
protected  booleanneedToRebuild(Hashtable ejbFiles, File jarFile)
     This method checks the timestamp on each file listed in the ejbFiles and compares them to the timestamp on the jarFile .
protected  HashtableparseEjbFiles(String descriptorFileName, SAXParser saxParser)
     This method returns a list of EJB files found when the specified EJB descriptor is parsed and processed.
public  voidprocessDescriptor(String descriptorFileName, SAXParser saxParser)
    
protected  voidregisterKnownDTDs(DescriptorHandler handler)
     Register the locations of all known DTDs.
public  voidsetClasspath(Path classpath)
     Set the classpath to be used for this compilation.
public  voidsetDestdir(File inDir)
     Set the destination directory; required.
public  voidsetGenericJarSuffix(String inString)
     Set the suffix for the generated jar file.
public  voidsetTask(Task task)
    
protected  booleanusingBaseJarName()
     Indicate if this build is using the base jar name.
public  voidvalidateConfigured()
     Called to validate that the tool parameters have been configured.
protected  voidwriteJar(String baseName, File jarfile, Hashtable files, String publicId, boolean includeInnerClasses)
     Method used to encapsulate the writing of the JAR file.

Field Detail
ANALYZER_CLASS_FULL
final public static String ANALYZER_CLASS_FULL(Code)
The analyzer class for the super analyzer



ANALYZER_CLASS_SUPER
final public static String ANALYZER_CLASS_SUPER(Code)
The analyzer class for the super analyzer



ANALYZER_FULL
final public static String ANALYZER_FULL(Code)
A dependency analyzer name to find all related classes



ANALYZER_NONE
final public static String ANALYZER_NONE(Code)
A dependency analyzer name for no analyzer



ANALYZER_SUPER
final public static String ANALYZER_SUPER(Code)
A dependency analyzer name to find ancestor classes



DEFAULT_ANALYZER
final public static String DEFAULT_ANALYZER(Code)
The default analyzer



EJB_DD
final protected static String EJB_DD(Code)
Name for EJB Deployment descriptor within EJB jars



MANIFEST
final protected static String MANIFEST(Code)
The standard MANIFEST file



META_DIR
final protected static String META_DIR(Code)
The standard META-INF directory in jar files




Constructor Detail
GenericDeploymentTool
public GenericDeploymentTool()(Code)




Method Detail
addFileToJar
protected void addFileToJar(JarOutputStream jStream, File inputFile, String logicalFilename) throws BuildException(Code)
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.
Parameters:
  jStream - A JarOutputStream into which to write thejar entry.
Parameters:
  inputFile - A File from which to read thecontents the file being added.
Parameters:
  logicalFilename - A String representing the name, includingall relevant path information, that should be stored for the entrybeing added.



addSupportClasses
protected void addSupportClasses(Hashtable ejbFiles)(Code)
Adds any classes the user specifies using support nested elements to the ejbFiles Hashtable.
Parameters:
  ejbFiles - Hashtable of EJB classes (and other) files that will beadded to the completed JAR file



addVendorFiles
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix)(Code)
Add any vendor specific files which should be included in the EJB Jar.



checkAndAddDependants
protected void checkAndAddDependants(Hashtable checkEntries) throws BuildException(Code)
Add all available classes, that depend on Remote, Home, Bean, PK
Parameters:
  checkEntries - files, that are extracted from the deployment descriptor



checkConfiguration
protected void checkConfiguration(String descriptorFileName, SAXParser saxParser) throws BuildException(Code)
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.
Parameters:
  descriptorFileName - String representing the file name of an EJBdescriptor to be processed
Parameters:
  saxParser - SAXParser which may be used to parse the XMLdescriptor
exception:
  BuildException - Thrown if the configuration is invalid



configure
public void configure(EjbJar.Config config)(Code)
Configure this tool for use in the ejbjar task.
Parameters:
  config - the configuration from the surrounding ejbjar task.



createClasspath
public Path createClasspath()(Code)
Add the classpath for the user classes a Path instance to be configured by Ant.



getClassLoaderForBuild
protected ClassLoader getClassLoaderForBuild()(Code)
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
protected Path getCombinedClasspath()(Code)
Get the classpath by combining the one from the surrounding task, if any and the one from this tool. the combined classpath



getConfig
protected EjbJar.Config getConfig()(Code)
Get the basename terminator. an ejbjar task configuration



getDescriptorHandler
protected DescriptorHandler getDescriptorHandler(File srcDir)(Code)



getDestDir
protected File getDestDir()(Code)
Get the destination directory. the destination directory into which EJB jars are to be written



getJarBaseName
protected String getJarBaseName(String descriptorFileName)(Code)
Using the EJB descriptor file name passed from the ejbjar task, this method returns the "basename" which will be used to name the completed JAR file.
Parameters:
  descriptorFileName - String representing the file name of an EJBdescriptor to be processed The "basename" which will be used to name thecompleted JAR file



getLocation
protected Location getLocation()(Code)
Get the build file location associated with this element's task. the task's location instance.



getManifestFile
protected File getManifestFile(String prefix)(Code)
Get the manifets 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.
Parameters:
  prefix - the prefix where to llook for the manifest file based onthe naming convention. the manifest file or null if the manifest file does not exist



getPublicId
protected String getPublicId()(Code)
Returns the Public ID of the DTD specified in the EJB descriptor. Not every vendor-specific DeploymentTool will need to reference this value or may want to determine this value in a vendor-specific way. Public ID of the DTD specified in the EJB descriptor.



getTask
protected Task getTask()(Code)
Get the task for this tool. the Task instance this tool is associated with.



getVendorDDPrefix
public String getVendorDDPrefix(String baseName, String descriptorFileName)(Code)
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
File getVendorOutputJarFile(String baseName)(Code)
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
protected void log(String message, int level)(Code)
Log a message to the Ant output.
Parameters:
  message - the message to be logged.
Parameters:
  level - the severity of this message.



needToRebuild
protected boolean needToRebuild(Hashtable ejbFiles, File jarFile)(Code)
This method checks the timestamp on each file listed in the ejbFiles and compares them to the timestamp on the jarFile . If the jarFile's timestamp is more recent than each EJB file, true is returned. Otherwise, false is returned. TODO: find a way to check the manifest-file, that is found by naming convention
Parameters:
  ejbFiles - Hashtable of EJB classes (and other) files that will beadded to the completed JAR file
Parameters:
  jarFile - JAR file which will contain all of the EJB classes (andother) files boolean indicating whether or not the jarFileis up to date



parseEjbFiles
protected Hashtable parseEjbFiles(String descriptorFileName, SAXParser saxParser) throws IOException, SAXException(Code)
This method returns a list of EJB files found when the specified EJB descriptor is parsed and processed.
Parameters:
  descriptorFileName - String representing the file name of an EJBdescriptor to be processed
Parameters:
  saxParser - SAXParser which may be used to parse the XMLdescriptor Hashtable of EJB class (and other) files to beadded to the completed JAR file
throws:
  SAXException - Any SAX exception, possibly wrapping anotherexception
throws:
  IOException - An IOException from the parser, possibly from athe byte stream or character stream



processDescriptor
public void processDescriptor(String descriptorFileName, SAXParser saxParser)(Code)



registerKnownDTDs
protected void registerKnownDTDs(DescriptorHandler handler)(Code)
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
public void setClasspath(Path classpath)(Code)
Set the classpath to be used for this compilation.
Parameters:
  classpath - the classpath to be used for this build.



setDestdir
public void setDestdir(File inDir)(Code)
Set the destination directory; required.
Parameters:
  inDir - the destination directory.



setGenericJarSuffix
public void setGenericJarSuffix(String inString)(Code)
Set the suffix for the generated jar file.
Parameters:
  inString - the string to use as the suffix.



setTask
public void setTask(Task task)(Code)
Set the task which owns this tool
Parameters:
  task - the Task to which this deployment tool is associated.



usingBaseJarName
protected boolean usingBaseJarName()(Code)
Indicate if this build is using the base jar name. true if the name of the generated jar is coming from thebasejarname attribute



validateConfigured
public void validateConfigured() throws BuildException(Code)
Called to validate that the tool parameters have been configured.
throws:
  BuildException - If the Deployment Tool's configuration isn'tvalid



writeJar
protected void writeJar(String baseName, File jarfile, Hashtable files, String publicId, boolean includeInnerClasses) throws BuildException(Code)
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.
Parameters:
  includeInnerClasses - if true, include inner classes



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.