Add TLD extra flow logic for update

This CL implements the TLD-specific extra flow logic for updates, with tests, based on the static helper classes of the previous CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135683537
This commit is contained in:
mountford 2016-07-28 09:24:57 -04:00 committed by Ben McIlwain
parent 94c549d960
commit 718da70b71
5 changed files with 53 additions and 67 deletions

View file

@ -42,7 +42,7 @@ import google.registry.model.eppcommon.AuthInfo;
import google.registry.model.eppinput.ResourceCommand;
import google.registry.model.eppoutput.EppOutput;
import google.registry.model.eppoutput.EppResponse.ResponseExtension;
import java.util.List;
import java.util.Set;
import javax.inject.Inject;
/**
@ -136,10 +136,10 @@ public final class DomainInfoFlow extends LoggedInFlow {
Optional<RegistryExtraFlowLogic> extraLogicManager =
RegistryExtraFlowLogicProxy.newInstanceForDomain(domain);
if (extraLogicManager.isPresent()) {
List<String> flags = extraLogicManager.get().getExtensionFlags(
Set<String> flags = extraLogicManager.get().getExtensionFlags(
domain, clientId, now); // As-of date is always now for info commands.
if (!flags.isEmpty()) {
extensions.add(FlagsInfoResponseExtension.create(flags));
extensions.add(FlagsInfoResponseExtension.create(ImmutableList.copyOf(flags)));
}
}
return forceEmptyToNull(extensions.build());