mirror of
https://github.com/google/nomulus
synced 2026-07-25 01:22:52 +00:00
Add temporary @OnLoad to set period in DomainApplication
We are adding the registration period to DomainApplication. For the moment, add an @OnLoad which, if the period is missing, populates it from the EPP XML. This can be removed once we have resaved all applications. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=137723098
This commit is contained in:
@@ -266,11 +266,21 @@ public final class FullFieldsTestEntityHelper {
|
||||
Period period,
|
||||
String reason,
|
||||
DateTime modificationTime) {
|
||||
return makeHistoryEntry(resource, type, period, reason, modificationTime, "<xml></xml>");
|
||||
}
|
||||
|
||||
public static HistoryEntry makeHistoryEntry(
|
||||
EppResource resource,
|
||||
HistoryEntry.Type type,
|
||||
Period period,
|
||||
String reason,
|
||||
DateTime modificationTime,
|
||||
String xml) {
|
||||
HistoryEntry.Builder builder = new HistoryEntry.Builder()
|
||||
.setParent(resource)
|
||||
.setType(type)
|
||||
.setPeriod(period)
|
||||
.setXmlBytes("<xml></xml>".getBytes(UTF_8))
|
||||
.setXmlBytes(xml.getBytes(UTF_8))
|
||||
.setModificationTime(modificationTime)
|
||||
.setClientId("foo")
|
||||
.setTrid(Trid.create("ABC-123"))
|
||||
|
||||
Reference in New Issue
Block a user