Add a new check API that does not wrap the domain check EPP flow

Copied class and test from CheckApiAction. All unit tests passing.

Remaining work: add metrics

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198916177
This commit is contained in:
Ben McIlwain 2018-06-01 13:18:03 -07:00
parent 9d2b1e7572
commit c61f36502e
10 changed files with 376 additions and 19 deletions

View file

@ -231,7 +231,7 @@ public class DomainFlowUtils {
* @throws InvalidIdnDomainLabelException if IDN table or language validation failed
* @see #validateDomainName(String)
*/
static String validateDomainNameWithIdnTables(InternetDomainName domainName)
public static String validateDomainNameWithIdnTables(InternetDomainName domainName)
throws InvalidIdnDomainLabelException {
Optional<String> idnTableName =
findValidIdnTableForTld(domainName.parts().get(0), domainName.parent().toString());
@ -856,7 +856,7 @@ public class DomainFlowUtils {
}
/** Check that the registry phase is not predelegation, during which some flows are forbidden. */
static void verifyNotInPredelegation(Registry registry, DateTime now)
public static void verifyNotInPredelegation(Registry registry, DateTime now)
throws BadCommandForRegistryPhaseException {
if (registry.getTldState(now) == TldState.PREDELEGATION) {
throw new BadCommandForRegistryPhaseException();