jetbrains.buildServer.util
Interface Win32RegistryAccessor


public interface Win32RegistryAccessor

Provides access to windows registry. This interface is registered in Spring.

Since:
5.1

Nested Class Summary
static class Win32RegistryAccessor.Hive
          Registry hive
 
Method Summary
 java.util.Set<java.lang.String> listSubKeys(Win32RegistryAccessor.Hive hive, Bitness bitness, java.lang.String keyPath)
          Enumerates sub key names of a given keyPath.
 java.util.Set<java.lang.String> listValueNames(Win32RegistryAccessor.Hive hive, Bitness bitness, java.lang.String keyPath)
          Enumerates value names of a given keyPath.
 java.io.File readRegistryFile(Win32RegistryAccessor.Hive hive, Bitness bitness, java.lang.String keyPath, java.lang.String entryName)
          Tries to read registry
 java.lang.String readRegistryText(Win32RegistryAccessor.Hive hive, Bitness bitness, java.lang.String keyPath, java.lang.String entryName)
          Tries to read registry
 

Method Detail

readRegistryText

@Nullable
java.lang.String readRegistryText(@NotNull
                                           Win32RegistryAccessor.Hive hive,
                                           @NotNull
                                           Bitness bitness,
                                           @NotNull
                                           java.lang.String keyPath,
                                           @NotNull
                                           java.lang.String entryName)
Tries to read registry

Parameters:
hive - hive to look into
bitness - registry branch - x32 or x64.
keyPath - path to read.
entryName - key to read
Returns:
read value or null

readRegistryFile

@Nullable
java.io.File readRegistryFile(@NotNull
                                       Win32RegistryAccessor.Hive hive,
                                       @NotNull
                                       Bitness bitness,
                                       @NotNull
                                       java.lang.String keyPath,
                                       @NotNull
                                       java.lang.String entryName)
Tries to read registry

Parameters:
hive - hive to look into
bitness - registry branch - x32 or x64.
keyPath - path to read.
entryName - entryName to read
Returns:
read File if readed text is a path to an existing file or null

listSubKeys

@NotNull
java.util.Set<java.lang.String> listSubKeys(@NotNull
                                                    Win32RegistryAccessor.Hive hive,
                                                    @NotNull
                                                    Bitness bitness,
                                                    @NotNull
                                                    java.lang.String keyPath)
Enumerates sub key names of a given keyPath. i.e. for HKLM/Software/Microsoft it will definitly return 'Windows'

Parameters:
hive - hive
bitness - registry branch - x32 or x64.
keyPath - path to search
Returns:
key names without paths

listValueNames

@NotNull
java.util.Set<java.lang.String> listValueNames(@NotNull
                                                       Win32RegistryAccessor.Hive hive,
                                                       @NotNull
                                                       Bitness bitness,
                                                       @NotNull
                                                       java.lang.String keyPath)
Enumerates value names of a given keyPath.

Parameters:
hive - hive
bitness - registry branch - x32 or x64.
keyPath - path to search
Returns:
entries names without paths