You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/01/29 07:41:01 UTC
[3/4] camel git commit: creation object with custom model
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 <ba...@gmail.com>
Authored: Fri Jan 23 14:14:54 2015 +0300
Committer: Claus Ibsen <da...@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;