mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +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
|
@ -28,29 +28,14 @@ import javax.inject.Inject;
|
|||
/** RDAP (new WHOIS) action for help requests. */
|
||||
@Action(
|
||||
service = Action.Service.PUBAPI,
|
||||
path = RdapHelpAction.PATH,
|
||||
path = "/rdap/help",
|
||||
method = {GET, HEAD},
|
||||
isPrefix = true,
|
||||
auth = Auth.AUTH_PUBLIC_ANONYMOUS)
|
||||
public class RdapHelpAction extends RdapActionBase {
|
||||
|
||||
public static final String PATH = "/rdap/help";
|
||||
|
||||
@Inject public RdapHelpAction() {}
|
||||
|
||||
@Override
|
||||
public String getHumanReadableObjectTypeName() {
|
||||
return "help";
|
||||
}
|
||||
|
||||
@Override
|
||||
public EndpointType getEndpointType() {
|
||||
return EndpointType.HELP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getActionPath() {
|
||||
return PATH;
|
||||
@Inject public RdapHelpAction() {
|
||||
super("help", EndpointType.HELP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue