mirror of
https://github.com/google/nomulus
synced 2026-05-28 10:40:44 +00: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:
@@ -32,29 +32,14 @@ import javax.inject.Inject;
|
||||
*/
|
||||
@Action(
|
||||
service = Action.Service.PUBAPI,
|
||||
path = RdapAutnumAction.PATH,
|
||||
path = "/rdap/autnum/",
|
||||
method = {GET, HEAD},
|
||||
isPrefix = true,
|
||||
auth = Auth.AUTH_PUBLIC_ANONYMOUS)
|
||||
public class RdapAutnumAction extends RdapActionBase {
|
||||
|
||||
public static final String PATH = "/rdap/autnum/";
|
||||
|
||||
@Inject RdapAutnumAction() {}
|
||||
|
||||
@Override
|
||||
public String getHumanReadableObjectTypeName() {
|
||||
return "autnum";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EndpointType getEndpointType() {
|
||||
return EndpointType.AUTNUM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getActionPath() {
|
||||
return PATH;
|
||||
@Inject RdapAutnumAction() {
|
||||
super("authnum", EndpointType.AUTNUM);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user