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 Details

    • Builder

      public Builder()
    • Builder

      public Builder(T instance)
  • Method Details

    • setRegistrarId

      public B setRegistrarId(String registrarId)
    • setIanaIdentifier

      public B setIanaIdentifier(@Nullable Long ianaIdentifier)
    • setPoNumber

      public B setPoNumber(Optional<String> poNumber)
    • setBillingAccountMap

      public B setBillingAccountMap(@Nullable Map<org.joda.money.CurrencyUnit,String> billingAccountMap)
    • setRegistrarName

      public B setRegistrarName(String registrarName)
    • setType

      public B setType(RegistrarBase.Type type)
    • setState

      public B setState(RegistrarBase.State state)
    • setAllowedTlds

      public B setAllowedTlds(Set<String> allowedTlds)
    • setAllowedTldsUncached

      public B setAllowedTldsUncached(Set<String> allowedTlds)
      Same as setAllowedTlds(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

      public B setClientCertificate(String clientCertificate, org.joda.time.DateTime now)
    • setLastExpiringCertNotificationSentDate

      public B setLastExpiringCertNotificationSentDate(org.joda.time.DateTime now)
    • setLastExpiringFailoverCertNotificationSentDate

      public B setLastExpiringFailoverCertNotificationSentDate(org.joda.time.DateTime now)
    • setFailoverClientCertificate

      public B setFailoverClientCertificate(String clientCertificate, org.joda.time.DateTime now)
    • setContactsRequireSyncing

      public B setContactsRequireSyncing(boolean contactsRequireSyncing)
    • setIpAddressAllowList

      public B setIpAddressAllowList(Iterable<CidrAddressBlock> ipAddressAllowList)
    • setLocalizedAddress

      public B setLocalizedAddress(RegistrarAddress localizedAddress)
    • setInternationalizedAddress

      public B setInternationalizedAddress(RegistrarAddress internationalizedAddress)
    • setPhoneNumber

      public B setPhoneNumber(String phoneNumber)
    • setFaxNumber

      public B setFaxNumber(String faxNumber)
    • setEmailAddress

      public B setEmailAddress(String emailAddress)
    • setWhoisServer

      public B setWhoisServer(String whoisServer)
    • setRdapBaseUrls

      public B setRdapBaseUrls(Set<String> rdapBaseUrls)
    • setBlockPremiumNames

      public B setBlockPremiumNames(boolean blockPremiumNames)
    • setUrl

      public B setUrl(String url)
    • setIcannReferralEmail

      public B setIcannReferralEmail(String icannReferralEmail)
    • setDriveFolderId

      public B setDriveFolderId(@Nullable String driveFolderId)
    • setPassword

      public B setPassword(String password)
    • setPhonePasscode

      public B setPhonePasscode(String phonePasscode)
      Set the phone passcode.
      Throws:
      IllegalArgumentException - if provided passcode is not 5-digit numeric
    • setRegistryLockAllowed

      public B setRegistryLockAllowed(boolean registryLockAllowed)
    • setLastUpdateTime

      public B 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.
    • build

      public T build()
      Build the registrar, nullifying empty fields.
      Overrides:
      build in class Buildable.Builder<T extends RegistrarBase>