1 21 22 package com.coi.tools.os.win; 23 24 import java.io.Serializable ; 25 26 33 public class RegistryLogItem implements Cloneable , Serializable 34 { 35 36 39 private static final long serialVersionUID = 3618134559108444211L; 40 41 42 43 44 public static final int REMOVED_KEY = 1; 45 46 47 public static final int CREATED_KEY = 2; 48 49 50 public static final int REMOVED_VALUE = 3; 51 52 53 public static final int CREATED_VALUE = 4; 54 55 56 public static final int CHANGED_VALUE = 5; 57 58 private int type; 59 60 private int root; 61 62 private String key; 63 64 private String valueName; 65 66 private RegDataContainer newValue = null; 67 68 private RegDataContainer oldValue = null; 69 70 73 private RegistryLogItem() 74 { 75 super(); 76 } 77 78 90 public RegistryLogItem(int type, int root, String key, String valueName, 91 RegDataContainer newValue, RegDataContainer oldValue) 92 { 93 this.type = type; 94 this.root = root; 95 this.key = key; 96 this.valueName = valueName; 97 this.newValue = newValue; 98 this.oldValue = oldValue; 99 } 100 101 106 public String getKey() 107 { 108 return key; 109 } 110 111 116 public RegDataContainer getNewValue() 117 { 118 return newValue; 119 } 120 121 126 public RegDataContainer getOldValue() 127 { 128 return oldValue; 129 } 130 131 136 public int getRoot() 137 { 138 return root; 139 } 140 141 146 public int getType() 147 { 148 return type; 149 } 150 151 156 public String getValueName() 157 { 158 return valueName; 159 } 160 161 166 public void setKey(String string) 167 { 168 key = string; 169 } 170 171 176 public void setNewValue(RegDataContainer container) 177 { 178 newValue = container; 179 } 180 181 186 public void setOldValue(RegDataContainer container) 187 { 188 oldValue = container; 189 } 190 191 196 public void setRoot(int i) 197 { 198 root = i; 199 } 200 201 206 public void setType(int i) 207 { 208 type = i; 209 } 210 211 216 public void setValueName(String string) 217 { 218 valueName = string; 219 } 220 221 public Object clone() throws CloneNotSupportedException 222 { 223 RegistryLogItem retval = (RegistryLogItem) super.clone(); 224 if (newValue != null) retval.newValue = (RegDataContainer) newValue.clone(); 225 if (oldValue != null) retval.oldValue = (RegDataContainer) oldValue.clone(); 226 return (retval); 227 228 } 229 } 230 | Popular Tags |