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


java.lang.Object
   com.izforge.izpack.util.OSClassHelper
      com.izforge.izpack.util.os.RegistryHandler

All known Subclasses:   com.izforge.izpack.util.os.Win_RegistryHandler,
RegistryHandler
public class RegistryHandler extends OSClassHelper implements MSWinConstants(Code)
This class represents a registry handler in a operating system independent way. OS specific subclasses are used to implement the necessary mapping from this generic API to the classes that reflect the system dependent AIP.
author:
   Klaus Bartz


Field Summary
final public static  Map<String, Integer>ROOT_KEY_MAP
    
final public static  StringUNINSTALL_ROOT
    
protected  StringuninstallName
    

Constructor Summary
public  RegistryHandler()
     Default constructor.
public  RegistryHandler(String className)
     Creates an registry handler which uses an oblect of the given class as worker.

Method Summary
public  voidactivateLogging()
     Activates logging of registry changes.
public  voidaddLoggingInfo(List info)
    
public  voidcreateKey(String key)
     Creates the given key in the registry.
public  voiddeleteKey(String key)
     Deletes the given key if exist, else throws an exception.
public  voiddeleteKeyIfEmpty(String key)
     Deletes a key under the current root if it is empty, else do nothing.
public  voiddeleteValue(String key, String value)
     Deletes a value.
public  booleandoPerform()
     Returns whether an action with this handler should be performed or not.
public  RegistryHandlergetDefaultHandler()
     Returns the default handler which is the first created registry handler.
public  List<Object>getLoggingInfo()
    
public  intgetRoot()
     Return the root as integer (HKEY_xxx).
public  String[]getSubkeys(String key)
     Returns all keys which are defined under the given key.
public  StringgetUninstallName()
    
public  RegDataContainergetValue(String key, String value, RegDataContainer defaultVal)
     Returns the contents of the key/value pair if value exist, else the given default value.
public  RegDataContainergetValue(String key, String value)
     Returns the contents of the key/value pair if value exist, else an exception is raised.
public  String[]getValueNames(String key)
     Returns all value names which are defined under the given key.
public  booleanisProductRegistered()
    
public  booleankeyExist(String key)
     Returns whether a key exist or not.
public  voidregisterUninstallKey()
    
public  voidresetLogging()
     Resets logging of registry changes.
public  voidrewind()
    
public  voidsetLoggingInfo(List info)
    
public  voidsetRoot(int i)
     Sets the root for the next registry access.
public  voidsetUninstallName(String name)
    
public  voidsetValue(String key, String value, String contents)
     Sets the given contents to the given registry value.
public  voidsetValue(String key, String value, String[] contents)
    
public  voidsetValue(String key, String value, byte[] contents)
     Sets the given contents to the given registry value.
public  voidsetValue(String key, String value, long contents)
     Sets the given contents to the given registry value.
public  voidsuspendLogging()
     Suspends logging of registry changes.
public  booleanvalueExist(String key, String value)
     Returns whether a the given value under the given key exist or not.
public  booleanverify(AutomatedInstallData idata)
    

Field Detail
ROOT_KEY_MAP
final public static Map<String, Integer> ROOT_KEY_MAP(Code)



UNINSTALL_ROOT
final public static String UNINSTALL_ROOT(Code)



uninstallName
protected String uninstallName(Code)




Constructor Detail
RegistryHandler
public RegistryHandler()(Code)
Default constructor.



RegistryHandler
public RegistryHandler(String className)(Code)
Creates an registry handler which uses an oblect of the given class as worker.
Parameters:
  className - full qualified class name of the class which should be used as worker




Method Detail
activateLogging
public void activateLogging() throws NativeLibException(Code)
Activates logging of registry changes.
throws:
  NativeLibException -



addLoggingInfo
public void addLoggingInfo(List info) throws NativeLibException(Code)



createKey
public void createKey(String key) throws NativeLibException(Code)
Creates the given key in the registry.
Parameters:
  key - key to be created
throws:
  NativeLibException -



deleteKey
public void deleteKey(String key) throws NativeLibException(Code)
Deletes the given key if exist, else throws an exception.
Parameters:
  key - key to be deleted
throws:
  NativeLibException -



deleteKeyIfEmpty
public void deleteKeyIfEmpty(String key) throws NativeLibException(Code)
Deletes a key under the current root if it is empty, else do nothing.
Parameters:
  key - key to be deleted
throws:
  NativeLibException -



deleteValue
public void deleteValue(String key, String value) throws NativeLibException(Code)
Deletes a value.
Parameters:
  key - key of the value which should be deleted
Parameters:
  value - value name to be deleted
throws:
  NativeLibException -



doPerform
public boolean doPerform()(Code)
Returns whether an action with this handler should be performed or not. always true



getDefaultHandler
public RegistryHandler getDefaultHandler()(Code)
Returns the default handler which is the first created registry handler. Returns the default handler.



