mirror of
https://github.com/google/nomulus
synced 2026-05-13 03:11:49 +00: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:
committed by
Ben McIlwain
parent
d3fe6be385
commit
bb3a0c78c5
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user