camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/4] camel git commit: creation object with custom model
Date Thu, 29 Jan 2015 06:41:01 GMT
creation object with custom model


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/dbf8be1d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/dbf8be1d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/dbf8be1d

Branch: refs/heads/master
Commit: dbf8be1d79d0c0aa93c81eed91133a0e7c2bc824
Parents: b017a30
Author: bavadim@gmail.com <bavadim@gmail.com>
Authored: Fri Jan 23 14:14:54 2015 +0300
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Jan 29 07:36:12 2015 +0100

----------------------------------------------------------------------
 .../org/apache/camel/component/cmis/CMISSessionFacade.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/dbf8be1d/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
----------------------------------------------------------------------
diff --git a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
index 16f23d5..ff03d91 100644
--- a/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
+++ b/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java
@@ -190,8 +190,10 @@ public class CMISSessionFacade {
     }
 
     public boolean isObjectTypeVersionable(String objectType) {
-        if (CamelCMISConstants.CMIS_DOCUMENT.equals(objectType)) {
-            ObjectType typeDefinition = session.getTypeDefinition(objectType);
+        ObjectType typeDefinition = session.getTypeDefinition(objectType);
+        ObjectType objectBaseType = typeDefinition.getBaseType();
+        if (CamelCMISConstants.CMIS_DOCUMENT.equals(objectType) 
+                || (objectBaseType != null && CamelCMISConstants.CMIS_DOCUMENT.equals(objectBaseType.getId())))
{
             return ((DocumentType)typeDefinition).isVersionable();
         }
         return false;


Mime
View raw message