Send and display modification dates for shared, others and trash namespaces, since...
authorPanagiotis Astithas <pastith@gmail.com>
Thu, 29 Oct 2009 15:53:53 +0000 (17:53 +0200)
committerPanagiotis Astithas <pastith@gmail.com>
Thu, 29 Oct 2009 15:53:53 +0000 (17:53 +0200)
src/gr/ebs/gss/client/rest/resource/OtherUserResource.java
src/gr/ebs/gss/client/rest/resource/SharedResource.java
src/gr/ebs/gss/client/rest/resource/TrashResource.java
src/gr/ebs/gss/server/rest/OthersHandler.java
src/gr/ebs/gss/server/rest/SharedHandler.java
src/gr/ebs/gss/server/rest/TrashHandler.java

index 6b099fb..c26a393 100644 (file)
@@ -173,6 +173,9 @@ public class OtherUserResource extends RestResource{
                                                Date fcreationDate = null;
                                                if (fo.get("creationDate") != null)
                                                        fcreationDate = new Date(new Long(fo.get("creationDate").toString()));
+                                               Date fmodificationDate = null;
+                                               if (fo.get("modificationDate") != null)
+                                                       fmodificationDate = new Date(new Long(fo.get("modificationDate").toString()));
                                                String furi = unmarshallString(fo,"uri");
                                                Long fsize = 0L;
                                                if(fo.get("size") != null)
@@ -188,6 +191,7 @@ public class OtherUserResource extends RestResource{
                                                fs.setContentLength(fsize);
                                                fs.setDeleted(fdeleted);
                                                fs.setCreationDate(fcreationDate);
+                                               fs.setModificationDate(fmodificationDate);
                                                fs.setContentType(fcontent);
                                                files.add(fs);
                                        }
index 012994d..a37b6ab 100644 (file)
@@ -156,6 +156,9 @@ public class SharedResource extends RestResource{
                                                Date fcreationDate = null;
                                                if (fo.get("creationDate") != null)
                                                        fcreationDate = new Date(new Long(fo.get("creationDate").toString()));
+                                               Date fmodificationDate = null;
+                                               if (fo.get("modificationDate") != null)
+                                                       fmodificationDate = new Date(new Long(fo.get("modificationDate").toString()));
                                                String furi = unmarshallString(fo,"uri");
                                                Long fsize = 0L;
                                                if(fo.get("size") != null)
@@ -171,6 +174,7 @@ public class SharedResource extends RestResource{
                                                fs.setContentLength(fsize);
                                                fs.setDeleted(fdeleted);
                                                fs.setCreationDate(fcreationDate);
+                                               fs.setModificationDate(fmodificationDate);
                                                fs.setContentType(fcontent);
                                                files.add(fs);
                                        }
index 588e1a3..0c04f9d 100644 (file)
@@ -158,6 +158,9 @@ public class TrashResource extends RestResource{
                                                Date fcreationDate = null;
                                                if (fo.get("creationDate") != null)
                                                        fcreationDate = new Date(new Long(fo.get("creationDate").toString()));
+                                               Date fmodificationDate = null;
+                                               if (fo.get("modificationDate") != null)
+                                                       fmodificationDate = new Date(new Long(fo.get("modificationDate").toString()));
                                                String furi = unmarshallString(fo,"uri");
                                                Long fsize = 0L;
                                                if(fo.get("size") != null)
@@ -171,6 +174,7 @@ public class TrashResource extends RestResource{
                                                fs.setDeleted(fdeleted);
                                                fs.setPath(fpath);
                                                fs.setCreationDate(fcreationDate);
+                                               fs.setModificationDate(fmodificationDate);
                                                fs.setContentType(fcontent);
                                                files.add(fs);
                                        }
index 602a890..8543c84 100644 (file)
@@ -128,6 +128,7 @@ public class OthersHandler extends RequestHandler {
                                        put("size", f.getFileSize()).
                                        put("content", f.getMimeType()).
                                        put("creationDate", f.getAuditInfo().getCreationDate().getTime()).
+                                       put("modificationDate", f.getAuditInfo().getModificationDate().getTime()).
                                        put("path", f.getFolder().getPath()).
                                        put("uri", getApiRoot() + f.getURI());
                                files.add(j);
index af87c5f..b2b5d23 100644 (file)
@@ -96,6 +96,7 @@ public class SharedHandler extends RequestHandler {
                                        put("content", f.getMimeType()).
                                        put("path", f.getFolder().getPath()).
                                        put("creationDate", f.getAuditInfo().getCreationDate().getTime()).
+                                       put("modificationDate", f.getAuditInfo().getModificationDate().getTime()).
                                        put("uri", getApiRoot() + f.getURI());
                                JSONObject jf = new JSONObject();
                                jf.put("uri", getApiRoot() + f.getFolder().getURI()).
index ef47b51..281dbc4 100644 (file)
@@ -119,6 +119,7 @@ public class TrashHandler extends RequestHandler {
                                        put("content", f.getMimeType()).
                                        put("path", f.getFolder().getPath()).
                                        put("creationDate", f.getAuditInfo().getCreationDate().getTime()).
+                                       put("modificationDate", f.getAuditInfo().getModificationDate().getTime()).
                                put("uri", getApiRoot() + f.getURI());
                                JSONObject p = new JSONObject();
                                p.put("uri", getApiRoot() + f.getFolder().getURI()).