use of com.emc.storageos.model.object.BucketDeleteParam in project coprhd-controller by CoprHD.
the class DeactivateBucket method doExecute.
@Override
protected Task<BucketRestRep> doExecute() throws Exception {
BucketDeleteParam param = new BucketDeleteParam();
param.setForceDelete(true);
return getClient().objectBuckets().deactivate(bucketId, param);
}
use of com.emc.storageos.model.object.BucketDeleteParam in project coprhd-controller by CoprHD.
the class ObjectBuckets method delete.
private static void delete(List<URI> ids, String deleteType) {
if (ids != null) {
ViPRCoreClient client = BourneUtil.getViprClient();
List<Task<BucketRestRep>> tasks = Lists.newArrayList();
for (URI id : ids) {
boolean forceDelete = false;
Task<BucketRestRep> task = client.objectBuckets().deactivate(id, new BucketDeleteParam(forceDelete, deleteType));
tasks.add(task);
}
if (!tasks.isEmpty()) {
flash.put("info", MessagesUtils.get("resources.buckets.deactivate", tasks.size()));
}
}
buckets(null);
}
use of com.emc.storageos.model.object.BucketDeleteParam in project coprhd-controller by CoprHD.
the class ObjectBuckets method deleteBucket.
@FlashException(referrer = { "bucket" })
public static void deleteBucket(String bucketId, String deleteType) {
if (StringUtils.isNotBlank(bucketId)) {
ViPRCoreClient client = BourneUtil.getViprClient();
boolean forceDelete = false;
Task<BucketRestRep> task = client.objectBuckets().deactivate(uri(bucketId), new BucketDeleteParam(forceDelete, deleteType));
flash.put("info", MessagesUtils.get("resources.bucket.deactivate"));
}
bucket(bucketId);
}
Aggregations