// ResourceBundle props = ResourceBundle.getBundle("eu.mosaic.cloud.amazon.AwsCredentials");
//
// System.out.println("Access Key = " + props.getString("accessKey"));
// System.out.println("Amazon Key = " + props.getString("secretKey"));
DriverConnection ac = Connection.getConnection(storageProvider);
if(ac instanceof DriverConnection){
System.out.println("Is DriverConnection");
try{
//create a bucket
//ac.createRepository(CloudHelper.getUUID());
//retrieve the list of all the buckets
List<Repository> buckets = ac.getRepositories();
for(Repository crtBucket: buckets){
System.out.println("bucket = " + crtBucket.getName());
}
//ac.deleteRepository("2d9d4b1c-5e4b-4d6d-af70-65a8401c3b3f");
//retrieve the list of all the buckets
buckets = ac.getRepositories();
for(Repository crtBucket: buckets){
System.out.println("bucket = " + crtBucket.getName());
}
String target = "ba4d8fd9-9924-4c35-b77a-0bd99cdd27ff";
File f = new File("C:\\Projects\\Doctorat\\clouddb\\Driver API\\data\\ares.jpg");
ac.store(target, "Ares", f);
//ac.copy("ba4d8fd9-9924-4c35-b77a-0bd99cdd27ff", "Ares", "5fe65b49-b08e-47da-8b8e-74559cb0a2e7", "Hannibal");
ac.move("5fe65b49-b08e-47da-8b8e-74559cb0a2e7", "Hannibal", "7167af05-bc56-450a-92ec-d02c1bbd35c0", "Hannibalus");
//ac.store("", "", new Object());
}catch(Exception e){
e.printStackTrace();
}