]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5271: Clean up cruft, tweak comments.
authorAron Roberts <aron@socrates.berkeley.edu>
Sat, 9 Jun 2012 00:56:36 +0000 (17:56 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Sat, 9 Jun 2012 00:56:36 +0000 (17:56 -0700)
services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityResource.java
services/common/src/main/java/org/collectionspace/services/common/ResourceBase.java
services/contact/service/src/main/java/org/collectionspace/services/contact/AuthorityResourceWithContacts.java

index e1543c2c80078c7b1421c7659ae697f8ae4bd072..03fd6642d41071fd28b9644b24927d8e950f741d 100644 (file)
@@ -966,34 +966,7 @@ public abstract class AuthorityResource<AuthCommon, AuthItemHandler>
     }
     
     public String getItemDocType() {
-        // FIXME: Proof of concept placeholder
-        // return "item-" + getServiceName();
-        
         return super.getDocType(getItemServiceName());
-        
-        /*
-        // FIXME: Replace this outrageous hack; a tenant with this ID may not exist
-        String docType = "";
-        final String DEFAULT_TENANT_ID = "1";
-        TenantBindingConfigReaderImpl reader = ServiceMain.getInstance().getTenantBindingConfigReader();
-        ServiceBindingType sb = reader.getServiceBinding(DEFAULT_TENANT_ID, getItemServiceName());
-        docType = sb.getObject().getName();
-        return docType;
-        
-        String docType = "";
-        String arbitraryTenantId = "";
-        ServiceBindingType sb;
-        TenantBindingConfigReaderImpl reader = ServiceMain.getInstance().getTenantBindingConfigReader();
-        // FIXME: Makes the outrageous assumption that the list of service names and associated
-        // document types is essentially identical across tenants
-        arbitraryTenantId = getArbitraryTenantId(reader);
-        if (Tools.notBlank(arbitraryTenantId)) {
-            ServiceBindingType sb = reader.getServiceBinding(arbitraryTenantId, getItemServiceName());
-            docType = sb.getObject().getName();
-        }
-        return docType;
-        * 
-        */
     }
 
     @Override
index 5eecf059d63c63eea83713ce4eb1494bf5fa1c07..7dab7c32a8faaf3608057b7df845208a7bb41c36 100644 (file)
@@ -389,24 +389,25 @@ public abstract class ResourceBase
         return getDocType(getServiceName());\r
     }\r
         \r
-    // FIXME: This may well be a dreadful hack, just to get this initially working.\r
+    // FIXME: The technique in getDocType(String) may well be a dreadful hack, just to get this initially working.\r
     //\r
     // Question:\r
     // At the point we're seeking to populate docTypes in the uriTemplateRegistry, during system startup,\r
     // we're not yet logged into any tenant, but instead it appears we are acting as the user SPRING_ADMIN.\r
-    // Could this potentially suggest reasonable method(s), other than those below, by which we can obtain\r
-    // the docType(s) associated with the current resource?\r
+    // Could this potentially suggest reasonable method(s), other than those below, which reads from\r
+    // tenant bindings configuration for an arbitrary tenant, by which we can obtain the docType(s)\r
+    // associated with the current resource?\r
     \r
     public String getDocType(String serviceName) {\r
         String docType = "";\r
         String arbitraryTenantId = "";\r
         TenantBindingConfigReaderImpl reader = ServiceMain.getInstance().getTenantBindingConfigReader();\r
-        // FIXME: Makes the outrageous assumption that the list of service names and associated\r
-        // document types is essentially identical across tenants\r
+        // FIXME: Makes the likely unsupportable assumption that the list of service names and associated\r
+        // document types is materially identical across tenants\r
         arbitraryTenantId = getArbitraryTenantId(reader);\r
         if (Tools.notBlank(arbitraryTenantId)) {\r
             ServiceBindingType sb = reader.getServiceBinding(arbitraryTenantId, serviceName);\r
-            docType = sb.getObject().getName();\r
+            docType = sb.getObject().getName(); // reads the Nuxeo Document Type from tenant bindings configuration\r
         }\r
         return docType;\r
     }\r
index d81256c789432b740584ba502a15cf218c8cf30d..edf510c8a0b25813c47c8fef2fd4780f1baf310f 100644 (file)
@@ -301,6 +301,10 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
         return ContactConstants.NUXEO_DOCTYPE;
     }
 
+    // FIXME: This currently populates only one entry in the UriTemplateRegistry
+    // for the Contacts docType, even though contacts can be a sub-resource of
+    // multiple authority item resources.  (This method is called more than once,
+    // but each time the existing item with the same key in the map is overwritten.)
     @Override
     public Map<String,StoredValuesUriTemplate> getUriTemplateMap() {
         // Get resource and item URI templates from superclass