]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5012: More minor cleanup.
authorAron Roberts <aron@socrates.berkeley.edu>
Fri, 25 May 2012 22:34:09 +0000 (15:34 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Fri, 25 May 2012 22:34:09 +0000 (15:34 -0700)
services/imports/service/src/main/java/org/collectionspace/services/imports/TemplateExpander.java

index 566f0e0d5e9023d722eacfc20e9aea92438a74db..c6af311393c21d1d3527872ff314737653ba887c 100644 (file)
@@ -155,7 +155,6 @@ public class TemplateExpander {
         ServiceBindingType sb = tReader.getServiceBindingForDocType(tenantId, SERVICE_TYPE);
         
         String serviceType = sb.getType();
-        String serviceName = "";
         String uri = "";
         if (serviceType.equalsIgnoreCase(AUTHORITY_TYPE)) {
             String authoritySvcName = getAuthoritySvcName(SERVICE_TYPE);
@@ -166,7 +165,7 @@ public class TemplateExpander {
             uri = getAuthorityUri(authoritySvcName, inAuthorityID, docID);
        } else if (serviceType.equalsIgnoreCase(OBJECT_TYPE) ||
                serviceType.equalsIgnoreCase(PROCEDURE_TYPE) ) {
-            serviceName = sb.getName().toLowerCase();
+            String serviceName = sb.getName().toLowerCase();
             uri = getUri(serviceName, docID);
        } else {
            // Currently returns a blank URI for any other cases,
@@ -200,8 +199,8 @@ public class TemplateExpander {
         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 the base
-        // document type.
+        // 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));