portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1178649 - /portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
Date Tue, 04 Oct 2011 00:40:14 GMT
Author: ate
Date: Tue Oct  4 00:40:14 2011
New Revision: 1178649

URL: http://svn.apache.org/viewvc?rev=1178649&view=rev
Log:
JS2-1261: PortalSiteManager export feature is broken since upgrade to Wicket 1.4.17
See: http://issues.apache.org/jira/browse/JS2-1261

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java?rev=1178649&r1=1178648&r2=1178649&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
Tue Oct  4 00:40:14 2011
@@ -2159,6 +2159,10 @@ public class PortalSiteManager extends A
         private String fileName;
 
         private String filePath;
+        
+        private long length = -1; // default or fallback to ensure stream writing works anyways
+        
+        private long lastModified;
 
         /**
          * @param fileName
@@ -2216,12 +2220,12 @@ public class PortalSiteManager extends A
 
         public long getLastModified()
         {
-            return 0;
+            return lastModified;
         }
 
         public long getLength()
         {
-            return 0;
+            return length;
         }
 
         public String getName()
@@ -2246,6 +2250,12 @@ public class PortalSiteManager extends A
         {
             exportObject = exportJetspeedtObject(node, recursively, userName);
             filePath = exportObject.getFilePath();
+            File f = new File(filePath);
+            if (f.exists())
+            {
+                length = f.length();
+                lastModified = f.lastModified();
+            }
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message