Java Doc for Compiler.java in  » Installer » IzPack » com » izforge » izpack » compiler » 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 » Installer » IzPack » com.izforge.izpack.compiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.Thread
      com.izforge.izpack.compiler.Compiler

Compiler
public class Compiler extends Thread (Code)
The IzPack compiler class. This is now a java bean style class that can be configured using the object representations of the install.xml configuration. The install.xml configuration is now handled by the CompilerConfig class.
See Also:   CompilerConfig
author:
   Julien Ponge
author:
   Tino Schwarze
author:
   Chadwick McHenry

Inner Class :static class CmdlinePackagerListener implements PackagerListener

Field Summary
public static  StringIZPACK_HOME
     The IzPack home directory.
final public static  StringIZPACK_VERSION
     The IzPack version.
protected  Stringbasedir
     The base directory.
protected  Stringkind
     The installer kind.
protected  Stringoutput
     The output jar filename.

Constructor Summary
public  Compiler(String basedir, String kind, String output)
     The constructor.
public  Compiler(String basedir, String kind, String output, String compr_format)
     The constructor.
public  Compiler(String basedir, String kind, String output, String compr_format, int compr_level)
     The constructor.

Method Summary
public  voidaddCustomJar(CustomData ca, URL url)
     Add a custom jar to the installation.
public  voidaddCustomListener(int type, String className, String jarPath, List<OsConstraint> constraints)
     This method parses install.xml for defined listeners and put them in the right position.
public  voidaddJarContent(URL content)
     Add jar content to the installation.
public  voidaddJarContent(URL content, List<String> files)
     Adds a jar file content to the installer.
public  voidaddLangPack(String locale, URL localeURL, URL flagURL)
     Add a lang pack to the installation.
public  voidaddNativeLibrary(String name, URL url)
     Add a native library to the installation.
public  voidaddNativeUninstallerLibrary(CustomData data)
     Add an unistaller library.
public  voidaddPack(PackInfo pack)
     Add a pack to the installation.
public  voidaddPanelJar(Panel panel, URL url)
     Add a panel jar to the installation.
public  booleanaddProperty(String name, String value)
     Add a name value pair to the project property set.
public  voidaddResource(String name, URL url)
     Add a resource to the installation.
public  voidcheckDependencies()
     Checks whether the dependencies stated in the configuration file are correct.
public  voidcheckDependencies(List<PackInfo> packs)
     Checks whether the dependencies among the given Packs.
public  voidcheckExcludes()
     Checks whether the excluded packs exist.
public  voidcheckExcludes(List<PackInfo> packs)
     This checks if there are more than one preselected packs per excludeGroup.
public  voidcompile()
     Compiles.
public  voidcreateInstaller()
     Compiles the installation.
public  URLfindIzPackResource(String path, String desc)
     Look for an IzPack resource either in the compiler jar, or within IZPACK_HOME.
public  Map<String, Condition>getConditions()
    
public  Map<String, DynamicVariable>getDynamicVariables()
    
public  StringgetKind()
     Access the installation kind.
public  IPackagergetPackager()
     Returns the install packager.
public  PackagerListenergetPackagerListener()
     Returns the packager listener.
public  PropertiesgetProperties()
     Returns the properties currently known to the compileer.
public  StringgetProperty(String name)
     Get the value of a property currerntly known to izpack.
public  PropertiesgetVariables()
     Get the packager variables.
public  voidinitPackager(String classname)
    
public static  voidmain(String[] args)
     The main method if the compiler is invoked by a command-line call.
public  voidparseError(String message)
     Create parse error with consistent messages.
public  voidparseError(String message, Throwable how)
     Create parse error with consistent messages.
public  StringreplaceProperties(String value)
     Replaces placeholder in the given string with the associated strings.
public  voidrun()
     The run() method.
public  voidsetConditions(Map<String, Condition> conditions)
    
public  voidsetDynamicVariables(Map<String, DynamicVariable> dynamicvariables)
    
