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;
* @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);
}
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);