All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.wizards.registry.Registry
java.lang.Object
|
+----com.sun.wizards.registry.Registry
- public class Registry
- extends Object
- implements RegistryService
The Registry class is a facade for the registry
-
Registry(String)
- Creates a Registry object configured to read its data
from the specified directory.
-
createFolder(String)
- Creates a new registry folder.
-
deleteFolder(String)
- Removes a folder from the registry.
-
deleteValue(String)
- Removes a key/value pair from the registry.
-
getComponent(String)
- Returns the install description registered under the specified
GUID.
-
getComponent(String, String)
- Returns the install information for the component identified by the specified
GUID installed in the specified location.
-
getComponent(String, String, int)
- Returns the install description registered under the specified
GUID.
-
getComponentByFederatedName(String)
- Returns the install description registered under the specified
federatedName.
-
getComponentByFederatedName(String, String, int)
- Returns the install description registered under the specified
federatedName.
-
getComponentDescriptions(String)
- Returns the install information for the component identified by the specified
GUID installed in the specified location.
-
loadRegistryData()
- Opens the registry data file and reads the contents into this
registry object.
-
main(String[])
- A simple test for the registry.
-
printRegistry()
- Prints the registry in human readable form on the console.
-
readValue(String)
- Reads a value from the registry.
-
registerComponent(ComponentDescription)
- Registers the specified component in the registry.
-
saveRegistryData()
- Saves the registry data into the registry file.
-
setValue(String, Object)
- Sets a registry key/value pair.
-
unregisterComponent(ComponentDescription)
-
Registry
public Registry(String registryDir)
- Creates a Registry object configured to read its data
from the specified directory.
- Parameters:
- registryDir - The directory containing the registry data.
loadRegistryData
public void loadRegistryData()
- Opens the registry data file and reads the contents into this
registry object.
saveRegistryData
public void saveRegistryData()
- Saves the registry data into the registry file.
printRegistry
public void printRegistry()
- Prints the registry in human readable form on the console.
This is used for debugging.
readValue
public Object readValue(String keyName)
- Reads a value from the registry.
- Parameters:
- keyName - The registry key referencing the desired value.
- Returns:
- The object referenced by the specified key name.
setValue
public void setValue(String keyName,
Object value)
- Sets a registry key/value pair.
- Parameters:
- keyName - The registry key referencing the desired value.
- value - The value that maps to the specified registry key.
createFolder
public void createFolder(String folderName)
- Creates a new registry folder.
- Parameters:
- folderName - The registry folder to create.
deleteValue
public void deleteValue(String keyName)
- Removes a key/value pair from the registry.
- Parameters:
- keyName - The registry key referencing the value to be deleted.
deleteFolder
public void deleteFolder(String folderName)
- Removes a folder from the registry.
- Parameters:
- folderName - The registry folder to be removed.
registerComponent
public void registerComponent(ComponentDescription component)
- Registers the specified component in the registry.
unregisterComponent
public void unregisterComponent(ComponentDescription component)
getComponent
public ComponentDescription getComponent(String guid)
- Returns the install description registered under the specified
GUID. The install description returned will contain information
about the latest instance of the latest version of the component
currently installed.
- Parameters:
- guid - The Global Unique Identifier for the component.
getComponent
public ComponentDescription getComponent(String guid,
String version,
int instance)
- Returns the install description registered under the specified
GUID.
- Parameters:
- guid - The Global Unique Identifier for the component.
- version - The version of the component.
- instance - The install instance.
getComponentByFederatedName
public ComponentDescription getComponentByFederatedName(String federatedName)
- Returns the install description registered under the specified
federatedName. The install description returned will reflect
the latest installed instance of the latest version of the
specified component.
- Parameters:
- federatedName - the abbreviated product name.
getComponentByFederatedName
public ComponentDescription getComponentByFederatedName(String federatedName,
String version,
int instance)
- Returns the install description registered under the specified
federatedName.
- Parameters:
- federatedName - the abbreviated component name.
- version - The version of the component.
- instance - The install instance.
getComponent
public ComponentDescription getComponent(String guid,
String installLocation)
- Returns the install information for the component identified by the specified
GUID installed in the specified location.
- Parameters:
- guid - The Global Unique Identifier for this component.
- installLocation - The directory in which the component has been installed.
- Returns:
- The ComponentDescription for the specified component if it has been
installed in the specified location; null otherwise.
getComponentDescriptions
public ComponentDescription[] getComponentDescriptions(String guid)
- Returns the install information for the component identified by the specified
GUID installed in the specified location.
- Parameters:
- guid - The Global Unique Identifier for this component.
- Returns:
- The ComponentDescriptions for the specified component.
main
public static void main(String args[])
- A simple test for the registry. With no arguments
specified, the registry will be printed to the console.
All Packages Class Hierarchy This Package Previous Next Index