Rename Response in the epp model to EppResponse

So that it doesn't conflict with request.Response.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124595393
This commit is contained in:
Corey Goldfeder 2016-06-10 14:02:26 -07:00 committed by Justine Tunney
parent 0ce293325c
commit 7cf4ddce97
41 changed files with 92 additions and 83 deletions

View file

@ -21,7 +21,7 @@ import com.googlecode.objectify.annotation.Embed;
import google.registry.model.ImmutableObject;
import google.registry.model.eppcommon.Trid;
import google.registry.model.eppoutput.Response.ResponseData;
import google.registry.model.eppoutput.EppResponse.ResponseData;
import org.joda.time.DateTime;
@ -70,15 +70,14 @@ public abstract class PendingActionNotificationResponse
return nameOrId.actionResult;
}
@SuppressWarnings("unchecked")
protected <T extends PendingActionNotificationResponse> T init(
String nameOrId, boolean actionResult, Trid trid, DateTime processedDate) {
this.nameOrId = new NameOrId();
this.nameOrId.value = nameOrId;
this.nameOrId.actionResult = actionResult;
this.trid = trid;
this.processedDate = processedDate;
return (T) this;
protected static <T extends PendingActionNotificationResponse> T init(
T response, String nameOrId, boolean actionResult, Trid trid, DateTime processedDate) {
response.nameOrId = new NameOrId();
response.nameOrId.value = nameOrId;
response.nameOrId.actionResult = actionResult;
response.trid = trid;
response.processedDate = processedDate;
return response;
}
/** An adapter to output the XML in response to resolving a pending command on a domain. */
@ -97,8 +96,12 @@ public abstract class PendingActionNotificationResponse
public static DomainPendingActionNotificationResponse create(
String fullyQualifiedDomainName, boolean actionResult, Trid trid, DateTime processedDate) {
return new DomainPendingActionNotificationResponse().init(
fullyQualifiedDomainName, actionResult, trid, processedDate);
return init(
new DomainPendingActionNotificationResponse(),
fullyQualifiedDomainName,
actionResult,
trid,
processedDate);
}
}
@ -118,8 +121,12 @@ public abstract class PendingActionNotificationResponse
public static ContactPendingActionNotificationResponse create(
String contactId, boolean actionResult, Trid trid, DateTime processedDate) {
return new ContactPendingActionNotificationResponse().init(
contactId, actionResult, trid, processedDate);
return init(
new ContactPendingActionNotificationResponse(),
contactId,
actionResult,
trid,
processedDate);
}
}
}