From 61bca4ff4d498c40e7dda083c1d48760ceef56e7 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Mon, 1 Apr 2013 18:00:05 -0700 Subject: [PATCH] CSPACE-5943: Restrict results returned by inAuthority value. Minor updates to comments. --- .../nuxeo/AuthorityItemDocumentModelHandler.java | 12 ++++++++---- .../nuxeo/client/java/RepositoryJavaClientImpl.java | 5 +++-- 2 files changed, 11 insertions(+), 6 deletions(-) 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 5f1eeef91..ddd4a7708 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 @@ -690,16 +690,20 @@ public abstract class AuthorityItemDocumentModelHandler // By convention, the name of the database table that contains // repeatable term information group records is derivable from - // an XPath base value by removing a suffix and converting to lowercase + // an existing XPath base value, by removing a suffix and converting + // to lowercase protected String getTermGroupTableName() { String termInfoGroupListName = getItemTermInfoGroupXPathBase(); return termInfoGroupListName.substring(0, termInfoGroupListName.lastIndexOf(LIST_SUFFIX)).toLowerCase(); } protected String getInAuthorityValue() { - // FIXME: Replace this placeholder / stub with actual code - // to obtain the relevant inAuthority value - return AuthorityResource.PARENT_WILDCARD; + String inAuthorityValue = getInAuthority(); + if (Tools.notBlank(inAuthorityValue)) { + return inAuthorityValue; + } else { + return AuthorityResource.PARENT_WILDCARD; + } } @Override diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java index ccbed7a5a..ea900db80 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java @@ -923,8 +923,8 @@ public class RepositoryJavaClientImpl implements RepositoryClient