mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02: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:
parent
c8059d4d8a
commit
e619ea1bff
12 changed files with 398 additions and 111 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue