mirror of
https://github.com/google/nomulus
synced 2026-07-19 22:42:23 +00:00
Add RDAP support for deleted nameservers and filtering by registrar
This CL adds the functionality for nameserver searches. Future CLs will handle domains and entities. Deleted items can only be seen by admins, and by registrars viewing their own deleted items. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=170106014
This commit is contained in:
@@ -28,7 +28,6 @@ import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.primitives.Booleans;
|
||||
import com.google.common.primitives.Longs;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.config.RegistryConfig.Config;
|
||||
import google.registry.model.contact.ContactResource;
|
||||
import google.registry.model.domain.DesignatedContact;
|
||||
import google.registry.model.registrar.Registrar;
|
||||
@@ -69,7 +68,6 @@ public class RdapEntitySearchAction extends RdapActionBase {
|
||||
@Inject Clock clock;
|
||||
@Inject @Parameter("fn") Optional<String> fnParam;
|
||||
@Inject @Parameter("handle") Optional<String> handleParam;
|
||||
@Inject @Config("rdapResultSetMaxSize") int rdapResultSetMaxSize;
|
||||
@Inject RdapEntitySearchAction() {}
|
||||
|
||||
@Override
|
||||
@@ -160,10 +158,15 @@ public class RdapEntitySearchAction extends RdapActionBase {
|
||||
// Get the contact matches and return the results, fetching an additional contact to detect
|
||||
// truncation.
|
||||
return makeSearchResults(
|
||||
queryUndeleted(
|
||||
ContactResource.class, "searchName", partialStringQuery, rdapResultSetMaxSize + 1).list(),
|
||||
registrarMatches,
|
||||
now);
|
||||
queryItems(
|
||||
ContactResource.class,
|
||||
"searchName",
|
||||
partialStringQuery,
|
||||
false /* includeDeleted */,
|
||||
rdapResultSetMaxSize + 1)
|
||||
.list(),
|
||||
registrarMatches,
|
||||
now);
|
||||
}
|
||||
|
||||
/** Searches for entities by handle, returning a JSON array of entity info maps. */
|
||||
|
||||
Reference in New Issue
Block a user