]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
DRYD-480: Needed to retrieve service binding using unqualified document type.
authorRichard Millet <remillet@yahoo.com>
Thu, 11 Oct 2018 19:54:34 +0000 (12:54 -0700)
committerRichard Millet <remillet@yahoo.com>
Thu, 11 Oct 2018 19:54:34 +0000 (12:54 -0700)
services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java
services/servicegroup/service/src/main/java/org/collectionspace/services/servicegroup/nuxeo/ServiceGroupDocumentModelHandler.java

index 3147500e24ccca00815b6c9577e237536fdbf0f4..cc4fbdc066f1430841e71f83bb4cce93d69a1ce9 100644 (file)
@@ -40,6 +40,7 @@ import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.commons.io.FileUtils;
 import org.collectionspace.services.common.api.JEEServerDeployment;
 import org.collectionspace.services.common.api.Tools;
+import org.collectionspace.services.common.context.ServiceBindingUtils;
 import org.collectionspace.services.config.service.ServiceBindingType;
 import org.collectionspace.services.config.service.ServiceObjectType;
 import org.collectionspace.services.config.tenant.RepositoryDomainType;
@@ -463,7 +464,7 @@ public class TenantBindingConfigReaderImpl extends AbstractConfigReaderImpl<List
         * @return
         */
        public ServiceBindingType getServiceBindingForDocType(String tenantId, String docType) {
-               String key = getTenantQualifiedIdentifier(tenantId, docType);
+               String key = getTenantQualifiedIdentifier(tenantId, ServiceBindingUtils.getUnqualifiedTenantDocType(docType)); // REM - must use unqualified document type
                return docTypes.get(key);
        }
 
index 4878c866b7d6d6ba8abd9a2a4c8e17e63cb2feda..16c4350632791c06577326db3374c1a83c7f5b39 100644 (file)
@@ -127,7 +127,7 @@ public class ServiceGroupDocumentModelHandler
                Map<String, ServiceBindingType> queriedServiceBindings = new HashMap<String, ServiceBindingType>();
                DocumentModelList docList = this.getDocListForGroup(ctx, serviceGroupNames, queriedServiceBindings,
                                repoSession, repoClient);
-               if (docList == null) { // found no authRef fields - nothing to process
+               if (docList == null || docList.isEmpty()) { // found no authRef fields - nothing to process
                    throw new DocumentNotFoundException();
                }
                DocumentModel docModel = docList.get(0);