From: Patrick Schmitz Date: Mon, 12 Mar 2012 04:51:54 +0000 (-0700) Subject: CSPACE-4783 - Applied a partial fix (hack) that will work until we put in a proper... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=6a06c3070c13a2543aa15d7e35126b847d177abb;p=tmp%2Fjakarta-migration.git CSPACE-4783 - Applied a partial fix (hack) that will work until we put in a proper fix using a base schema for all authority items. Also fixed typo in tenant-bindings-proto.xml fix for authority perf problems. Placed taxonFullName declaration under authority, rather than item, service declaration. --- diff --git a/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml b/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml index 43554feda..f5760f7c1 100644 --- a/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml +++ b/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml @@ -2170,7 +2170,6 @@ - displayName displayName @@ -2187,10 +2186,6 @@ vocabType vocabType - - taxonFullName - taxonFullName - @@ -2238,6 +2233,10 @@ + + taxonFullName + taxonFullName + diff --git a/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationDocumentModelHandler.java b/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationDocumentModelHandler.java index 4d131ca8e..2c394b3a3 100644 --- a/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationDocumentModelHandler.java +++ b/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationDocumentModelHandler.java @@ -397,15 +397,18 @@ public class RelationDocumentModelHandler private String getCommonSchemaNameForDocType(String docType) { String common_schema = null; - if("Person".equals(docType)) - common_schema = PersonAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME; - else if("Organization".equals(docType)) - common_schema = OrgAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME; - else if("Locationitem".equals(docType)) - common_schema = LocationAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME; - else if("Taxon".equals(docType)) - common_schema = TaxonomyAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME; - //else leave it null. + if(docType!=null) { + // HACK - Use startsWith to allow for extension of schemas. + if(docType.startsWith("Person")) + common_schema = PersonAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME; + else if(docType.startsWith("Organization")) + common_schema = OrgAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME; + else if(docType.startsWith("Locationitem")) + common_schema = LocationAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME; + else if(docType.startsWith("Taxon")) + common_schema = TaxonomyAuthorityClient.SERVICE_ITEM_COMMON_PART_NAME; + //else leave it null. + } return common_schema; }