Package google.registry.model.domain
Class DomainBase.Builder<T extends DomainBase,B extends DomainBase.Builder<T,B>>
- java.lang.Object
-
- google.registry.model.Buildable.Builder<S>
-
- google.registry.model.Buildable.GenericBuilder<T,B>
-
- google.registry.model.EppResource.Builder<T,B>
-
- google.registry.model.domain.DomainBase.Builder<T,B>
-
- All Implemented Interfaces:
EppResource.BuilderWithTransferData<DomainTransferData,B>
- Direct Known Subclasses:
Domain.Builder
- Enclosing class:
- DomainBase
public static class DomainBase.Builder<T extends DomainBase,B extends DomainBase.Builder<T,B>> extends EppResource.Builder<T,B> implements EppResource.BuilderWithTransferData<DomainTransferData,B>
A builder for constructingDomain
, since it is immutable.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description B
addContacts(com.google.common.collect.ImmutableSet<DesignatedContact> contacts)
B
addGracePeriod(GracePeriod gracePeriod)
B
addNameserver(VKey<Host> nameserver)
B
addNameservers(com.google.common.collect.ImmutableSet<VKey<Host>> nameservers)
B
addSubordinateHost(java.lang.String hostToAdd)
T
build()
Build the resource, nullifying empty strings and sets and setting defaults.B
removeContacts(com.google.common.collect.ImmutableSet<DesignatedContact> contacts)
B
removeGracePeriod(GracePeriod gracePeriod)
B
removeNameserver(VKey<Host> nameserver)
B
removeNameservers(com.google.common.collect.ImmutableSet<VKey<Host>> nameservers)
B
removeSubordinateHost(java.lang.String hostToRemove)
B
setAuthInfo(DomainAuthInfo authInfo)
B
setAutorenewBillingEvent(VKey<BillingRecurrence> autorenewBillingEvent)
B
setAutorenewEndTime(java.util.Optional<org.joda.time.DateTime> autorenewEndTime)
Sets the autorenew end time, or clears it if empty is passed.B
setAutorenewPollMessage(VKey<PollMessage.Autorenew> autorenewPollMessage)
B
setContacts(com.google.common.collect.ImmutableSet<DesignatedContact> contacts)
B
setContacts(DesignatedContact contact)
B
setCurrentBulkToken(VKey<AllocationToken> currentBulkToken)
B
setDeletePollMessage(VKey<PollMessage.OneTime> deletePollMessage)
B
setDomainName(java.lang.String domainName)
B
setDsData(com.google.common.collect.ImmutableSet<DomainDsData> dsData)
B
setGracePeriods(com.google.common.collect.ImmutableSet<GracePeriod> gracePeriods)
B
setIdnTableName(java.lang.String idnTableName)
B
setLastTransferTime(org.joda.time.DateTime lastTransferTime)
Set the time when this resource was transferred.B
setLaunchNotice(LaunchNotice launchNotice)
B
setLordnPhase(LordnTaskUtils.LordnPhase lordnPhase)
B
setNameservers(com.google.common.collect.ImmutableSet<VKey<Host>> nameservers)
B
setNameservers(VKey<Host> nameserver)
B
setRegistrant(VKey<Contact> registrant)
B
setRegistrationExpirationTime(org.joda.time.DateTime registrationExpirationTime)
B
setSmdId(java.lang.String smdId)
B
setSubordinateHosts(com.google.common.collect.ImmutableSet<java.lang.String> subordinateHosts)
B
setTransferData(DomainTransferData transferData)
-
Methods inherited from class google.registry.model.EppResource.Builder
addStatusValue, addStatusValues, removeStatusValue, removeStatusValues, setCreationRegistrarId, setCreationTime, setCreationTimeForTest, setDeletionTime, setLastEppUpdateRegistrarId, setLastEppUpdateTime, setPersistedCurrentSponsorRegistrarId, setRepoId, setStatusValues, setUpdateTimestamp
-
Methods inherited from class google.registry.model.Buildable.GenericBuilder
thisCastToDerived
-
Methods inherited from class google.registry.model.Buildable.Builder
getInstance
-
-
-
-
Method Detail
-
build
public T build()
Description copied from class:EppResource.Builder
Build the resource, nullifying empty strings and sets and setting defaults.- Overrides:
build
in classEppResource.Builder<T extends DomainBase,B extends DomainBase.Builder<T,B>>
-
setDomainName
public B setDomainName(java.lang.String domainName)
-
setDsData
public B setDsData(com.google.common.collect.ImmutableSet<DomainDsData> dsData)
-
setAuthInfo
public B setAuthInfo(DomainAuthInfo authInfo)
-
setNameservers
public B setNameservers(com.google.common.collect.ImmutableSet<VKey<Host>> nameservers)
-
addNameservers
public B addNameservers(com.google.common.collect.ImmutableSet<VKey<Host>> nameservers)
-
removeNameservers
public B removeNameservers(com.google.common.collect.ImmutableSet<VKey<Host>> nameservers)
-
setContacts
public B setContacts(DesignatedContact contact)
-
setContacts
public B setContacts(com.google.common.collect.ImmutableSet<DesignatedContact> contacts)
-
addContacts
public B addContacts(com.google.common.collect.ImmutableSet<DesignatedContact> contacts)
-
removeContacts
public B removeContacts(com.google.common.collect.ImmutableSet<DesignatedContact> contacts)
-
setLaunchNotice
public B setLaunchNotice(LaunchNotice launchNotice)
-
setIdnTableName
public B setIdnTableName(java.lang.String idnTableName)
-
setSubordinateHosts
public B setSubordinateHosts(com.google.common.collect.ImmutableSet<java.lang.String> subordinateHosts)
-
addSubordinateHost
public B addSubordinateHost(java.lang.String hostToAdd)
-
removeSubordinateHost
public B removeSubordinateHost(java.lang.String hostToRemove)
-
setRegistrationExpirationTime
public B setRegistrationExpirationTime(org.joda.time.DateTime registrationExpirationTime)
-
setDeletePollMessage
public B setDeletePollMessage(VKey<PollMessage.OneTime> deletePollMessage)
-
setAutorenewBillingEvent
public B setAutorenewBillingEvent(VKey<BillingRecurrence> autorenewBillingEvent)
-
setAutorenewPollMessage
public B setAutorenewPollMessage(@Nullable VKey<PollMessage.Autorenew> autorenewPollMessage)
-
setLordnPhase
public B setLordnPhase(LordnTaskUtils.LordnPhase lordnPhase)
-
setSmdId
public B setSmdId(java.lang.String smdId)
-
setGracePeriods
public B setGracePeriods(com.google.common.collect.ImmutableSet<GracePeriod> gracePeriods)
-
addGracePeriod
public B addGracePeriod(GracePeriod gracePeriod)
-
removeGracePeriod
public B removeGracePeriod(GracePeriod gracePeriod)
-
setAutorenewEndTime
public B setAutorenewEndTime(java.util.Optional<org.joda.time.DateTime> autorenewEndTime)
Sets the autorenew end time, or clears it if empty is passed.Note that
DateTimeUtils.END_OF_TIME
is used as a sentinel value in the database representation to signify that autorenew doesn't end, and is mapped to empty here for the purposes of more legible business logic.
-
setTransferData
public B setTransferData(DomainTransferData transferData)
- Specified by:
setTransferData
in interfaceEppResource.BuilderWithTransferData<T extends DomainBase,B extends DomainBase.Builder<T,B>>
-
setLastTransferTime
public B setLastTransferTime(org.joda.time.DateTime lastTransferTime)
Description copied from interface:EppResource.BuilderWithTransferData
Set the time when this resource was transferred.- Specified by:
setLastTransferTime
in interfaceEppResource.BuilderWithTransferData<T extends DomainBase,B extends DomainBase.Builder<T,B>>
-
setCurrentBulkToken
public B setCurrentBulkToken(@Nullable VKey<AllocationToken> currentBulkToken)
-
-