getLoggingInfo
public List<Object> getLoggingInfo() throws NativeLibException(Code)



getRoot
public int getRoot() throws NativeLibException(Code)
Return the root as integer (HKEY_xxx). the root as integer
throws:
  NativeLibException -



getSubkeys
public String[] getSubkeys(String key) throws NativeLibException(Code)
Returns all keys which are defined under the given key.
Parameters:
  key - key to be used as path for the sub keys all keys which are defined under the given key
throws:
  NativeLibException -



getUninstallName
public String getUninstallName()(Code)



getValue
public RegDataContainer getValue(String key, String value, RegDataContainer defaultVal) throws NativeLibException(Code)
Returns the contents of the key/value pair if value exist, else the given default value.
Parameters:
  key - the registry key which should be used
Parameters:
  value - the registry value from which the contents should be requested
Parameters:
  defaultVal - value to be used if no value exist in the registry requested value if exist, else the default value
throws:
  NativeLibException -



getValue
public RegDataContainer getValue(String key, String value) throws NativeLibException(Code)
Returns the contents of the key/value pair if value exist, else an exception is raised.
Parameters:
  key - the registry key which should be used
Parameters:
  value - the registry value from which the contents should be requested requested value if exist, else an exception
throws:
  NativeLibException -



getValueNames
public String[] getValueNames(String key) throws NativeLibException(Code)
Returns all value names which are defined under the given key.
Parameters:
  key - key to be used as path for the value names all value names which are defined under the given key
throws:
  NativeLibException -



isProductRegistered
public boolean isProductRegistered() throws NativeLibException(Code)



keyExist
public boolean keyExist(String key) throws NativeLibException(Code)
Returns whether a key exist or not.
Parameters:
  key - key to be evaluated whether a key exist or not
throws:
  NativeLibException -



registerUninstallKey
public void registerUninstallKey() throws NativeLibException(Code)



resetLogging
public void resetLogging() throws NativeLibException(Code)
Resets logging of registry changes.
throws:
  NativeLibException -



rewind
public void rewind() throws NativeLibException(Code)



setLoggingInfo
public void setLoggingInfo(List info) throws NativeLibException(Code)



setRoot
public void setRoot(int i) throws NativeLibException(Code)
Sets the root for the next registry access.
Parameters:
  i - an integer which refers to a HKEY
throws:
  NativeLibException -



setUninstallName
public void setUninstallName(String name)(Code)



setValue
public void setValue(String key, String value, String contents) throws NativeLibException(Code)
Sets the given contents to the given registry value. If a sub key or the registry value does not exist, it will be created. The return value is a String array which contains the names of the keys and values which are created. REG_SZ is used as registry value type.
Parameters:
  key - the registry key which should be used or created
Parameters:
  value - the registry value into which the contents should be set
Parameters:
  contents - the contents for the value
throws:
  NativeLibException -



setValue
public void setValue(String key, String value, String[] contents) throws NativeLibException(Code)



setValue
public void setValue(String key, String value, byte[] contents) throws NativeLibException(Code)
Sets the given contents to the given registry value. If a sub key or the registry value does not exist, it will be created. The return value is a String array which contains the names of the keys and values which are created. REG_BINARY is used as registry value type.
Parameters:
  key - the registry key which should be used or created
Parameters:
  value - the registry value into which the contents should be set
Parameters:
  contents - the contents for the value
throws:
  NativeLibException -



setValue
public void setValue(String key, String value, long contents) throws NativeLibException(Code)
Sets the given contents to the given registry value. If a sub key or the registry value does not exist, it will be created. The return value is a String array which contains the names of the keys and values which are created. REG_DWORD is used as registry value type.
Parameters:
  key - the registry key which should be used or created
Parameters:
  value - the registry value into which the contents should be set
Parameters:
  contents - the contents for the value
throws:
  NativeLibException -



suspendLogging
public void suspendLogging() throws NativeLibException(Code)
Suspends logging of registry changes.
throws:
  NativeLibException -



valueExist
public boolean valueExist(String key, String value) throws NativeLibException(Code)
Returns whether a the given value under the given key exist or not.
Parameters:
  key - key to be used as path for the value
Parameters:
  value - value name to be evaluated whether a the given value under the given key exist or not
throws:
  NativeLibException -



verify
public boolean verify(AutomatedInstallData idata) throws Exception(Code)

Parameters:
  idata -



Fields inherited from com.izforge.izpack.util.OSClassHelper
protected AutomatedInstallData installdata(Code)(Java Doc)
protected Object worker(Code)(Java Doc)
protected Class workerClass(Code)(Java Doc)

Methods inherited from com.izforge.izpack.util.OSClassHelper
public boolean good()(Code)(Java Doc)
public boolean verify(AutomatedInstallData idata) throws Exception(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.