org.wso2.carbon.registry.core.utils
Class RegistryClientUtils

java.lang.Object
  extended by org.wso2.carbon.registry.core.utils.RegistryClientUtils

public class RegistryClientUtils
extends Object

This class is used to provide client side utilities when someone uses Remote registry If user want to import Registry to a local file system or export a local file system into a remote registry (s)he can use this utility class.


Constructor Summary
RegistryClientUtils()
           
 
Method Summary
static void exportFromRegistry(File toFile, String path, Registry registry)
          This method can be used to export registry instance or node in a registry to a local file system.
static void importToRegistry(File file, String path, Registry registry)
          This method can be used to import a local file system into a running instance of a registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryClientUtils

public RegistryClientUtils()
Method Detail

importToRegistry

public static void importToRegistry(File file,
                                    String path,
                                    Registry registry)
                             throws RegistryException
This method can be used to import a local file system into a running instance of a registry. Need to create a file object representing the local file and the need to tell where to add the resource in the registry.

Parameters:
file - : File representing local file system
path - : Where to put the file
registry - : Registry instance
Throws:
RegistryException - : if something went wrong

exportFromRegistry

public static void exportFromRegistry(File toFile,
                                      String path,
                                      Registry registry)
                               throws RegistryException
This method can be used to export registry instance or node in a registry to a local file system. When we call this method a file structure will be created to match the structure to map the structure in the registry

Parameters:
toFile - : File in the local file system
path - : To which node export
registry - : Registry instance
Throws:
RegistryException - : If something went wrong


Copyright © 2014 WSO2 Inc. All Rights Reserved.