// 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");
}
}
- protected String getQualifiedDisplayNameField() {
- return NuxeoUtils.getPrimaryXPathPropertyName(authorityCommonSchemaName,
- getItemTermInfoGroupXPathBase(), AuthorityItemJAXBSchema.TERM_DISPLAY_NAME);
- }
/**
* Update authority.
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<PoxPayloadIn, PoxPayloadOut> ctx = null;
}
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();
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);
}
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);
}
<!-- Omit the standard AuthorityItem items (they are handled by the code) -->
<service:ListResultField>
<service:element>foreName</service:element>
- <service:xpath>foreName</service:xpath>
+ <service:xpath>personTermGroupList/[0]/foreName</service:xpath>
</service:ListResultField>
<service:ListResultField>
<service:element>surName</service:element>
- <service:xpath>surName</service:xpath>
+ <service:xpath>personTermGroupList/[0]/surName</service:xpath>
</service:ListResultField>
</service:ListResultsFields>
</service:params>