This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

The RegistryClientUtils Class

The RegistryClientUtils class is used to provide client-side utilities for Remote Registry. If a user wants to import a registry to a local file system or export a local file system to a remote registry, then they can use this utility class.

Constructor

public RegistryClientUtils()

Methods



The importToRegistry Method

This method can be used to import a local file system into a running instance of a registry. To do this, you need to create a file object representing the local file and tell it where in the registry to add the resource.

public static void importToRegistry(java.io.File file,
                                          java.lang.String path,
                                          Registry registry)

                                   throws RegistryException
Parameters

Name

Description

file

File representing the local file system

path

Where to put the file

registry

Registry instance

Throws

RegistryException - This exception is thrown if something goes wrong.


The exportFromRegistry Method

This method can be used to export a registry instance or a node in a registry to a local file system. When you use this method, a matching file structure will be created to map the structure in the registry.

public static void exportFromRegistry(java.io.File toFile,
                                      java.lang.String path,
                                      Registry registry)

                               throws RegistryException
Parameters

Name

Description

toFile

File in the local file system

path

The export destination node

registry

Registry instance

Throws

RegistryException - This exception is thrown if something goes wrong.