Class DomainBase.Builder<T extends DomainBase,B extends 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 Details

    • Builder

      public Builder()
  • Method Details

    • build

      public T build()
      Description copied from class: EppResource.Builder
      Build the resource, nullifying empty strings and sets and setting defaults.
      Overrides:
      build in class EppResource.Builder<T extends DomainBase,B extends DomainBase.Builder<T,B>>
    • setDomainName

      public B setDomainName(String domainName)
    • setDsData

      public B setDsData(com.google.common.collect.ImmutableSet<DomainDsData> dsData)
    • setRegistrant

      public B setRegistrant(Optional<VKey<Contact>> registrant)
    • setAuthInfo

      public B setAuthInfo(DomainAuthInfo authInfo)
    • setNameservers

      public B setNameservers(VKey<Host> nameserver)
    • setNameservers

      public B setNameservers(com.google.common.collect.ImmutableSet<VKey<Host>> nameservers)
    • addNameserver

      public B addNameserver(VKey<Host> nameserver)
    • addNameservers

      public B addNameservers(com.google.common.collect.ImmutableSet<VKey<Host>> nameservers)
    • removeNameserver

      public B removeNameserver(VKey<Host> nameserver)
    • 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(String idnTableName)
    • setSubordinateHosts

      public B setSubordinateHosts(com.google.common.collect.ImmutableSet<String> subordinateHosts)
    • addSubordinateHost

      public B addSubordinateHost(String hostToAdd)
    • removeSubordinateHost

      public B removeSubordinateHost(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(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(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 interface EppResource.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 interface EppResource.BuilderWithTransferData<T extends DomainBase,B extends DomainBase.Builder<T,B>>
    • setCurrentBulkToken

      public B setCurrentBulkToken(@Nullable VKey<AllocationToken> currentBulkToken)