]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5132: Changed field name to termDisplayName from displayName in each item...
authorAron Roberts <aron@socrates.berkeley.edu>
Fri, 11 May 2012 21:31:49 +0000 (14:31 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Fri, 11 May 2012 21:31:49 +0000 (14:31 -0700)
services/authority/jaxb/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityItemJAXBSchema.java
services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java
services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml
services/concept/client/src/test/java/org/collectionspace/services/client/test/ConceptAuthorityServiceTest.java
services/location/client/src/test/java/org/collectionspace/services/client/test/LocationAuthorityServiceTest.java
services/organization/client/src/test/java/org/collectionspace/services/client/test/OrgAuthorityServiceTest.java
services/person/client/src/test/java/org/collectionspace/services/client/test/PersonAuthorityServiceTest.java
services/place/client/src/test/java/org/collectionspace/services/client/test/PlaceAuthorityServiceTest.java
services/taxonomy/client/src/test/java/org/collectionspace/services/client/test/TaxonomyAuthorityServiceTest.java

index e5e47982ee2d9c60531fa77dd2adb9d4d8f80a99..b2f9caa9b3f05e48655aca4c8cbe3c671c713f1d 100644 (file)
@@ -1,48 +1,48 @@
 /**\r
- *  This document is a part of the source code and related artifacts\r
- *  for CollectionSpace, an open source collections management system\r
- *  for museums and related institutions:\r
-\r
- *  http://www.collectionspace.org\r
- *  http://wiki.collectionspace.org\r
-\r
- *  Copyright 2009 University of California at Berkeley\r
-\r
- *  Licensed under the Educational Community License (ECL), Version 2.0.\r
- *  You may not use this file except in compliance with this License.\r
-\r
- *  You may obtain a copy of the ECL 2.0 License at\r
-\r
- *  https://source.collectionspace.org/collection-space/LICENSE.txt\r
-\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
+ * This document is a part of the source code and related artifacts for\r
+ * CollectionSpace, an open source collections management system for museums and\r
+ * related institutions:\r
+ *\r
+ * http://www.collectionspace.org http://wiki.collectionspace.org\r
+ *\r
+ * Copyright 2009 University of California at Berkeley\r
+ *\r
+ * Licensed under the Educational Community License (ECL), Version 2.0. You may\r
+ * not use this file except in compliance with this License.\r
+ *\r
+ * You may obtain a copy of the ECL 2.0 License at\r
+ *\r
+ * https://source.collectionspace.org/collection-space/LICENSE.txt\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\r
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r
+ * License for the specific language governing permissions and limitations under\r
+ * the License.\r
  */\r
 package org.collectionspace.services.common.vocabulary;\r
 \r
 /**\r
  * @author pschmitz\r
- * \r
+ *\r
  */\r
 public interface AuthorityItemJAXBSchema {\r
-       final static String IN_AUTHORITY = "inAuthority";\r
-       final static String REF_NAME = "refName";\r
-       final static String ORDER = "order";\r
-       final static String SHORT_IDENTIFIER = "shortIdentifier";\r
-       final static String CSID = "csid";\r
+\r
+    final static String IN_AUTHORITY = "inAuthority";\r
+    final static String REF_NAME = "refName";\r
+    final static String ORDER = "order";\r
+    final static String SHORT_IDENTIFIER = "shortIdentifier";\r
+    final static String CSID = "csid";\r
     final static String DISPLAY_NAME = "displayName"; // This is the display name element for the Vocabulary service's item    \r
-       final static String TERM_DISPLAY_NAME = "termDisplayName";\r
-       final static String TERM_NAME = "termName";\r
-       final static String TERM_STATUS = "termStatus";\r
-       final static String TERM_INFO_GROUP_SCHEMA_NAME = ""; // FIXME: REM - Needs\r
-                                                                                                                       // to be defined.\r
-       // CSPACE-4813 - Remove all the below values and recompile all authorityitem\r
-       // related classes\r
-       final static String DISPLAY_NAME_COMPUTED = "displayNameComputed";\r
-       final static String SHORT_DISPLAY_NAME = "shortDisplayName";\r
-       final static String SHORT_DISPLAY_NAME_COMPUTED = "shortDisplayNameComputed";\r
-       // final static String TERM_STATUS = "termStatus";\r
+    final static String TERM_DISPLAY_NAME = "termDisplayName"; // This is the display name element for all Authority services' items\r
+    final static String TERM_NAME = "termName";\r
+    final static String TERM_STATUS = "termStatus";\r
+    final static String TERM_INFO_GROUP_SCHEMA_NAME = ""; // FIXME: REM - Needs\r
+    // to be defined.\r
+    // CSPACE-4813 - Remove all the below values and recompile all authorityitem\r
+    // related classes\r
+    final static String DISPLAY_NAME_COMPUTED = "displayNameComputed";\r
+    final static String SHORT_DISPLAY_NAME = "shortDisplayName";\r
+    final static String SHORT_DISPLAY_NAME_COMPUTED = "shortDisplayNameComputed";\r
+    // final static String TERM_STATUS = "termStatus";\r
 }\r
index c38ade3062b0090c790bb65262f40e263357723f..ff419eab64455070495457499e29f87e5d521798 100644 (file)
@@ -150,10 +150,19 @@ public abstract class AuthorityItemDocumentModelHandler<AICommon>
         // for backwards compatibility, although its value is obtained
         // from the termDisplayName field.
         //
+        // Update: this name is now being changed to 'termDisplayName', both
+        // because this is the actual field name and because the app layer
+        // work to convert over to this field is underway. Per Patrick, the
+        // app layer treats lists, in at least some context(s), as sparse record
+        // payloads, and thus fields in list results must all be present in
+        // (i.e. represent a strict subset of the fields in) record schemas.
+        // - ADR 2012-05-11
+        // 
+        //
         // In CSPACE-5134, these list results will change substantially
         // to return display names for both the preferred term and for
         // each non-preferred term (if any).
-       result.setElement(AuthorityItemJAXBSchema.DISPLAY_NAME);
+       result.setElement(AuthorityItemJAXBSchema.TERM_DISPLAY_NAME);
        result.setXpath(NuxeoUtils.getPrimaryXPathPropertyName(
                 authorityItemCommonSchemaName, getItemTermInfoGroupXPathBase(), AuthorityItemJAXBSchema.TERM_DISPLAY_NAME));
        
index 8fd4e67824cae78744af39d6ef398256e2440112..4daff94c641934af4d1d6aa2c567d80022292a76 100644 (file)
             <service:properties xmlns:service="http://collectionspace.org/services/config/service">
                 <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNameProperty</types:key>
-                    <types:value>displayName</types:value>
+                    <types:value>termDisplayName</types:value>
                 </types:item>
                 <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNumberProperty</types:key>
             <service:properties xmlns:service="http://collectionspace.org/services/config/service">
                 <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNameProperty</types:key>
-                    <types:value>displayName</types:value>
+                    <types:value>termDisplayName</types:value>
                 </types:item>
                 <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNumberProperty</types:key>
             <service:properties xmlns:service="http://collectionspace.org/services/config/service">
                 <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNameProperty</types:key>
-                    <types:value>displayName</types:value>
+                    <types:value>termDisplayName</types:value>
                 </types:item>
                 <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNumberProperty</types:key>
             <service:properties xmlns:service="http://collectionspace.org/services/config/service">
                 <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNameProperty</types:key>
-                    <types:value>displayName</types:value>
+                    <types:value>termDisplayName</types:value>
                 </types:item>
                 <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNumberProperty</types:key>
             <service:properties xmlns:service="http://collectionspace.org/services/config/service">
                 <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNameProperty</types:key>
-                    <types:value>displayName</types:value>
+                    <types:value>termDisplayName</types:value>
                 </types:item>
                 <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNumberProperty</types:key>
             <service:properties xmlns:service="http://collectionspace.org/services/config/service">
                 <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNameProperty</types:key>
-                    <types:value>displayName</types:value>
+                    <types:value>termDisplayName</types:value>
                 </types:item>
                 <types:item xmlns:types="http://collectionspace.org/services/config/types">
                     <types:key>objectNumberProperty</types:key>
index 6d33ed7d514458bd132858fcf025dfdc32ce5b26..b9afc75e60a1b1a6a397f005c9766c9c02bb94da 100644 (file)
@@ -24,6 +24,7 @@ package org.collectionspace.services.client.test;
 
 import java.util.List;
 import java.util.Map;
+import org.collectionspace.services.ConceptJAXBSchema;
 import org.collectionspace.services.client.AbstractCommonListUtils;
 import org.collectionspace.services.client.AuthorityClient;
 import org.collectionspace.services.client.CollectionSpaceClient;
@@ -31,6 +32,7 @@ import org.collectionspace.services.client.ConceptAuthorityClient;
 import org.collectionspace.services.client.ConceptAuthorityClientUtils;
 import org.collectionspace.services.client.PoxPayloadOut;
 import org.collectionspace.services.common.datetime.GregorianCalendarDateTimeUtils;
+import org.collectionspace.services.common.vocabulary.AuthorityItemJAXBSchema;
 import org.collectionspace.services.concept.ConceptTermGroup;
 import org.collectionspace.services.concept.ConceptTermGroupList;
 import org.collectionspace.services.concept.ConceptauthoritiesCommon;
@@ -56,8 +58,6 @@ public class ConceptAuthorityServiceTest extends AbstractAuthorityServiceTest<Co
        /** The logger. */
     private final String CLASS_NAME = ConceptAuthorityServiceTest.class.getName();
     private final Logger logger = LoggerFactory.getLogger(ConceptAuthorityServiceTest.class);
-    private final String REFNAME = "refName";
-    private final String DISPLAYNAME = "displayName";
     private final static String CURRENT_DATE_UTC =
         GregorianCalendarDateTimeUtils.currentDateUTC();
 
@@ -203,11 +203,11 @@ public class ConceptAuthorityServiceTest extends AbstractAuthorityServiceTest<Co
 
         for (AbstractCommonList.ListItem item : items) {
                String value = 
-                       AbstractCommonListUtils.ListItemGetElementValue(item, REFNAME);
+                       AbstractCommonListUtils.ListItemGetElementValue(item, ConceptJAXBSchema.REF_NAME);
             Assert.assertTrue((null != value), "Item refName is null!");
                value = 
-                       AbstractCommonListUtils.ListItemGetElementValue(item, DISPLAYNAME);
-            Assert.assertTrue((null != value), "Item displayName is null!");
+                       AbstractCommonListUtils.ListItemGetElementValue(item, ConceptJAXBSchema.TERM_DISPLAY_NAME);
+            Assert.assertTrue((null != value), "Item termDisplayName is null!");
         }
         if(logger.isTraceEnabled()){
                AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
index 1898b9f32437faa67f251f7ac1f532ea40299f10..e151c1ea1a16c8833dc2d268a07c3a59c6bf524d 100644 (file)
@@ -280,8 +280,8 @@ public class LocationAuthorityServiceTest extends AbstractAuthorityServiceTest<L
                                        item, LocationJAXBSchema.REF_NAME);
                        Assert.assertTrue((null != value), "Item refName is null!");
                        value = AbstractCommonListUtils.ListItemGetElementValue(item,
-                                       LocationJAXBSchema.DISPLAY_NAME);
-                       Assert.assertTrue((null != value), "Item displayName is null!");
+                                       LocationJAXBSchema.TERM_DISPLAY_NAME);
+                       Assert.assertTrue((null != value), "Item termDisplayName is null!");
                }
                if (logger.isTraceEnabled()) {
                        AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger,
index 63fd6fd9f091d8d4c6803c8d4ac81e1ccdf28769..9c99d348628002bc18169d795f8ee0d21bd3b9b2 100644 (file)
@@ -642,8 +642,8 @@ public class OrgAuthorityServiceTest extends AbstractAuthorityServiceTest<Orgaut
                     AbstractCommonListUtils.ListItemGetElementValue(item, OrganizationJAXBSchema.REF_NAME);
             Assert.assertTrue((null != value), "Item refName is null!");
             value =
-                    AbstractCommonListUtils.ListItemGetElementValue(item, OrganizationJAXBSchema.DISPLAY_NAME);
-            Assert.assertTrue((null != value), "Item displayName is null!");
+                    AbstractCommonListUtils.ListItemGetElementValue(item, OrganizationJAXBSchema.TERM_DISPLAY_NAME);
+            Assert.assertTrue((null != value), "Item termDisplayName is null!");
         }
         if (logger.isTraceEnabled()) {
             AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
index cdde29fbc889a7d173992fa69edd7f0c80c5d5f5..07a79270bfff242acc8e8eeb7a36e923238e85b9 100644 (file)
@@ -820,8 +820,8 @@ public class PersonAuthorityServiceTest extends AbstractAuthorityServiceTest<Per
             // not termDisplayName, for backward compatibility.
             // (The format of list items will change significantly in CSPACE-5134.)
             value =
-                    AbstractCommonListUtils.ListItemGetElementValue(item, AuthorityItemJAXBSchema.DISPLAY_NAME);
-            Assert.assertTrue((null != value), "Item displayName is null!");
+                    AbstractCommonListUtils.ListItemGetElementValue(item, AuthorityItemJAXBSchema.TERM_DISPLAY_NAME);
+            Assert.assertTrue((null != value), "Item termDisplayName is null!");
         }
         if (logger.isTraceEnabled()) {
             AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);
