Rename ClaimsCheckFlow to DomainClaimsCheckFlow

This way it is consistent with the rest of our domain-related flows, which
consistently use the Domain* prefix. Note that claims checks are just a
special case of domain checks anyway, which run under DomainCheckFlow. This
will make dashboards looking at domain commands "just work" with a regexp of
Domain.*, without having to special-case in ClaimsCheck.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172608964
This commit is contained in:
mcilwain
2017-10-24 16:53:47 -04:00
committed by jianglai
parent 77ee3e3544
commit e62e1af863
5 changed files with 43 additions and 40 deletions
@@ -53,17 +53,17 @@ import javax.inject.Inject;
import org.joda.time.DateTime;
/**
* An EPP flow that checks whether strings are trademarked.
* An EPP flow that checks whether domain labels are trademarked.
*
* @error {@link google.registry.flows.exceptions.TooManyResourceChecksException}
* @error {@link DomainFlowUtils.BadCommandForRegistryPhaseException}
* @error {@link DomainFlowUtils.ClaimsPeriodEndedException}
* @error {@link DomainFlowUtils.NotAuthorizedForTldException}
* @error {@link DomainFlowUtils.TldDoesNotExistException}
* @error {@link ClaimsCheckNotAllowedInSunrise}
* @error {@link DomainClaimsCheckNotAllowedInSunrise}
*/
@ReportingSpec(ActivityReportField.DOMAIN_CHECK) // Claims check is a special domain check.
public final class ClaimsCheckFlow implements Flow {
public final class DomainClaimsCheckFlow implements Flow {
@Inject ExtensionManager extensionManager;
@Inject ResourceCommand resourceCommand;
@@ -72,7 +72,9 @@ public final class ClaimsCheckFlow implements Flow {
@Inject Clock clock;
@Inject @Config("maxChecks") int maxChecks;
@Inject EppResponse.Builder responseBuilder;
@Inject ClaimsCheckFlow() {}
@Inject
DomainClaimsCheckFlow() {}
@Override
public EppResponse run() throws EppException {
@@ -95,7 +97,7 @@ public final class ClaimsCheckFlow implements Flow {
DateTime now = clock.nowUtc();
verifyNotInPredelegation(registry, now);
if (registry.getTldState(now) == TldState.SUNRISE) {
throw new ClaimsCheckNotAllowedInSunrise();
throw new DomainClaimsCheckNotAllowedInSunrise();
}
verifyClaimsPeriodNotEnded(registry, now);
}
@@ -111,8 +113,8 @@ public final class ClaimsCheckFlow implements Flow {
}
/** Claims checks are not allowed during sunrise. */
static class ClaimsCheckNotAllowedInSunrise extends CommandUseErrorException {
public ClaimsCheckNotAllowedInSunrise() {
static class DomainClaimsCheckNotAllowedInSunrise extends CommandUseErrorException {
public DomainClaimsCheckNotAllowedInSunrise() {
super("Claims checks are not allowed during sunrise");
}
}