Java Doc for RegistryImpl.java in  » Installer » IzPack » com » coi » tools » os » win » 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.coi.tools.os.win 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.coi.tools.os.win.RegistryImpl

All known Subclasses:   com.coi.tools.os.izpack.Registry,
RegistryImpl
public class RegistryImpl implements MSWinConstants(Code)
System dependent helper for MS Windows registry handling. This class is only vaild on Windows. It declares naitve methods which are implemented in COIOSHelper.dll. The native methods uses the classes RegDataContainer and AccessControlList as in and output. Do not change the getter and setter methods of them. Do not try to implement a get or setValueACL because it will be nonsense. In the registry only keys have a ACL. not values.
author:
   Klaus Bartz



Constructor Summary
public  RegistryImpl()
     Creates a new empty RegistryImpl object.

Method Summary
public  voidactivateLogging()
     Activates logging.
public  voidaddLoggingInfo(List info)
    
public  voidcreateKey(String key)
     Creates the given key under the current root.
public  voidcreateKey(int root, String key)
     Creates the given key under the given root.
public  voiddeleteKey(String key)
     Deletes a key under the current root if exist and it is empty, else throw an exception.
public  voiddeleteKeyIfEmpty(String key)
     Deletes a key under the current root if it is empty, else do nothing.
public  voiddeleteKeyIfEmpty(int root, String key)
     Deletes a key if it is empty, else do nothing.
public  voiddeleteValue(String key, String value)
     Deletes a value.
public  List<Object>getLoggingInfo()
     Returns a copy of the colected logging informations.
public  intgetRoot()
     Returns current root.
public  String[]getSubkeys(String key)
     Returns all sub keys under the given key which is under the current root.
public  RegDataContainergetValue(String key, String value)
     Returns the value of the given value name as RegDataContainer.
public  ObjectgetValueAsObject(String key, String value)
     Returns the value of the given value name as Object.
public  String[]getValueNames(String key)
     Returns all value names under the given key which is under the current root.
public  booleankeyExist(String key)
     Returns whether the given key under the current root exist or not.
public  booleankeyExist(int root, String key)
     Returns whether the given key under the given root exist or not.
public  voidresetLogging()
     Creates a new (empty) logging list and activates logging.
public  voidrewind()
     Rewinds all logged actions.
public  voidsetLoggingInfo(List info)
     Copies the contents of the given list of RegistryLogItems to a newly created internal logging list.
public  voidsetRoot(int i)
     Sets the root id to the given value.
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)
     Sets the given contents to the given registry value.
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  voidsetValue(String key, String value, RegDataContainer contents)
     Sets the given contents to the given registry value under current root.
public  voidsetValue(int root, String key, String value, RegDataContainer contents)
     Sets the given contents to the given registry value.
public  voidsuspendLogging()
     Suspends logging.
public  booleanvalueExist(String key, String value)
     Returns whether the given value exist under the current root or not.


Constructor Detail
RegistryImpl
public RegistryImpl()(Code)
Creates a new empty RegistryImpl object.




Method Detail
activateLogging
public void activateLogging()(Code)
Activates logging.



addLoggingInfo
public void addLoggingInfo(List info)(Code)
Adds copies of the contents of the given list of RegistryLogItems to the existent internal
Parameters:
  info - list containing RegistryLogItems to be used for logging logging list.



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



createKey
public void createKey(int root, String key) throws NativeLibException(Code)
Creates the given key under the given root. It is possible to declare keys without a sub path. This is only possible on roots which are no real roots (e.g. HKEY_CURRENT_USER which is a link to HKEY_USERS\GUID of current user). Therefore this method will be raise an exception if root is a real root and key contains no sub path.
Parameters:
  root - to be used
Parameters:
  key - key to be created
throws:
  NativeLibException -



deleteKey
public void deleteKey(String key) throws NativeLibException(Code)
Deletes a key under the current root if exist and it is empty, else throw 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 -



deleteKeyIfEmpty
public void deleteKeyIfEmpty(int root, String key) throws NativeLibException(Code)
Deletes a key if it is empty, else do nothing.
Parameters:
  root - id for the root of the key
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 -



getLoggingInfo
public List<Object> getLoggingInfo()(Code)
Returns a copy of the colected logging informations. a copy of the colected logging informations



getRoot
public int getRoot()(Code)
Returns current root. current root



getSubkeys
public String[] getSubkeys(String key) throws NativeLibException(Code)
Returns all sub keys under the given key which is under the current root.
Parameters:
  key - key for which the sub keys should be detected all sub keys under the given key which is under the current root
throws:
  NativeLibException -



getValue
public RegDataContainer getValue(String key, String value) throws NativeLibException(Code)
Returns the value of the given value name as RegDataContainer.
Parameters:
  key - key of the registry entry
Parameters:
  value - value name of the registry entry the value of the given value name as RegDataContainer
throws:
  NativeLibException -



getValueAsObject
public Object getValueAsObject(String key, String value) throws NativeLibException(Code)
Returns the value of the given value name as Object. The real type depends to the type of the value.
Parameters:
  key - key of the registry entry
Parameters:
  value - value name of the registry entry the value of the given value name as RegDataContainer
throws:
  NativeLibException -



getValueNames
public String[] getValueNames(String key) throws NativeLibException(Code)
Returns all value names under the given key which is under the current root.
Parameters:
  key - key for which the values should be detected all value names under the given key which is under the current root
throws:
  NativeLibException -



keyExist
public boolean keyExist(String key) throws NativeLibException(Code)
Returns whether the given key under the current root exist or not.
Parameters:
  key - key to be tested true if thekey exist, else false
throws:
  NativeLibException -



keyExist
public boolean keyExist(int root, String key) throws NativeLibException(Code)
Returns whether the given key under the given root exist or not.
Parameters:
  root - to be used
Parameters:
  key - key to be tested true if thekey exist, else false
throws:
  NativeLibException -



resetLogging
public void resetLogging()(Code)
Creates a new (empty) logging list and activates logging.



rewind
public void rewind() throws IllegalArgumentException, NativeLibException(Code)
Rewinds all logged actions.
throws:
  IllegalArgumentException -
throws:
  NativeLibException -



setLoggingInfo
public void setLoggingInfo(List info)(Code)
Copies the contents of the given list of RegistryLogItems to a newly created internal logging list.
Parameters:
  info - list containing RegistryLogItems to be used for logging



setRoot
public void setRoot(int i)(Code)
Sets the root id to the given value.
Parameters:
  i - root id to be set



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. 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)
Sets the given contents to the given registry value. If a sub key or the registry value does not exist, it will be created. REG_MULTI_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, 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. 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. 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 -



setValue
public void setValue(String key, String value, RegDataContainer contents) throws NativeLibException(Code)
Sets the given contents to the given registry value under current root. If a sub key or the registry value does not exist, it will be created. The used registry value type will be determined by the type of the RegDataContainer.
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(int root, String key, String value, RegDataContainer 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 used registry value type will be determined by the type of the RegDataContainer.
Parameters:
  root - id for the root of the key
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()(Code)
Suspends logging.



valueExist
public boolean valueExist(String key, String value) throws NativeLibException(Code)
Returns whether the given value exist under the current root or not.
Parameters:
  key - key of the value for which should be tested
Parameters:
  value - value to be tested true if the value exist, else false
throws:
  NativeLibException -



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.