mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Add framework for customizable WHOIS commands
With some additional changes by Ben McIlwain. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=145447136
This commit is contained in:
parent
d3fe6be385
commit
bb3a0c78c5
15 changed files with 155 additions and 47 deletions
|
@ -14,8 +14,12 @@
|
|||
|
||||
package google.registry.whois;
|
||||
|
||||
import static google.registry.util.TypeUtils.getClassFromString;
|
||||
import static google.registry.util.TypeUtils.instantiate;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import google.registry.config.RegistryConfig.Config;
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
@ -26,7 +30,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||
* <h3>Dependencies</h3>
|
||||
*
|
||||
* <ul>
|
||||
* <li>{@link google.registry.request.RequestModule RequestModule}
|
||||
* <li>{@link google.registry.request.RequestModule RequestModule}
|
||||
* </ul>
|
||||
*
|
||||
* @see "google.registry.module.frontend.FrontendComponent"
|
||||
|
@ -42,4 +46,11 @@ public final class WhoisModule {
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Config("whoisCommandFactory")
|
||||
static WhoisCommandFactory provideWhoisCommandFactory(
|
||||
@Config("whoisCommandFactoryClass") String factoryClass) {
|
||||
return instantiate(getClassFromString(factoryClass, WhoisCommandFactory.class));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue