From: Richard Millet Date: Wed, 14 Nov 2018 01:22:12 +0000 (-0800) Subject: DRYD-540: Partial fix for qualifying a document type when looking up its Nuxeo lifecyle. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=e5451f74d6d1f387ecb78d4a1ef449cb004efd2d;p=tmp%2Fjakarta-migration.git DRYD-540: Partial fix for qualifying a document type when looking up its Nuxeo lifecyle. --- diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java index 3f87b3e9c..c5970e51c 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocumentModelHandler.java @@ -100,15 +100,22 @@ public abstract class DocumentModelHandler 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; } /*