public  voidsetGUIPrefs(GUIPrefs prefs)
     Sets GUI preferences to the packager.
public  voidsetInfo(Info info)
     Sets an Info object to the packager.
public static  voidsetIzpackHome(String izHome)
    
public  voidsetPackagerListener(PackagerListener listener)
     Sets the packager listener.
public  booleansetProperty(String name, String value)
     Add a name value pair to the project property set.
public  booleanwasSuccessful()
     Returns whether the installation was successful or not.

Field Detail
IZPACK_HOME
public static String IZPACK_HOME(Code)
The IzPack home directory.



IZPACK_VERSION
final public static String IZPACK_VERSION(Code)
The IzPack version.



basedir
protected String basedir(Code)
The base directory.



kind
protected String kind(Code)
The installer kind.



output
protected String output(Code)
The output jar filename.




Constructor Detail
Compiler
public Compiler(String basedir, String kind, String output) throws CompilerException(Code)
The constructor.
Parameters:
  basedir - The base directory.
Parameters:
  kind - The installer kind.
Parameters:
  output - The installer filename.
throws:
  CompilerException -



Compiler
public Compiler(String basedir, String kind, String output, String compr_format) throws CompilerException(Code)
The constructor.
Parameters:
  basedir - The base directory.
Parameters:
  kind - The installer kind.
Parameters:
  output - The installer filename.
Parameters:
  compr_format - The format which should be used for the packs.
throws:
  CompilerException -



Compiler
public Compiler(String basedir, String kind, String output, String compr_format, int compr_level) throws CompilerException(Code)
The constructor.
Parameters:
  basedir - The base directory.
Parameters:
  kind - The installer kind.
Parameters:
  output - The installer filename.
Parameters:
  compr_format - The format which should be used for the packs.
Parameters:
  compr_level - Compression level to be used if supported.
throws:
  CompilerException -




Method Detail
addCustomJar
public void addCustomJar(CustomData ca, URL url)(Code)
Add a custom jar to the installation.
Parameters:
  ca -
Parameters:
  url -



addCustomListener
public void addCustomListener(int type, String className, String jarPath, List<OsConstraint> constraints) throws Exception(Code)
This method parses install.xml for defined listeners and put them in the right position. If posible, the listeners will be validated. Listener declaration is a fragmention in install.xml like : <listeners> <listener compiler="PermissionCompilerListener" installer="PermissionInstallerListener"/1gt; </listeners>
Parameters:
  type - The listener type.
Parameters:
  className - The class name.
Parameters:
  jarPath - The jar path.
Parameters:
  constraints - The list of constraints.
throws:
  Exception - Thrown in case an error occurs.



addJarContent
public void addJarContent(URL content)(Code)
Add jar content to the installation.
Parameters:
  content -



addJarContent
public void addJarContent(URL content, List<String> files)(Code)
Adds a jar file content to the installer. Package structure is maintained. Need mechanism to copy over signed entry information. If the given file list is null the hole contents of the jar file will be copied else only the listed.
Parameters:
  content - The url of the jar to add to the installer. We use a URL so the jar may benested within another.
Parameters:
  files - to be copied



addLangPack
public void addLangPack(String locale, URL localeURL, URL flagURL)(Code)
Add a lang pack to the installation.
Parameters:
  locale -
Parameters:
  localeURL -
Parameters:
  flagURL -



addNativeLibrary
public void addNativeLibrary(String name, URL url) throws Exception(Code)
Add a native library to the installation.
Parameters:
  name -
Parameters:
  url -
throws:
  Exception -



addNativeUninstallerLibrary
public void addNativeUninstallerLibrary(CustomData data)(Code)
Add an unistaller library.
Parameters:
  data -



addPack
public void addPack(PackInfo pack)(Code)
Add a pack to the installation.
Parameters:
  pack -



addPanelJar
public void addPanelJar(Panel panel, URL url)(Code)
Add a panel jar to the installation.
Parameters:
  panel -
