com.amx.duet.tools.util
Class Reg

java.lang.Object
  extended bycom.amx.duet.tools.util.Reg

public class Reg
extends java.lang.Object

This class is a wrapper class to simplify Registry editting.

Since:
AMXTools 1.0.0
Version:
1.0.0

Constructor Summary
Reg()
          Default constructor.
Reg(java.lang.String appkey)
           
 
Method Summary
 java.lang.String getAppKey()
          Returns the application registry root key, which was created through setAppKey().
 java.lang.String getCurrentKey()
          Returns the currentKey set by calls to setCurrentKey() or setAppKey.
 int getDebugState()
          Gets the current diagnostic state.
 java.lang.String readKey(java.lang.String regKey)
          Retrieves an entry’s (specified by name) value from the currentKey.
 boolean removeKey(java.lang.String regKey)
          Removes a key from the registry including all of the key’s values and any sub-keys and their values.
 void setAppKey(java.lang.String key)
          Sets the registry application root key.
 int setCurrentKey(java.lang.String key)
          Sets the currentKey setting for the Registry object to the specified key.
 void setDebug(boolean bState)
          Deprecated. Do not use this method; use setDebugState instead
 void setDebugState(int nState)
          Puts the class into a debug diagnostic state.
 boolean writeKey(java.lang.String regKey, java.lang.String value)
          Writes the entry specified by name to value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Reg

public Reg()
Default constructor.


Reg

public Reg(java.lang.String appkey)
Parameters:
appkey -
Method Detail

setAppKey

public void setAppKey(java.lang.String key)
Sets the registry application root key. This is the key that all your other keys will fall under. If the key has not been created, this method will create it for you.

Parameters:
key - String specifying the key path

getAppKey

public java.lang.String getAppKey()
Returns the application registry root key, which was created through setAppKey().


setCurrentKey

public int setCurrentKey(java.lang.String key)
Sets the currentKey setting for the Registry object to the specified key. The access control values are validated using the Registry object’s classname and properties supplied at construction. If the key has not been created, this method will create it for you.

Parameters:
key - a String object containing the desired key path
Returns:
SUCCESS, NO_CURRENT_KEY, INVALID_KEY, FAILURE

getCurrentKey

public java.lang.String getCurrentKey()
Returns the currentKey set by calls to setCurrentKey() or setAppKey.

Returns:
key a String object containing the current key path

writeKey

public boolean writeKey(java.lang.String regKey,
                        java.lang.String value)
Writes the entry specified by name to value. If the entry does not exist, it is created.

Parameters:
regKey - a String object containing the name to set
value - a String object containing the value to set
Returns:
true if the key was successfully writen to; false otherwise

readKey

public java.lang.String readKey(java.lang.String regKey)
Retrieves an entry’s (specified by name) value from the currentKey.

Parameters:
regKey - a String containing the name of the value to retrieve
Returns:
a String object containing the requested value.

removeKey

public boolean removeKey(java.lang.String regKey)
Removes a key from the registry including all of the key’s values and any sub-keys and their values.

Parameters:
regKey - a String object containing the key path
Returns:
true if the key was successfully deleted; false otherwise

setDebug

public void setDebug(boolean bState)
Deprecated. Do not use this method; use setDebugState instead

Parameters:
bState -

setDebugState

public void setDebugState(int nState)
Puts the class into a debug diagnostic state.

Parameters:
nState -

getDebugState

public int getDebugState()
Gets the current diagnostic state.

Returns:


Copyright © 2008 AMX LLC. All Rights Reserved.