mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Simplify the fee extensions.
I added shared base classes to all of the Fee extension types that make it possible to fully ignore the version in the flows. (You ask for a FeeCreateCommandExtension, for example, and you get one without having to worry about which). This is an improvement over the old code that asked you to provide a list of possible fee extensions and then ask for the first one in preference order. As part of this I was able to make the Fee implementation a bit simpler as well. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=137992390
This commit is contained in:
parent
2dd703ef3a
commit
8256120b3a
66 changed files with 786 additions and 954 deletions
|
@ -18,7 +18,6 @@ import static com.google.common.base.Predicates.not;
|
|||
import static com.google.common.collect.Maps.toMap;
|
||||
import static google.registry.flows.EppXmlTransformer.unmarshal;
|
||||
import static google.registry.flows.picker.FlowPicker.getFlowClass;
|
||||
import static google.registry.model.domain.fee.Fee.FEE_CREATE_COMMAND_EXTENSIONS_IN_PREFERENCE_ORDER;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.util.CollectionUtils.isNullOrEmpty;
|
||||
import static google.registry.util.DomainNameUtils.ACE_PREFIX;
|
||||
|
@ -58,6 +57,7 @@ import google.registry.flows.host.HostCreateFlow;
|
|||
import google.registry.flows.host.HostDeleteFlow;
|
||||
import google.registry.flows.host.HostUpdateFlow;
|
||||
import google.registry.model.domain.DomainCommand;
|
||||
import google.registry.model.domain.fee.FeeCreateCommandExtension;
|
||||
import google.registry.model.domain.launch.LaunchCreateExtension;
|
||||
import google.registry.model.domain.secdns.SecDnsCreateExtension;
|
||||
import google.registry.model.domain.secdns.SecDnsUpdateExtension;
|
||||
|
@ -143,8 +143,7 @@ public class VerifyOteAction implements Runnable, JsonAction {
|
|||
private static final Predicate<EppInput> HAS_FEE = new Predicate<EppInput>() {
|
||||
@Override
|
||||
public boolean apply(@Nonnull EppInput eppInput) {
|
||||
return eppInput.getFirstExtensionOfClasses(
|
||||
FEE_CREATE_COMMAND_EXTENSIONS_IN_PREFERENCE_ORDER) != null;
|
||||
return eppInput.getSingleExtension(FeeCreateCommandExtension.class) != null;
|
||||
}};
|
||||
|
||||
private static final Predicate<EppInput> HAS_SEC_DNS = new Predicate<EppInput>() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue