mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
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:
parent
0ce293325c
commit
7cf4ddce97
41 changed files with 92 additions and 83 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue