com.coi.tools.os.win
Class RegistryLogItem

java.lang.Object
  extended by com.coi.tools.os.win.RegistryLogItem
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class RegistryLogItem
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Data container for Windows registry logging. This container is used to hold old and new created registry data used at rewinding the registry changes.

Author:
Klaus Bartz
See Also:
Serialized Form

Field Summary
static int CHANGED_VALUE
          Identifier for changed value
static int CREATED_KEY
          Identifier for created key
static int CREATED_VALUE
          Identifier for created value
private  java.lang.String key
           
private  RegDataContainer newValue
           
private  RegDataContainer oldValue
           
static int REMOVED_KEY
          Identifier for removed key
static int REMOVED_VALUE
          Identifier for removed value
private  int root
           
private static long serialVersionUID
           
private  int type
           
private  java.lang.String valueName
           
 
Constructor Summary
private RegistryLogItem()
          Default constructor.
  RegistryLogItem(int type, int root, java.lang.String key, java.lang.String valueName, RegDataContainer newValue, RegDataContainer oldValue)
          Constructor with settings.
 
Method Summary
 java.lang.Object clone()
           
 java.lang.String getKey()
          Returns the key name of this logging item.
 RegDataContainer getNewValue()
          Returns the new value of this logging item.
 RegDataContainer getOldValue()
          Returns the old value of this logging item.
 int getRoot()
          Returns the root id of this logging item.
 int getType()
          Returns the type id of this logging item.
 java.lang.String getValueName()
          Returns the value name of this logging item.
 void setKey(java.lang.String string)
          Sets the key name to the given string
 void setNewValue(RegDataContainer container)
          Sets the new value to the given RegDataContainer.
 void setOldValue(RegDataContainer container)
          Sets the old value to the given RegDataContainer.
 void setRoot(int i)
          Sets the root id for this logging item.
 void setType(int i)
          Sets the type id for this logging item.
 void setValueName(java.lang.String string)
          Sets the value name to the given string
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

REMOVED_KEY

public static final int REMOVED_KEY
Identifier for removed key

See Also:
Constant Field Values

CREATED_KEY

public static final int CREATED_KEY
Identifier for created key

See Also:
Constant Field Values

REMOVED_VALUE

public static final int REMOVED_VALUE
Identifier for removed value

See Also:
Constant Field Values

CREATED_VALUE

public static final int CREATED_VALUE
Identifier for created value

See Also:
Constant Field Values

CHANGED_VALUE

public static final int CHANGED_VALUE
Identifier for changed value

See Also:
Constant Field Values

type

private int type

root

private int root

key

private java.lang.String key

valueName

private java.lang.String valueName

newValue

private RegDataContainer newValue

oldValue

private RegDataContainer oldValue
Constructor Detail

RegistryLogItem

private RegistryLogItem()
Default constructor.


RegistryLogItem

public RegistryLogItem(int type,
                       int root,
                       java.lang.String key,
                       java.lang.String valueName,
                       RegDataContainer newValue,
                       RegDataContainer oldValue)
Constructor with settings.

Parameters:
type - type of loging item. Possible are REMOVED_KEY, CREATED_KEY, REMOVED_VALUE, CREATED_VALUE and CHANGED_VALUE
root - id for the registry root
key - key name of the item which should be logged
valueName - name of the value of the item which should be logged if it is a value type, else null
newValue - new value of the registry entry if it is a value type, else null
oldValue - old value of the registry entry if it is a value type, else null
Method Detail

getKey

public java.lang.String getKey()
Returns the key name of this logging item.

Returns:
the key name of this logging item

getNewValue

public RegDataContainer getNewValue()
Returns the new value of this logging item.

Returns:
the new value of this logging item

getOldValue

public RegDataContainer getOldValue()
Returns the old value of this logging item.

Returns:
the old value of this logging item

getRoot

public int getRoot()
Returns the root id of this logging item.

Returns:
the root id of this logging item

getType

public int getType()
Returns the type id of this logging item.

Returns:
the type id of this logging item

getValueName

public java.lang.String getValueName()
Returns the value name of this logging item.

Returns:
the value name of this logging item

setKey

public void setKey(java.lang.String string)
Sets the key name to the given string

Parameters:
string - to be used as key name

setNewValue

public void setNewValue(RegDataContainer container)
Sets the new value to the given RegDataContainer.

Parameters:
container - to be used as new value

setOldValue

public void setOldValue(RegDataContainer container)
Sets the old value to the given RegDataContainer.

Parameters:
container - to be used as old value

setRoot

public void setRoot(int i)
Sets the root id for this logging item.

Parameters:
i - root id to be used for this logging item

setType

public void setType(int i)
Sets the type id for this logging item.

Parameters:
i - type id to be used for this logging item

setValueName

public void setValueName(java.lang.String string)
Sets the value name to the given string

Parameters:
string - to be used as value name

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException