mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02: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:
parent
b29d11f0de
commit
da3e855b19
4 changed files with 187 additions and 4 deletions
|
@ -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"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue