chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1214460 - in /chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench: CreateDocumentDialog.java CreateFolderDialog.java CreateRelationshipDialog.java
Date Wed, 14 Dec 2011 20:50:21 GMT
Author: fmui
Date: Wed Dec 14 20:50:21 2011
New Revision: 1214460

URL: http://svn.apache.org/viewvc?rev=1214460&view=rev
Log:
Workbench: loading objects after creation

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateDocumentDialog.java
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateFolderDialog.java
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateRelationshipDialog.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateDocumentDialog.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateDocumentDialog.java?rev=1214460&r1=1214459&r2=1214460&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateDocumentDialog.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateDocumentDialog.java
Wed Dec 14 20:50:21 2011
@@ -242,9 +242,10 @@ public class CreateDocumentDialog extend
                         versioningState = VersioningState.CHECKEDOUT;
                     }
 
+                    ObjectId objectId = null;
                     if (filename.length() > 0) {
                         // create a document from a file
-                        ObjectId objectId = getClientModel().createDocument(name, type, filename,
versioningState,
+                        objectId = getClientModel().createDocument(name, type, filename,
versioningState,
                                 unfiledButton.isSelected());
 
                         if (verifyAfterUploadButton.isSelected()) {
@@ -263,7 +264,7 @@ public class CreateDocumentDialog extend
                             }
                         }
 
-                        ObjectId objectId = getClientModel().createDocument(name, type, length,
seed, versioningState,
+                        objectId = getClientModel().createDocument(name, type, length, seed,
versioningState,
                                 unfiledButton.isSelected());
 
                         if (verifyAfterUploadButton.isSelected()) {
@@ -272,6 +273,10 @@ public class CreateDocumentDialog extend
                         }
                     }
 
+                    if (objectId != null) {
+                        getClientModel().loadObject(objectId.getId());
+                    }
+
                     thisDialog.setVisible(false);
                     thisDialog.dispose();
                 } catch (Exception e) {

Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateFolderDialog.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateFolderDialog.java?rev=1214460&r1=1214459&r2=1214460&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateFolderDialog.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateFolderDialog.java
Wed Dec 14 20:50:21 2011
@@ -28,6 +28,7 @@ import javax.swing.JComboBox;
 import javax.swing.JOptionPane;
 import javax.swing.JTextField;
 
+import org.apache.chemistry.opencmis.client.api.ObjectId;
 import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.workbench.model.ClientModel;
 import org.apache.chemistry.opencmis.workbench.swing.CreateDialog;
@@ -70,7 +71,11 @@ public class CreateFolderDialog extends 
                 try {
                     setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
 
-                    getClientModel().createFolder(name, type);
+                    ObjectId objectId = getClientModel().createFolder(name, type);
+
+                    if (objectId != null) {
+                        getClientModel().loadObject(objectId.getId());
+                    }
 
                     thisDialog.setVisible(false);
                     thisDialog.dispose();

Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateRelationshipDialog.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateRelationshipDialog.java?rev=1214460&r1=1214459&r2=1214460&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateRelationshipDialog.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/CreateRelationshipDialog.java
Wed Dec 14 20:50:21 2011
@@ -28,6 +28,7 @@ import javax.swing.JComboBox;
 import javax.swing.JOptionPane;
 import javax.swing.JTextField;
 
+import org.apache.chemistry.opencmis.client.api.ObjectId;
 import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.workbench.model.ClientModel;
 import org.apache.chemistry.opencmis.workbench.swing.CreateDialog;
@@ -83,7 +84,11 @@ public class CreateRelationshipDialog ex
                 try {
                     setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
 
-                    getClientModel().createRelationship(name, type, sourceId, targetId);
+                    ObjectId objectId = getClientModel().createRelationship(name, type, sourceId,
targetId);
+
+                    if (objectId != null) {
+                        getClientModel().loadObject(objectId.getId());
+                    }
 
                     thisDialog.setVisible(false);
                     thisDialog.dispose();



Mime
View raw message