Мы разработали собственный плагин для Notes 8.5.2. Он записывает ряд пользовательских настроек. Класс, который делает это, показан ниже:
import java.util.prefs.Preferences;
/**
* Provides programmatic access to Windows Registry entries for this plug-in.
*/
public class Registry
{
Preferences prefs;
/**
* Initializes a new instance of the Registry class.
*/
public Registry()
{
prefs = Preferences.userNodeForPackage(Registry.class) ;
}
/**
* Gets the value of a registry key.
*
* @param keyName The name of the key to return.
*
* @return A string containing the value of the specified registry key. If a key with the specified name cannot be
* found, the return value is an empty string.
*/
public String GetValue(String keyName)
{
try
{
return prefs.get(keyName, "NA") ;
}
catch(Exception err)
{
return "" ;
}
}
/**
* Sets the value of a registry key.
*
* @param keyName The name of the registry key.
*
* @param keyValue The new value for the registry key.
*/
public void SetValue(String keyName, String keyValue)
{
try
{
prefs.put(keyName, keyValue);
prefs.flush();
}
catch(Exception err)
{
}
}
}
Пример кода, который его использует, выглядит следующим образом:
Registry wr = new Registry();
String setting1 = wr.GetValue("CustomSetting1");
wr.SetValue("CustomSetting1", newValue);
Теперь я отсканировал реестр Windows, и эти настройки не существуют. Я проиндексировал мой весь жесткий диск и не могу найти эти записи ни в одном файле.
Итак, где, черт возьми, хранятся эти настройки?