Package google.registry.model.registrar
Class RegistrarBase.Builder<T extends RegistrarBase,B extends RegistrarBase.Builder<T,B>>
java.lang.Object
google.registry.model.Buildable.Builder<T>
google.registry.model.Buildable.GenericBuilder<T,B>
google.registry.model.registrar.RegistrarBase.Builder<T,B>
- Direct Known Subclasses:
Registrar.Builder
- Enclosing class:
RegistrarBase
public static class RegistrarBase.Builder<T extends RegistrarBase,B extends RegistrarBase.Builder<T,B>>
extends Buildable.GenericBuilder<T,B>
A builder for constructing
Registrar
, since it is immutable.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the registrar, nullifying empty fields.setAllowedTlds
(Set<String> allowedTlds) setAllowedTldsUncached
(Set<String> allowedTlds) Same assetAllowedTlds(java.util.Set<java.lang.String>)
, but doesn't use the cache to check if the TLDs exist.setBillingAccountMap
(Map<org.joda.money.CurrencyUnit, String> billingAccountMap) setBlockPremiumNames
(boolean blockPremiumNames) setClientCertificate
(String clientCertificate, org.joda.time.DateTime now) setContactsRequireSyncing
(boolean contactsRequireSyncing) setDriveFolderId
(String driveFolderId) setEmailAddress
(String emailAddress) setFailoverClientCertificate
(String clientCertificate, org.joda.time.DateTime now) setFaxNumber
(String faxNumber) setIanaIdentifier
(Long ianaIdentifier) setIcannReferralEmail
(String icannReferralEmail) setInternationalizedAddress
(RegistrarAddress internationalizedAddress) setIpAddressAllowList
(Iterable<CidrAddressBlock> ipAddressAllowList) setLastExpiringCertNotificationSentDate
(org.joda.time.DateTime now) setLastExpiringFailoverCertNotificationSentDate
(org.joda.time.DateTime now) setLastUpdateTime
(org.joda.time.DateTime timestamp) This lets tests set the update timestamp in cases where setting fields resets the timestamp and breaks the verification that an object has not been updated since it was copied.setLocalizedAddress
(RegistrarAddress localizedAddress) setPassword
(String password) setPhoneNumber
(String phoneNumber) setPhonePasscode
(String phonePasscode) Set the phone passcode.setPoNumber
(Optional<String> poNumber) setRdapBaseUrls
(Set<String> rdapBaseUrls) setRegistrarId
(String registrarId) setRegistrarName
(String registrarName) setRegistryLockAllowed
(boolean registryLockAllowed) setState
(RegistrarBase.State state) setType
(RegistrarBase.Type type) setWhoisServer
(String whoisServer) 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() -
Builder
-
-
Method Details
-
setRegistrarId
-
setIanaIdentifier
-
setPoNumber
-
setBillingAccountMap
-
setRegistrarName
-
setType
-
setState
-
setAllowedTlds
-
setAllowedTldsUncached
Same assetAllowedTlds(java.util.Set<java.lang.String>)
, but doesn't use the cache to check if the TLDs exist.This should be used if the TLD we want to set is persisted in the same transaction - meaning its existence can't be cached before we need to save the Registrar.
We can still only set the allowedTld AFTER we saved the Registry entity. Make sure to call
.now()
when saving the Registry entity to make sure it's actually saved before trying to set the allowed TLDs. -
setClientCertificate
-
setLastExpiringCertNotificationSentDate
-
setLastExpiringFailoverCertNotificationSentDate
-
setFailoverClientCertificate
-
setContactsRequireSyncing
-
setIpAddressAllowList
-
setLocalizedAddress
-
setInternationalizedAddress
-
setPhoneNumber
-
setFaxNumber
-
setEmailAddress
-
setWhoisServer
-
setRdapBaseUrls
-
setBlockPremiumNames
-
setUrl
-
setIcannReferralEmail
-
setDriveFolderId
-
setPassword
-
setPhonePasscode
Set the phone passcode.- Throws:
IllegalArgumentException
- if provided passcode is not 5-digit numeric
-
setRegistryLockAllowed
-
setLastUpdateTime
This lets tests set the update timestamp in cases where setting fields resets the timestamp and breaks the verification that an object has not been updated since it was copied. -
build
Build the registrar, nullifying empty fields.- Overrides:
build
in classBuildable.Builder<T extends RegistrarBase>
-