From: Aron Roberts Date: Tue, 2 Apr 2013 01:00:05 +0000 (-0700) Subject: CSPACE-5943: Restrict results returned by inAuthority value. Minor updates to comments. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=61bca4ff4d498c40e7dda083c1d48760ceef56e7;p=tmp%2Fjakarta-migration.git CSPACE-5943: Restrict results returned by inAuthority value. Minor updates to comments. --- 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