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<T>
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 constructing
Domain
, since it is immutable.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddContacts
(com.google.common.collect.ImmutableSet<DesignatedContact> contacts) addGracePeriod
(GracePeriod gracePeriod) addNameserver
(VKey<Host> nameserver) addNameservers
(com.google.common.collect.ImmutableSet<VKey<Host>> nameservers) addSubordinateHost
(String hostToAdd) build()
Build the resource, nullifying empty strings and sets and setting defaults.removeContacts
(com.google.common.collect.ImmutableSet<DesignatedContact> contacts) removeGracePeriod
(GracePeriod gracePeriod) removeNameserver
(VKey<Host> nameserver) removeNameservers
(com.google.common.collect.ImmutableSet<VKey<Host>> nameservers) removeSubordinateHost
(String hostToRemove) setAuthInfo
(DomainAuthInfo authInfo) setAutorenewBillingEvent
(VKey<BillingRecurrence> autorenewBillingEvent) setAutorenewEndTime
(Optional<org.joda.time.DateTime> autorenewEndTime) Sets the autorenew end time, or clears it if empty is passed.setAutorenewPollMessage
(VKey<PollMessage.Autorenew> autorenewPollMessage) setContacts
(com.google.common.collect.ImmutableSet<DesignatedContact> contacts) setContacts
(DesignatedContact contact) setCurrentBulkToken
(VKey<AllocationToken> currentBulkToken) setDeletePollMessage
(VKey<PollMessage.OneTime> deletePollMessage) setDomainName
(String domainName) setDsData
(com.google.common.collect.ImmutableSet<DomainDsData> dsData) setGracePeriods
(com.google.common.collect.ImmutableSet<GracePeriod> gracePeriods) setIdnTableName
(String idnTableName) setLastTransferTime
(org.joda.time.DateTime lastTransferTime) Set the time when this resource was transferred.setLaunchNotice
(LaunchNotice launchNotice) setLordnPhase
(LordnTaskUtils.LordnPhase lordnPhase) setNameservers
(com.google.common.collect.ImmutableSet<VKey<Host>> nameservers) setNameservers
(VKey<Host> nameserver) setRegistrant
(Optional<VKey<Contact>> registrant) setRegistrationExpirationTime
(org.joda.time.DateTime registrationExpirationTime) setSubordinateHosts
(com.google.common.collect.ImmutableSet<String> subordinateHosts) 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
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
-
setDsData
-
setRegistrant
-
setAuthInfo
-
setNameservers
-
setNameservers
-
addNameserver
-
addNameservers
-
removeNameserver
-
removeNameservers
-
setContacts
-
setContacts
-
addContacts
-
removeContacts
-
setLaunchNotice
-
setIdnTableName
-
setSubordinateHosts
-
addSubordinateHost
-
removeSubordinateHost
-
setRegistrationExpirationTime
-
setDeletePollMessage
-
setAutorenewBillingEvent
-
setAutorenewPollMessage
-
setLordnPhase
-
setSmdId
-
setGracePeriods
-
addGracePeriod
-
removeGracePeriod
-
setAutorenewEndTime
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
- Specified by:
setTransferData
in interfaceEppResource.BuilderWithTransferData<T extends DomainBase,
B extends DomainBase.Builder<T, B>>
-
setLastTransferTime
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
-