]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
DRYD-540: Partial fix for qualifying a document type when looking up its Nuxeo lifecyle.
authorRichard Millet <remillet@yahoo.com>
Wed, 14 Nov 2018 01:22:12 +0000 (17:22 -0800)
committerRichard Millet <remillet@yahoo.com>
Wed, 14 Nov 2018 01:22:12 +0000 (17:22 -0800)
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java

index 3f87b3e9ccc5386de74e679cbc0044ed3e323c90..c5970e51c5bf0640c17d90f528e36b01b8c55484 100644 (file)
@@ -100,15 +100,22 @@ public abstract class DocumentModelHandler<T, TL>
        
        String docTypeName = null;
        try {
-               docTypeName = this.getServiceContext().getDocumentType();
+               docTypeName = this.getServiceContext().getTenantQualifiedDoctype();
                result = getLifecycle(docTypeName);
+               if (result == null) {
+                   //
+                   // Get the lifecycle of the generic type if one for the tenant qualified type doesn't exist
+                   //
+            docTypeName = this.getServiceContext().getDocumentType();
+            result = getLifecycle(docTypeName);
+               }
        } catch (Exception e) {
                if (logger.isTraceEnabled() == true) {
                        logger.trace("Could not retrieve lifecycle definition for Nuxeo doctype: " + docTypeName);
                }
        }
        
-       return result;
+           return result;
     }
     
     /*