]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5489: Changed list handling code for authority items to no longer supply refna...
authorRichard Millet <remillet@berkeley.edu>
Tue, 11 Sep 2012 22:52:00 +0000 (15:52 -0700)
committerRichard Millet <remillet@berkeley.edu>
Tue, 11 Sep 2012 22:52:00 +0000 (15:52 -0700)
3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/schemas/collectionspace_core.xsd
services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java
services/client/src/main/java/org/collectionspace/services/client/CollectionSpaceClient.java
services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml
services/common/src/main/java/org/collectionspace/services/common/vocabulary/RefNameServiceUtils.java
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java

index 7c9389798f1c80253b95f81f26b437c63a7e79c9..1fe2659348da1059ca28cc64fa4d5663a6e8b61a 100644 (file)
@@ -17,7 +17,7 @@
 \r
     <xs:element name="tenantId" type="xs:string"/>\r
     <xs:element name="uri" type="xs:string"/>\r
-    <xs:element name="refname" type="xs:string"/>\r
+    <xs:element name="refName" type="xs:string"/>\r
     <!--<xs:element name="createdAt" type="xs:string"/>-->\r
     <xs:element name="createdAt" type="xs:dateTime"/>\r
     <xs:element name="updatedAt" type="xs:dateTime"/>\r
index 788e91b7a81227b746eeb2e9da248b88bc3e8a8b..ea527400191a9a454e44955a5af2fcbadda4eb21 100644 (file)
 package org.collectionspace.services.common.vocabulary.nuxeo;
 
 import org.collectionspace.services.client.AuthorityClient;
-import org.collectionspace.services.client.CollectionSpaceClient;
 import org.collectionspace.services.client.IQueryManager;
 import org.collectionspace.services.client.PoxPayloadIn;
 import org.collectionspace.services.client.PoxPayloadOut;
 
-import org.collectionspace.services.common.api.CommonAPI;
 import org.collectionspace.services.common.api.RefName;
 import org.collectionspace.services.common.api.Tools;
 import org.collectionspace.services.common.authorityref.AuthorityRefDocList;
@@ -38,7 +36,6 @@ import org.collectionspace.services.common.context.ServiceContext;
 import org.collectionspace.services.common.document.DocumentException;
 import org.collectionspace.services.common.document.DocumentFilter;
 import org.collectionspace.services.common.document.DocumentWrapper;
-import org.collectionspace.services.common.document.DocumentWrapperImpl;
 import org.collectionspace.services.common.vocabulary.AuthorityJAXBSchema;
 import org.collectionspace.services.common.vocabulary.AuthorityItemJAXBSchema;
 import org.collectionspace.services.common.vocabulary.RefNameServiceUtils;
@@ -249,7 +246,6 @@ public abstract class AuthorityItemDocumentModelHandler<AICommon>
                        // for general logic.
                        boolean hasDisplayName = false;
                        boolean hasShortId = false;
-                       boolean hasRefName = false;
                        boolean hasTermStatus = false;
                        for (int i = 0; i < nFields; i++) {
                            ListResultField field = list.get(i);
@@ -258,8 +254,6 @@ public abstract class AuthorityItemDocumentModelHandler<AICommon>
                                hasDisplayName = true;
                            } else if (AuthorityItemJAXBSchema.SHORT_IDENTIFIER.equals(elName)) {
                                hasShortId = true;
-                           } else if (AuthorityItemJAXBSchema.REF_NAME.equals(elName)) {
-                               hasRefName = true;
                            } else if (AuthorityItemJAXBSchema.TERM_STATUS.equals(elName)) {
                                hasTermStatus = true;
                            }
@@ -276,12 +270,6 @@ public abstract class AuthorityItemDocumentModelHandler<AICommon>
                            field.setXpath(AuthorityItemJAXBSchema.SHORT_IDENTIFIER);
                            list.add(field);
                        }
