// 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
// FIXME: Resolve how to handle the case where the partial term
// query parameter is included in the request, but has been given an
- // empty (blank) value. Then implement that here, if current behavior
- // does not match the required behavior.
+ // empty (blank) value ("...?pt=") Then implement the required
+ // behavior here, if current behavior does not match what is required.
//
// (We're currently returning all records in that case.)
// FIXME: Get this value from an existing constant, if available
final String USER_SUPPLIED_WILDCARD = "*";
partialTerm = handleProvidedLeadingWildcard(partialTerm, USER_SUPPLIED_WILDCARD);
+ // Automatically insert a trailing wildcard
params.add(partialTerm + JDBCTools.SQL_WILDCARD); // Value for replaceable parameter 1 in the query
// Restrict the query to filter out deleted records, if requested