Refactor EppXmlTransformer to be in the model/ package

This will allow us to perform the OT&E history verification
in the model/ package as well so that it can be used both
by both the UI and the command line tool.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=225007167
This commit is contained in:
jianglai 2018-12-11 08:25:20 -08:00
parent f58211402a
commit 0a44ef0dca
27 changed files with 257 additions and 240 deletions

View file

@ -15,7 +15,7 @@
package google.registry.flows.domain;
import static com.google.common.collect.Sets.union;
import static google.registry.flows.EppXmlTransformer.unmarshal;
import static google.registry.flows.FlowUtils.unmarshalEpp;
import static google.registry.flows.FlowUtils.validateClientIsLoggedIn;
import static google.registry.flows.ResourceFlowUtils.verifyExistence;
import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfo;
@ -136,7 +136,7 @@ public final class DomainApplicationInfoFlow implements Flow {
if (Boolean.TRUE.equals(launchInfo.getIncludeMark())) { // Default to false.
for (EncodedSignedMark encodedMark : application.getEncodedSignedMarks()) {
try {
marksBuilder.add(unmarshal(SignedMark.class, encodedMark.getBytes()).getMark());
marksBuilder.add(unmarshalEpp(SignedMark.class, encodedMark.getBytes()).getMark());
} catch (EppException e) {
// This is a serious error; don't let the benign EppException propagate.
throw new IllegalStateException("Could not decode a stored encoded signed mark", e);