Advertisement
Guest User

Untitled

a guest
Aug 19th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. String tenantDomain = “mytenant.com";
  2. String url = "https://localhost:9443/t/"+tenantDomain+"/registry";
  3. String userName = “admin@mytenant.com";
  4.  
  5. String password = “admin";
  6.  
  7. System.setProperty("carbon.repo.write.mode", "true");
  8.  
  9.  
  10. //Get the file which needs to be added to the registry
  11. File file = new File(“/home/bob/Desktop/myPayload.json");
  12. RemoteRegistry remote_registry = new RemoteRegistry(new URL(url), userName, password);
  13.  
  14. //Import the file to config registry
  15. RegistryClientUtils.importToRegistry(file ,"/_system/config" ,remote_registry);
  16.  
  17. //Export from registry
  18. //RegistryClientUtils.exportFromRegistry(file ,"/_system/governance/SomePayload.json" ,remote_registry);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement