static void show(StorageObject object) { System.out.println("name: " + object.getName()); System.out.println("size: " + object.getSize()); System.out.println("contentType: " + object.getContentType()); System.out.println("updated: " + object.getUpdated()); System.out.println("owner: " + object.getOwner()); // should only show up if projection is full. // System.out.println("acl: " + object.getAcl()); }
int indexOfLastSlash = itemName.lastIndexOf("/"); Map<String, Object> objectMetadataMap = new HashMap<>(); long updatedTimestamp = item.getUpdated().getValue();
builder.setDeleteTime(storageObject.getTimeDeleted().getValue()); if (storageObject.getUpdated() != null) { builder.setUpdateTime(storageObject.getUpdated().getValue());
public void downloadStorageObjectRelative(StorageObject obj, String ignorePrefix, String baseDirectory) throws IOException { InputStream stream = openObjectStream(obj.getBucket(), obj.getName()); String objPath = obj.getName(); if (!ignorePrefix.isEmpty()) { ignorePrefix += File.separator; if (!objPath.startsWith(ignorePrefix)) { throw new IllegalArgumentException(objPath + " does not start with '" + ignorePrefix + "'"); } objPath = objPath.substring(ignorePrefix.length()); } File target = new File(baseDirectory, objPath); ArtifactUtils.writeStreamToFile(stream, target); target.setLastModified(obj.getUpdated().getValue()); stream.close(); }
object.getUpdated().getValue(), object.getSize().longValue(),
builder.deleteTime(storageObject.getTimeDeleted().getValue()); if (storageObject.getUpdated() != null) { builder.updateTime(storageObject.getUpdated().getValue());
builder.setDeleteTime(storageObject.getTimeDeleted().getValue()); if (storageObject.getUpdated() != null) { builder.setUpdateTime(storageObject.getUpdated().getValue());