Removed unused property
[pithos-web-client] / src / gr / grnet / pithos / web / client / foldertree / File.java
index 6cb4282..83aeeb8 100644 (file)
@@ -63,8 +63,6 @@ public class File extends Resource {
 
     private String modifiedBy;
 
-    private Date versionTimestamp;
-
     private String path;
 
     private String owner;
@@ -108,10 +106,6 @@ public class File extends Resource {
         return version;
     }
 
-    public Date getVersionTimestamp() {
-        return versionTimestamp;
-    }
-
     public String getUri() {
         return "/" + container + "/" + path;
     }
@@ -139,9 +133,13 @@ public class File extends Resource {
         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;
@@ -153,11 +151,10 @@ public class File extends Resource {
         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;
@@ -228,6 +225,7 @@ public class File extends Resource {
         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