mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 08:27:14 +02:00
Simplify some of the RDAP Action classes
Overriding getter methods to change values is a bit overkill when these values are static (don't change based on internal state). Just setting them in the base class' constructor is simpler. Also, we can read the PATH of an Action based on the Annotation instead returning it manually for each Action. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=246135754
This commit is contained in:
parent
99aeedc598
commit
90c53152bf
21 changed files with 81 additions and 204 deletions
|
@ -58,7 +58,7 @@ import org.joda.time.DateTime;
|
|||
*/
|
||||
@Action(
|
||||
service = Action.Service.PUBAPI,
|
||||
path = RdapNameserverSearchAction.PATH,
|
||||
path = "/rdap/nameservers",
|
||||
method = {GET, HEAD},
|
||||
auth = Auth.AUTH_PUBLIC_ANONYMOUS)
|
||||
public class RdapNameserverSearchAction extends RdapSearchActionBase {
|
||||
|
@ -67,21 +67,8 @@ public class RdapNameserverSearchAction extends RdapSearchActionBase {
|
|||
|
||||
@Inject @Parameter("name") Optional<String> nameParam;
|
||||
@Inject @Parameter("ip") Optional<String> ipParam;
|
||||
@Inject public RdapNameserverSearchAction() {}
|
||||
|
||||
@Override
|
||||
public String getHumanReadableObjectTypeName() {
|
||||
return "nameserver search";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EndpointType getEndpointType() {
|
||||
return EndpointType.NAMESERVERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getActionPath() {
|
||||
return PATH;
|
||||
@Inject public RdapNameserverSearchAction() {
|
||||
super("nameserver search", EndpointType.NAMESERVERS);
|
||||
}
|
||||
|
||||
private enum CursorType {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue