org.wso2.carbon.registry.core.utils
Class RegistryClientUtils
java.lang.Object
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.
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 |
RegistryClientUtils
public RegistryClientUtils()
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 systempath
- : Where to put the fileregistry
- : 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 systempath
- : To which node exportregistry
- : Registry instance
- Throws:
RegistryException
- : If something went wrong
Copyright © 2014 WSO2 Inc. All Rights Reserved.