chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1777339 - in /chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench: swing/ActionPanel.java worker/LoadFolderWorker.java worker/LoadObjectWorker.java
Date Wed, 04 Jan 2017 16:41:39 GMT
Author: fmui
Date: Wed Jan  4 16:41:39 2017
New Revision: 1777339

URL: http://svn.apache.org/viewvc?rev=1777339&view=rev
Log:
Worbench: fixed object reload

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/swing/ActionPanel.java
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/worker/LoadFolderWorker.java
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/worker/LoadObjectWorker.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/swing/ActionPanel.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/swing/ActionPanel.java?rev=1777339&r1=1777338&r2=1777339&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/swing/ActionPanel.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/swing/ActionPanel.java
Wed Jan  4 16:41:39 2017
@@ -39,6 +39,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.workbench.ClientHelper;
 import org.apache.chemistry.opencmis.workbench.WorkbenchScale;
 import org.apache.chemistry.opencmis.workbench.model.ClientModel;
+import org.apache.chemistry.opencmis.workbench.worker.LoadFolderWorker;
 import org.apache.chemistry.opencmis.workbench.worker.LoadObjectWorker;
 
 public abstract class ActionPanel extends JPanel implements ActionListener {
@@ -126,7 +127,7 @@ public abstract class ActionPanel extend
 
     protected void reload(final boolean reloadObject) {
         if (model.getCurrentFolder() != null) {
-            LoadObjectWorker worker = new LoadObjectWorker(ActionPanel.this, model, model.getCurrentFolder().getId())
{
+            LoadFolderWorker worker = new LoadFolderWorker(ActionPanel.this, model, model.getCurrentFolder().getId())
{
                 @Override
                 protected void done() {
                     super.done();

Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/worker/LoadFolderWorker.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/worker/LoadFolderWorker.java?rev=1777339&r1=1777338&r2=1777339&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/worker/LoadFolderWorker.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/worker/LoadFolderWorker.java
Wed Jan  4 16:41:39 2017
@@ -28,7 +28,7 @@ import org.apache.chemistry.opencmis.wor
 
 public class LoadFolderWorker extends InfoWorkbenchWorker {
 
-    private ClientModel model;
+    final private ClientModel model;
     private String id;
     private boolean byPath;
 
@@ -66,6 +66,22 @@ public class LoadFolderWorker extends In
         }
     }
 
+    public LoadFolderWorker(Component comp, ClientModel model, String id) {
+        super(comp);
+
+        this.model = model;
+        this.id = id;
+        this.byPath = false;
+
+        if (this.id != null) {
+            if (this.id.length() == 0) {
+                this.id = "/";
+            }
+
+            byPath = id.charAt(0) == '/';
+        }
+    }
+
     public LoadFolderWorker(Window parent, ClientModel model, String id) {
         super(parent);
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/worker/LoadObjectWorker.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/worker/LoadObjectWorker.java?rev=1777339&r1=1777338&r2=1777339&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/worker/LoadObjectWorker.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/worker/LoadObjectWorker.java
Wed Jan  4 16:41:39 2017
@@ -34,13 +34,13 @@ public class LoadObjectWorker extends In
 
     public static void reloadObject(Component comp, ClientModel model) {
         if (model.getCurrentObject() != null) {
-            (new LoadObjectWorker(comp, model, model.getCurrentObject().getId())).executeTask();
+            (new LoadObjectWorker(comp, model, null)).executeTask();
         }
     }
 
     public static void reloadObject(Window parent, ClientModel model) {
         if (model.getCurrentObject() != null) {
-            (new LoadObjectWorker(parent, model, model.getCurrentObject().getId())).executeTask();
+            (new LoadObjectWorker(parent, model, null)).executeTask();
         }
     }
 
@@ -69,13 +69,6 @@ public class LoadObjectWorker extends In
     }
 
     @Override
-    public void executeTask() {
-        if (id != null) {
-            super.executeTask();
-        }
-    }
-
-    @Override
     protected Object doInBackground() throws Exception {
         if (id == null) {
             model.reloadObject();



Mime
View raw message