Add a method to get LastFileUpdated name in rap environments.
authorBruno Sinou <bsinou@argeo.org>
Wed, 24 Aug 2011 21:53:57 +0000 (21:53 +0000)
committerBruno Sinou <bsinou@argeo.org>
Wed, 24 Aug 2011 21:53:57 +0000 (21:53 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@4697 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

eclipse/runtime/org.argeo.eclipse.ui.rap/src/main/java/org/argeo/eclipse/ui/specific/GenericUploadControl.java
eclipse/runtime/org.argeo.eclipse.ui.rcp/src/main/java/org/argeo/eclipse/ui/specific/GenericUploadControl.java

index 48806b496aa5138575a0f8da5c3f91ee4f441b00..e922e4b9bff64928df219fc4a333b63b77721be9 100644 (file)
@@ -36,6 +36,14 @@ public class GenericUploadControl extends Composite {
                parent.pack();
        }
 
+       /**
+        * Wrap upload.getLastFileUploaded(). Gets the name of the last uploaded
+        * file. This method can be called even if the upload has not finished yet.
+        */
+       public String getLastFileUploadedName() {
+               return upload.getLastFileUploaded();
+       }
+
        public boolean isControlEmpty() {
                String path = upload.getPath();
                if (log.isTraceEnabled())
index 8393006f62cd5288de41b1f645083c6a97a2bd45..f00196c302e6bb85dd394536793f982bd4238fc6 100644 (file)
@@ -83,6 +83,13 @@ public class GenericUploadControl extends Composite {
        public void addModifyListener(ModifyListener listener) {
                filePath.addModifyListener(listener);
        }
+       
+       /**
+        * Always returns null in an RCP environment
+        */
+       public String getLastFileUploadedName() {
+               return null;
+       }
 
        // private class UploadManager extends UploadAdapter {
        // private Upload upload;