chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1348051 - /chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModel.java
Date Fri, 08 Jun 2012 12:54:52 GMT
Author: fmui
Date: Fri Jun  8 12:54:51 2012
New Revision: 1348051

URL: http://svn.apache.org/viewvc?rev=1348051&view=rev
Log:
CMIS-540: Workbench: don't ask for cmis:relationship directly

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModel.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModel.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModel.java?rev=1348051&r1=1348050&r2=1348051&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModel.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModel.java
Fri Jun  8 12:54:51 2012
@@ -135,12 +135,13 @@ public class ClientModel {
     }
 
     public synchronized boolean supportsRelationships() {
-        try {
-            ObjectType relType = clientSession.getSession().getTypeDefinition(BaseTypeId.CMIS_RELATIONSHIP.value());
-            return relType != null;
-        } catch (Exception e) {
-            return false;
+        for (ObjectType type : clientSession.getSession().getTypeChildren(null, false)) {
+            if (type.getBaseTypeId() == BaseTypeId.CMIS_RELATIONSHIP) {
+                return true;
+            }
         }
+
+        return false;
     }
 
     public synchronized ObjectId loadFolder(String folderId, boolean byPath) throws Exception
{



Mime
View raw message