1 22 23 package com.izforge.izpack.util.os; 24 25 import java.util.List ; 26 27 import com.coi.tools.os.izpack.Registry; 28 import com.coi.tools.os.win.NativeLibException; 29 import com.coi.tools.os.win.RegDataContainer; 30 31 37 public class Win_RegistryHandler extends RegistryHandler 38 { 39 40 Registry regWorker = null; 41 42 45 public Win_RegistryHandler() 46 { 47 super("com.coi.tools.os.izpack.Registry"); 48 if (good()) regWorker = (Registry) worker; 49 } 50 51 62 public void setValue(String key, String value, String contents) throws NativeLibException 63 { 64 if (!good()) return; 65 regWorker.setValue(key, value, contents); 66 } 67 68 78 public void setValue(String key, String value, String [] contents) throws NativeLibException 79 { 80 if (!good()) return; 81 regWorker.setValue(key, value, contents); 82 } 83 84 94 public void setValue(String key, String value, byte[] contents) throws NativeLibException 95 { 96 if (!good()) return; 97 regWorker.setValue(key, value, contents); 98 } 99 100 110 public void setValue(String key, String value, long contents) throws NativeLibException 111 { 112 if (!good()) return; 113 regWorker.setValue(key, value, contents); 114 } 115 116 125 public RegDataContainer getValue(String key, String value, RegDataContainer defaultVal) throws NativeLibException 126 { 127 if (!good()) return (null); 128 if (valueExist(key, value)) return (getValue(key, value)); 129 return (defaultVal); 130 } 131 132 139 public boolean keyExist(String key) throws NativeLibException 140 { 141 if (!good()) return (false); 142 return (regWorker.keyExist(key)); 143 } 144 145 153 public boolean valueExist(String key, String value) throws NativeLibException 154 { 155 if (!good()) return (false); 156 return (regWorker.valueExist(key, value)); 157 } 158 159 166 public String [] getSubkeys(String key) throws NativeLibException 167 { 168 if (!good()) return (null); 169 return (regWorker.getSubkeys(key)); 170 } 171 172 179 public String [] getValueNames(String key) throws NativeLibException 180 { 181 if (!good()) return (null); 182 return (regWorker.getValueNames(key)); 183 } 184 185 193 public RegDataContainer getValue(String key, String value) throws NativeLibException 194 { 195 if (!good()) return (null); 196 return (regWorker.getValue(key, value)); 197 } 198 199 205 public void createKey(String key) throws NativeLibException 206 { 207 if (!good()) return; 208 regWorker.createKey(key); 209 } 210 211 216 public void deleteKey( String key) throws NativeLibException 217 { 218 if (!good()) return; 219 regWorker.deleteKey(key); 220 } 221 222 228 public void deleteKeyIfEmpty(String key) throws NativeLibException 229 { 230 if (!good()) return; 231 regWorker.deleteKeyIfEmpty(key); 232 } 233 234 241 public void deleteValue(String key, String value) throws NativeLibException 242 { 243 if (!good()) return; 244 regWorker.deleteValue(key, value); 245 } 246 247 253 public void setRoot(int i) throws NativeLibException 254 { 255 if (!good()) return; 256 regWorker.setRoot(i); 257 } 258 259 265 public int getRoot() throws NativeLibException 266 { 267 if (!good()) return (0); 268 return (regWorker.getRoot()); 269 } 270 271 276 public void activateLogging() throws NativeLibException 277 { 278 if (!good()) return; 279 regWorker.activateLogging(); 280 } 281 282 287 public void suspendLogging() throws NativeLibException 288 { 289 if (!good()) return; 290 regWorker.suspendLogging(); 291 } 292 293 298 public void resetLogging() throws NativeLibException 299 { 300 if (!good()) return; 301 regWorker.resetLogging(); 302 } 303 304 public List getLoggingInfo() throws NativeLibException 305 { 306 if (!good()) return (null); 307 return (regWorker.getLoggingInfo()); 308 } 309 310 public void setLoggingInfo(List info) throws NativeLibException 311 { 312 if (!good()) return; 313 regWorker.setLoggingInfo(info); 314 } 315 316 public void addLoggingInfo(List info) throws NativeLibException 317 { 318 if (!good()) return; 319 regWorker.addLoggingInfo(info); 320 } 321 322 public void rewind() throws NativeLibException 323 { 324 if (!good()) return; 325 regWorker.rewind(); 326 } 327 328 } 329 | Popular Tags |