Parameters:
  url -



addProperty
public boolean addProperty(String name, String value)(Code)
Add a name value pair to the project property set. It is not replaced it is already in the set of properties.
Parameters:
  name - the name of the property
Parameters:
  value - the value to set true if the property was not already set



addResource
public void addResource(String name, URL url)(Code)
Add a resource to the installation.
Parameters:
  name -
Parameters:
  url -



checkDependencies
public void checkDependencies() throws CompilerException(Code)
Checks whether the dependencies stated in the configuration file are correct. Specifically it checks that no pack point to a non existent pack and also that there are no circular dependencies in the packs.
throws:
  CompilerException -



checkDependencies
public void checkDependencies(List<PackInfo> packs) throws CompilerException(Code)
Checks whether the dependencies among the given Packs. Specifically it checks that no pack point to a non existent pack and also that there are no circular dependencies in the packs.
Parameters:
  packs - - List representing the packs in the installation
throws:
  CompilerException -



checkExcludes
public void checkExcludes() throws CompilerException(Code)
Checks whether the excluded packs exist. (simply calles the other function)
throws:
  CompilerException -



checkExcludes
public void checkExcludes(List<PackInfo> packs) throws CompilerException(Code)
This checks if there are more than one preselected packs per excludeGroup.
Parameters:
  packs - list of packs which should be checked
throws:
  CompilerException -



compile
public void compile()(Code)
Compiles.



createInstaller
public void createInstaller() throws Exception(Code)
Compiles the installation.
exception:
  Exception - Description of the Exception