index 25ceb97913698ba636aaf39d8f627f637b98cdc9..503e44431c6e56fd3ce05e8f60b4f0c138001ffe 100644 (file)
@@ -281,8 +281,8 @@ public class PlaceAuthorityServiceTest extends AbstractAuthorityServiceTest<Plac
                                        item, PlaceJAXBSchema.REF_NAME);
                        Assert.assertTrue((null != value), "Item refName is null!");
                        value = AbstractCommonListUtils.ListItemGetElementValue(item,
-                                       PlaceJAXBSchema.DISPLAY_NAME);
-                       Assert.assertTrue((null != value), "Item displayName is null!");
+                                       PlaceJAXBSchema.TERM_DISPLAY_NAME);
+                       Assert.assertTrue((null != value), "Item termDisplayName is null!");
                }
                if (logger.isTraceEnabled()) {
                        AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger,
index eda82f38f5dca3653b2d863bcd1a68af5e9d8abc..8dda0d3075ec15fb74cee813056cd5f213c78e2a 100644 (file)
@@ -306,8 +306,8 @@ public class TaxonomyAuthorityServiceTest extends AbstractAuthorityServiceTest<T
                         AbstractCommonListUtils.ListItemGetElementValue(item, TaxonJAXBSchema.REF_NAME);
                 Assert.assertTrue((null != value), "Item refName is null!");
                 value =
-                        AbstractCommonListUtils.ListItemGetElementValue(item, TaxonJAXBSchema.DISPLAY_NAME);
-                Assert.assertTrue((null != value), "Item displayName is null!");
+                        AbstractCommonListUtils.ListItemGetElementValue(item, TaxonJAXBSchema.TERM_DISPLAY_NAME);
+                Assert.assertTrue((null != value), "Item termDisplayName is null!");
             }
             if (logger.isTraceEnabled()) {
                 AbstractCommonListUtils.ListItemsInAbstractCommonList(list, logger, testName);