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


Constructor Index

 o Registry(String)
Creates a Registry object configured to read its data from the specified directory.

Method Index

 o createFolder(String)
Creates a new registry folder.
 o deleteFolder(String)
Removes a folder from the registry.
 o deleteValue(String)
Removes a key/value pair from the registry.
 o getComponent(String)
Returns the install description registered under the specified GUID.
 o getComponent(String, String)
Returns the install information for the component identified by the specified GUID installed in the specified location.
 o getComponent(String, String, int)
Returns the install description registered under the specified GUID.
 o getComponentByFederatedName(String)
Returns the install description registered under the specified federatedName.
 o getComponentByFederatedName(String, String, int)
Returns the install description registered under the specified federatedName.
 o getComponentDescriptions(String)
Returns the install information for the component identified by the specified GUID installed in the specified location.
 o loadRegistryData()
Opens the registry data file and reads the contents into this registry object.
 o main(String[])
A simple test for the registry.
 o printRegistry()
Prints the registry in human readable form on the console.
 o readValue(String)
Reads a value from the registry.
 o registerComponent(ComponentDescription)
Registers the specified component in the registry.
 o saveRegistryData()
Saves the registry data into the registry file.
 o setValue(String, Object)
Sets a registry key/value pair.
 o unregisterComponent(ComponentDescription)

Constructors

 o 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.

Methods

 o loadRegistryData
 public void loadRegistryData()
Opens the registry data file and reads the contents into this registry object.

 o saveRegistryData
 public void saveRegistryData()
Saves the registry data into the registry file.

 o printRegistry
 public void printRegistry()
Prints the registry in human readable form on the console. This is used for debugging.

 o 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.
 o 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.
 o createFolder
 public void createFolder(String folderName)
Creates a new registry folder.

Parameters:
folderName - The registry folder to create.
 o 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.
 o deleteFolder
 public void deleteFolder(String folderName)
Removes a folder from the registry.

Parameters:
folderName - The registry folder to be removed.
 o registerComponent
 public void registerComponent(ComponentDescription component)
Registers the specified component in the registry.

 o unregisterComponent
 public void unregisterComponent(ComponentDescription component)
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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