-                       if (!hasRefName) {
-                           field = new ListResultField();
-                           field.setElement(AuthorityItemJAXBSchema.REF_NAME);
-                           field.setXpath(AuthorityItemJAXBSchema.REF_NAME);
-                           list.add(field);
-                       }
                        if (!hasTermStatus) {
                            field = getListResultsTermStatusField();
                            list.add(field);
index 94098370818df99a9c5241d8806481b596da2dc3..d5bd51fa730cb9838fd07c6ee980fd8042b353f2 100644 (file)
@@ -39,7 +39,7 @@ public interface CollectionSpaceClient<CLT, REQUEST_TYPE, RESPONSE_TYPE, P exten
     public final static String COLLECTIONSPACE_CORE_SCHEMA = "collectionspace_core";
     public final static String COLLECTIONSPACE_CORE_TENANTID = "tenantId";
     public final static String COLLECTIONSPACE_CORE_URI = "uri";
-    public final static String COLLECTIONSPACE_CORE_REFNAME = "refname";
+    public final static String COLLECTIONSPACE_CORE_REFNAME = "refName";
     public final static String COLLECTIONSPACE_CORE_CREATED_AT = "createdAt";
     public final static String COLLECTIONSPACE_CORE_UPDATED_AT = "updatedAt";
     public final static String COLLECTIONSPACE_CORE_CREATED_BY = "createdBy";
index 766d72229dc973a94ca710dc044a0615b809cbad..63c55e9aa7ce969542ea434d546ac7abd2bd5adb 100644 (file)
                             <service:element>displayName</service:element>
                             <service:xpath>displayName</service:xpath>
                         </service:ListResultField>
-                        <service:ListResultField>
-                            <service:element>refName</service:element>
-                            <service:xpath>refName</service:xpath>
-                        </service:ListResultField>
                         <service:ListResultField>
                             <service:element>shortIdentifier</service:element>
                             <service:xpath>shortIdentifier</service:xpath>
                             <service:element>displayName</service:element>
                             <service:xpath>displayName</service:xpath>
                         </service:ListResultField>
-                        <service:ListResultField>
-                            <service:element>refName</service:element>
-                            <service:xpath>refName</service:xpath>
-                        </service:ListResultField>
                         <service:ListResultField>
                             <service:element>shortIdentifier</service:element>
                             <service:xpath>shortIdentifier</service:xpath>
                             <service:element>displayName</service:element>
                             <service:xpath>displayName</service:xpath>
                         </service:ListResultField>
-                        <service:ListResultField>
-                            <service:element>refName</service:element>
-                            <service:xpath>refName</service:xpath>
-                        </service:ListResultField>
                         <service:ListResultField>
                             <service:element>shortIdentifier</service:element>
                             <service:xpath>shortIdentifier</service:xpath>
                             <service:element>displayName</service:element>
                             <service:xpath>displayName</service:xpath>
                         </service:ListResultField>
-                        <service:ListResultField>
-                            <service:element>refName</service:element>
-                            <service:xpath>refName</service:xpath>
-                        </service:ListResultField>
                         <service:ListResultField>
                             <service:element>shortIdentifier</service:element>
                             <service:xpath>shortIdentifier</service:xpath>
                             <service:element>displayName</service:element>
                             <service:xpath>displayName</service:xpath>
                         </service:ListResultField>
-                        <service:ListResultField>
-                            <service:element>refName</service:element>
-                            <service:xpath>refName</service:xpath>
-                        </service:ListResultField>
                         <service:ListResultField>
                             <service:element>shortIdentifier</service:element>
                             <service:xpath>shortIdentifier</service:xpath>
                             <service:element>displayName</service:element>
                             <service:xpath>displayName</service:xpath>
                         </service:ListResultField>
-                        <service:ListResultField>
-                            <service:element>refName</service:element>
-                            <service:xpath>refName</service:xpath>
-                        </service:ListResultField>
                         <service:ListResultField>
                             <service:element>shortIdentifier</service:element>
                             <service:xpath>shortIdentifier</service:xpath>
                             <service:element>displayName</service:element>
                             <service:xpath>displayName</service:xpath>
                         </service:ListResultField>
-                        <service:ListResultField>
-                            <service:element>refName</service:element>
-                            <service:xpath>refName</service:xpath>
-                        </service:ListResultField>
                         <service:ListResultField>
                             <service:element>shortIdentifier</service:element>
                             <service:xpath>shortIdentifier</service:xpath>
index 9583ec9dc51adfdfee29ae2e01b6239597134ae1..3624de8aee1ac945a4a84af015f02f9eccec875a 100644 (file)
@@ -547,7 +547,7 @@ public class RefNameServiceUtils {
             DocumentModel docModel = iter.next();\r
             AuthorityRefDocList.AuthorityRefDocItem ilistItem;\r
 \r
-            String docType = docModel.getDocumentType().getName();\r
+            String docType = docModel.getDocumentType().getName(); // REM - This will be a tentant qualified document type\r
             docType = ServiceBindingUtils.getUnqualifiedTenantDocType(docType);\r
             ServiceBindingType sb = queriedServiceBindings.get(docType);\r
             if (sb == null) {\r
index 187b11588e3df1adc4027451377e785e4e31daf7..f598d597d4ae64c178453e5f675f4e8f1b93bd75 100644 (file)
@@ -164,7 +164,10 @@ public abstract class   RemoteDocumentModelHandlerImpl<T, TL>
                        }
                } catch (DocumentException e) {
                        // TODO Auto-generated catch block
-                       logger.error(String.format("Could not get document handler params for class %s", this.getClass().getName()), e);
+                       String errMsg = String.format("Could not get document handler params from config bindings for class %s", this.getClass().getName());
+                       if (logger.isWarnEnabled() == true) {
+                               logger.warn(errMsg);
+                       }
                }
        
        return result;
@@ -1149,7 +1152,6 @@ public abstract class   RemoteDocumentModelHandlerImpl<T, TL>
         List<RelationsCommonList.RelationListItem> childList = null;
         List<RelationsCommonList.RelationListItem> parentList = null;
         DocumentModel docModel = wrapDoc.getWrappedObject();
-//             String itemRefName = (String) docModel.getPropertyValue(AuthorityItemJAXBSchema.REF_NAME); cow;
                String itemRefName = (String) docModel.getProperty(CollectionSpaceClient.COLLECTIONSPACE_CORE_SCHEMA,
                        CollectionSpaceClient.COLLECTIONSPACE_CORE_REFNAME);