private String modifiedBy;
- private Date versionTimestamp;
-
private String path;
private String owner;
return version;
}
- public Date getVersionTimestamp() {
- return versionTimestamp;
- }
-
public String getUri() {
return "/" + container + "/" + path;
}
return nf.format(Double.valueOf(bytes)/(1024 * 1024 * 1024)) + " GB";
}
- public boolean isShared() {
+ public boolean isSharedOrPublished() {
return !permissions.isEmpty() || published;
}
+
+ public boolean isShared() {
+ return !permissions.isEmpty();
+ }
public void populate(Folder _parent, JSONObject o, String _owner, String _container) {
this.parent = _parent;
this.owner = _owner;
hash = unmarshallString(o, "hash");
bytes = unmarshallLong(o, "bytes");
- version = unmarshallInt(o, "version");
+ version = unmarshallInt(o, "x_object_version");
contentType = unmarshallString(o, "content_type");
lastModified = unmarshallDate(o, "last_modified");
- modifiedBy = unmarshallString(o, "modified_by");
- versionTimestamp = unmarshallDate(o, "version_timestamp");
+ modifiedBy = unmarshallString(o, "x_object_modified_by");
published = o.containsKey("x_object_public") ? true : false;
publicUri = unmarshallString(o, "x_object_public");
this.container = _container;
this.owner = _owner;
published = false;
publicUri = null;
+ permissions.clear();
for (Header h : response.getHeaders()) {
if (h == null)
continue; //IE bug. h cannot be null in the general case