]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5012: Remove redundant code block following Ray's change to always remove...
authorAron Roberts <aron@socrates.berkeley.edu>
Wed, 30 May 2012 16:50:57 +0000 (09:50 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Wed, 30 May 2012 16:50:57 +0000 (09:50 -0700)
services/imports/service/src/main/java/org/collectionspace/services/imports/TemplateExpander.java

index dcfd5ba3ee5c060e5856d70c081b20e691777e1f..f8d05713802f9279a92815529754e5364350b1fc 100644 (file)
@@ -155,7 +155,11 @@ public class TemplateExpander {
         final String PROCEDURE_SERVICE_CATEGORY = "procedure";
 
         TenantBindingConfigReaderImpl tReader = ServiceMain.getInstance().getTenantBindingConfigReader();
-        ServiceBindingType sb = tReader.getServiceBindingForDocType(tenantId, ServiceBindingUtils.getUnqualifiedTenantDocType(docType));
+        // We may have been supplied with the tenant-qualified name
+        // of an extension to a document type, and thus need to
+        // get the base document type name.
+        ServiceBindingType sb =
+            tReader.getServiceBindingForDocType(tenantId, ServiceBindingUtils.getUnqualifiedTenantDocType(docType));
 
         String serviceCategory = sb.getType();
         String uri = "";
@@ -198,17 +202,11 @@ public class TemplateExpander {
         return docTypeSvcNameRegistry;
     }
     
+    /**
+     * Return the parent authority service name, based on the item document type.
+     */
     private static String getAuthoritySvcName(String docType) {
-        String authoritySvcName = getDocTypeSvcNameRegistry().get(docType);
-        // If an authority document type name isn't matched by a name in the
-        // registry, we may have been supplied with the tenant-qualified name
-        // of an extension to that document type. In that case, get and use
-        // its base document type name in the registry lookup.
-        if (Tools.isBlank(authoritySvcName)) {
-            authoritySvcName = getDocTypeSvcNameRegistry().get(
-                    ServiceBindingUtils.getUnqualifiedTenantDocType(docType));
-        }
-        return authoritySvcName;
+        return getDocTypeSvcNameRegistry().get(docType);
     }
     
     // FIXME: The following URI construction methods are also intended to be