findIzPackResource
public URL findIzPackResource(String path, String desc) throws CompilerException(Code)
Look for an IzPack resource either in the compiler jar, or within IZPACK_HOME. The path must not be absolute. The path must use '/' as the fileSeparator (it's used to access the jar file). If the resource is not found, a CompilerException is thrown indicating fault in the parent element.
Parameters:
  path - the relative path (using '/' as separator) to the resource.
Parameters:
  desc - the description of the resource used to report errors a URL to the resource.
throws:
  CompilerException -



getConditions
public Map<String, Condition> getConditions()(Code)
the conditions



getDynamicVariables
public Map<String, DynamicVariable> getDynamicVariables()(Code)



getKind
public String getKind()(Code)
Access the installation kind. the installation kind.



getPackager
public IPackager getPackager()(Code)
Returns the install packager. the install packager.



getPackagerListener
public PackagerListener getPackagerListener()(Code)
Returns the packager listener. the packager listener



getProperties
public Properties getProperties()(Code)
Returns the properties currently known to the compileer. the properties currently known to the compileer



getProperty
public String getProperty(String name)(Code)
Get the value of a property currerntly known to izpack.
Parameters:
  name - the name of the property the value of the property, or null



getVariables
public Properties getVariables()(Code)
Get the packager variables. the packager variables



initPackager
public void initPackager(String classname) throws CompilerException(Code)
Initializes the given packager class
Parameters:
  classname -
throws:
  CompilerException -



main
public static void main(String[] args)(Code)
The main method if the compiler is invoked by a command-line call. This simply calls the CompilerConfig.main method.
Parameters:
  args - The arguments passed on the command-line.



parseError
public void parseError(String message) throws CompilerException(Code)
Create parse error with consistent messages. Includes file name. For use When parent is unknown.
Parameters:
  message - Brief message explaining error
throws:
  CompilerException -



parseError
public void parseError(String message, Throwable how) throws CompilerException(Code)
Create parse error with consistent messages. Includes file name. For use When parent is unknown.
Parameters:
  message - Brief message explaining error
Parameters:
  how - throwable which was catched
throws:
  CompilerException -



replaceProperties
public String replaceProperties(String value)(Code)
Replaces placeholder in the given string with the associated strings.
Parameters:
  value - to be substituted the substituted string



run
public void run()(Code)
The run() method.



setConditions
public void setConditions(Map<String, Condition> conditions)(Code)

Parameters:
  conditions - the conditions to set



setDynamicVariables
public void setDynamicVariables(Map<String, DynamicVariable> dynamicvariables)(Code)



setGUIPrefs
public void setGUIPrefs(GUIPrefs prefs)(Code)
Sets GUI preferences to the packager.
Parameters:
  prefs - preferences to be set



setInfo
public void setInfo(Info info) throws Exception(Code)
Sets an Info object to the packager.
Parameters:
  info - Info object to be set
throws:
  Exception -



setIzpackHome
public static void setIzpackHome(String izHome)(Code)
Set the IzPack home directory
Parameters:
  izHome - - the izpack home directory



setPackagerListener
public void setPackagerListener(PackagerListener listener)(Code)
Sets the packager listener.
Parameters:
  listener - The listener.



setProperty
public boolean setProperty(String name, String value)(Code)
Add a name value pair to the project property set. Overwriting any existing value except system properties.
Parameters:
  name - the name of the property
Parameters:
  value - the value to set an indicator if the name value pair was added.



wasSuccessful
public boolean wasSuccessful()(Code)
Returns whether the installation was successful or not. whether the installation was successful or not



Fields inherited from java.lang.Thread
final public static int MAX_PRIORITY(Code)(Java Doc)
final public static int MIN_PRIORITY(Code)(Java Doc)
final public static int NORM_PRIORITY(Code)(Java Doc)

Methods inherited from java.lang.Thread
public static int activeCount()(Code)(Java Doc)
final public void checkAccess()(Code)(Java Doc)
native public int countStackFrames()(Code)(Java Doc)
native public static Thread currentThread()(Code)(Java Doc)
public void destroy()(Code)(Java Doc)
public static void dumpStack()(Code)(Java Doc)
public static int enumerate(Thread tarray)(Code)(Java Doc)
public static Map<Thread, StackTraceElement[]> getAllStackTraces()(Code)(Java Doc)
public ClassLoader getContextClassLoader()(Code)(Java Doc)
public static UncaughtExceptionHandler getDefaultUncaughtExceptionHandler()(Code)(Java Doc)
public long getId()(Code)(Java Doc)
final public String getName()(Code)(Java Doc)
final public int getPriority()(Code)(Java Doc)
public StackTraceElement[] getStackTrace()(Code)(Java Doc)
public State getState()(Code)(Java Doc)
final public ThreadGroup getThreadGroup()(Code)(Java Doc)
public UncaughtExceptionHandler getUncaughtExceptionHandler()(Code)(Java Doc)
native public static boolean holdsLock(Object obj)(Code)(Java Doc)
public void interrupt()(Code)(Java Doc)
public static boolean interrupted()(Code)(Java Doc)
final native public boolean isAlive()(Code)(Java Doc)
final public boolean isDaemon()(Code)(Java Doc)
public boolean isInterrupted()(Code)(Java Doc)
final public synchronized void join(long millis) throws InterruptedException(Code)(Java Doc)
final public synchronized void join(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void join() throws InterruptedException(Code)(Java Doc)
final public void resume()(Code)(Java Doc)
public void run()(Code)(Java Doc)
public void setContextClassLoader(ClassLoader cl)(Code)(Java Doc)
final public void setDaemon(boolean on)(Code)(Java Doc)
public static void setDefaultUncaughtExceptionHandler(UncaughtExceptionHandler eh)(Code)(Java Doc)
final public void setName(String name)(Code)(Java Doc)
final public void setPriority(int newPriority)(Code)(Java Doc)
public void setUncaughtExceptionHandler(UncaughtExceptionHandler eh)(Code)(Java Doc)
native public static void sleep(long millis) throws InterruptedException(Code)(Java Doc)
public static void sleep(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
public synchronized void start()(Code)(Java Doc)
final public void stop()(Code)(Java Doc)
final public synchronized void stop(Throwable obj)(Code)(Java Doc)
final public void suspend()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
native public static void yield()(Code)(Java Doc)

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.