]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5271: Added debugging to dump UriTemplateRegistry contents.
authorAron Roberts <aron@socrates.berkeley.edu>
Fri, 8 Jun 2012 21:53:36 +0000 (14:53 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Fri, 8 Jun 2012 21:53:36 +0000 (14:53 -0700)
services/JaxRsServiceProvider/src/main/java/org/collectionspace/services/jaxrs/CollectionSpaceJaxRsApplication.java
services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityResource.java
services/common/src/main/java/org/collectionspace/services/common/UriTemplateRegistry.java
services/contact/service/src/main/java/org/collectionspace/services/contact/AuthorityResourceWithContacts.java

index b476f562067a71d2c87cf298194a096cc01a942e..15a3008a3f2923d48cffe60463f1b3d4b0c948d8 100644 (file)
@@ -59,16 +59,13 @@ import javax.ws.rs.core.Context;
 
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Set;
 
 //import org.collectionspace.services.common.FileUtils;
 import org.collectionspace.services.authorization.PermissionResource;
 import org.collectionspace.services.authorization.RoleResource;
-import org.collectionspace.services.common.ResourceBase;
-import org.collectionspace.services.common.ResourceMap;
-import org.collectionspace.services.common.ResourceMapHolder;
-import org.collectionspace.services.common.ResourceMapImpl;
-import org.collectionspace.services.common.UriTemplateRegistry;
+import org.collectionspace.services.common.*;
 import org.collectionspace.services.common.security.SecurityInterceptor;
 import org.jboss.resteasy.core.Dispatcher;
 import org.jboss.resteasy.spi.ResteasyProviderFactory;
@@ -131,6 +128,10 @@ public class CollectionSpaceJaxRsApplication extends Application
         addResourceToMapAndSingletons(new ReportResource());
 
         singletons.add(new IDResource());
+        
+        // FIXME: Temporary for CSPACE-5271
+        uriTemplateRegistry.dump();
+        
         /*
         singletons.add(new WorkflowResource());
         */
index 1ebd88a3b07a0973a71db42eca5fd40072219f4c..b2aca1fd55301042627ccc971aa58ed82a29efbf 100644 (file)
@@ -963,7 +963,7 @@ public abstract class AuthorityResource<AuthCommon, AuthItemHandler>
     
     public String getItemDocType() {
         // FIXME: Proof of concept placeholder
-        return getServiceName();
+        return "item-" + getServiceName();
     }
 
     @Override
index 7ac6fa8fc037d94f59951aac63c0c54cb1567bdf..18131a825f21c200ce1c8e0a5645af16fa4181de 100644 (file)
@@ -31,4 +31,11 @@ import java.util.HashMap;
  * accessing instances of those documents.\r
  */\r
 public class UriTemplateRegistry extends HashMap<String, StoredValuesUriTemplate> {\r
+\r
+    public void dump() {\r
+        for (String docTypeKey : this.keySet()) {\r
+            StoredValuesUriTemplate uriTemplate = this.get(docTypeKey);\r
+            System.out.println("Key = " + docTypeKey + ", Value = " + uriTemplate.getUriTemplateType() + " : " + uriTemplate.toString());\r
+        }\r
+    }\r
 }\r
index 38031d16c50b7ea62f2886692e3658fe100b973b..5d5553fd537fd711f438ade6c0bb508e9f3c30eb 100644 (file)
@@ -298,7 +298,7 @@ public abstract class AuthorityResourceWithContacts<AuthCommon, AuthItemHandler>
     
     public String getContactDocType() {
         // FIXME: Proof of concept placeholder
-        return getServiceName();
+        return "contact-" + getServiceName();
     }
 
     @Override