mirror of
https://github.com/google/nomulus
synced 2026-08-20 22:26:12 +00:00
Add next page navigation for RDAP entity searches
A couple methods were moved to new locations so they are accessible to all types of search queries, not just nameservers like they originally were. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=179089014
This commit is contained in:
@@ -139,21 +139,12 @@ public class RdapNameserverSearchAction extends RdapSearchActionBase {
|
||||
ImmutableMap.Builder<String, Object> jsonBuilder = new ImmutableMap.Builder<>();
|
||||
jsonBuilder.put("nameserverSearchResults", results.jsonList());
|
||||
|
||||
ImmutableList<ImmutableMap<String, Object>> notices = results.getIncompletenessWarnings();
|
||||
if (results.nextCursor().isPresent()) {
|
||||
ImmutableList.Builder<ImmutableMap<String, Object>> noticesBuilder =
|
||||
new ImmutableList.Builder<>();
|
||||
noticesBuilder.addAll(notices);
|
||||
noticesBuilder.add(
|
||||
RdapJsonFormatter.makeRdapJsonNavigationLinkNotice(
|
||||
Optional.of(
|
||||
getRequestUrlWithExtraParameter(
|
||||
"cursor", encodeCursorToken(results.nextCursor().get())))));
|
||||
notices = noticesBuilder.build();
|
||||
}
|
||||
|
||||
rdapJsonFormatter.addTopLevelEntries(
|
||||
jsonBuilder, BoilerplateType.NAMESERVER, notices, ImmutableList.of(), fullServletPath);
|
||||
jsonBuilder,
|
||||
BoilerplateType.NAMESERVER,
|
||||
getNotices(results),
|
||||
ImmutableList.of(),
|
||||
fullServletPath);
|
||||
return jsonBuilder.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user