From 792366ab260722e37086106dbf659be5550c1239 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Wed, 2 May 2012 14:10:56 -0700 Subject: [PATCH] CSPACE-5119,CSPACE-5135,CSPACE-5138: More list tests now pass in Person service. --- .../common/vocabulary/AuthorityResource.java | 19 ++++++++++--------- .../AuthorityItemDocumentModelHandler.java | 4 ++-- .../tenants/tenant-bindings-proto.xml | 4 ++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityResource.java b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityResource.java index 946bf848b..ed3bfba73 100644 --- a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityResource.java +++ b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityResource.java @@ -432,9 +432,8 @@ public abstract class AuthorityResource // be on the displayName field String sortBy = queryParams.getFirst(IClientQueryParams.SORT_BY_PARAM); if (sortBy == null || sortBy.isEmpty()) { - // String qualifiedDisplayNameField = authorityCommonSchemaName + ":" - // + AuthorityItemJAXBSchema.DISPLAY_NAME; - String qualifiedDisplayNameField = getQualifiedDisplayNameField(); + String qualifiedDisplayNameField = authorityCommonSchemaName + ":" + + AuthorityItemJAXBSchema.DISPLAY_NAME; myFilter.setOrderByClause(qualifiedDisplayNameField); } String nameQ = queryParams.getFirst("refName"); @@ -448,10 +447,6 @@ public abstract class AuthorityResource } } - protected String getQualifiedDisplayNameField() { - return NuxeoUtils.getPrimaryXPathPropertyName(authorityCommonSchemaName, - getItemTermInfoGroupXPathBase(), AuthorityItemJAXBSchema.TERM_DISPLAY_NAME); - } /** * Update authority. @@ -677,7 +672,12 @@ public abstract class AuthorityResource String keywords = queryParams.getFirst(IQueryManager.SEARCH_TYPE_KEYWORDS_KW); String advancedSearch = queryParams.getFirst(IQueryManager.SEARCH_TYPE_KEYWORDS_AS); - String qualifiedDisplayNameField = getQualifiedDisplayNameField(); + String qualifiedDisplayNameField = + authorityItemCommonSchemaName + ":" + getItemTermInfoGroupXPathBase() + + "/0/" + AuthorityItemJAXBSchema.TERM_DISPLAY_NAME; + + // NuxeoUtils.getPrimaryXPathPropertyName(authorityItemCommonSchemaName, + // getItemTermInfoGroupXPathBase(), AuthorityItemJAXBSchema.TERM_DISPLAY_NAME); // Note that docType defaults to the ServiceName, so we're fine with that. ServiceContext ctx = null; @@ -730,7 +730,8 @@ public abstract class AuthorityResource } if (logger.isDebugEnabled()) { logger.debug("getAuthorityItemList filtered WHERE clause: " - + myFilter.getWhereClause()); + + myFilter.getWhereClause() + + " and ORDER BY clause: " + myFilter.getOrderByClause()); } getRepositoryClient(ctx).getFiltered(ctx, handler); return (AbstractCommonList) handler.getCommonPartList(); diff --git a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java index 506d4a31d..ad85f2a2e 100644 --- a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java +++ b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java @@ -169,7 +169,7 @@ public abstract class AuthorityItemDocumentModelHandler field = new ListResultField(); field.setElement(AuthorityItemJAXBSchema.TERM_DISPLAY_NAME); field.setXpath(NuxeoUtils.getPrimaryXPathPropertyName( - null, getItemTermInfoGroupXPathBase(), AuthorityItemJAXBSchema.TERM_DISPLAY_NAME)); + authorityItemCommonSchemaName, getItemTermInfoGroupXPathBase(), AuthorityItemJAXBSchema.TERM_DISPLAY_NAME)); // field.setXpath(AuthorityItemJAXBSchema.DISPLAY_NAME); list.add(field); } @@ -189,7 +189,7 @@ public abstract class AuthorityItemDocumentModelHandler field = new ListResultField(); field.setElement(AuthorityItemJAXBSchema.TERM_STATUS); field.setXpath(NuxeoUtils.getPrimaryXPathPropertyName( - null, getItemTermInfoGroupXPathBase(), AuthorityItemJAXBSchema.TERM_STATUS)); + authorityItemCommonSchemaName, getItemTermInfoGroupXPathBase(), AuthorityItemJAXBSchema.TERM_STATUS)); // field.setXpath(AuthorityItemJAXBSchema.TERM_STATUS); list.add(field); } 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 a18cd2bdf..7abf3e7ff 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 @@ -1964,11 +1964,11 @@ foreName - foreName + personTermGroupList/[0]/foreName surName - surName + personTermGroupList/[0]/surName -- 2.47.3