Class Tld

All Implemented Interfaces:
Buildable, UnsafeSerializable, Serializable, Cloneable

@Entity public class Tld extends ImmutableObject implements Buildable, UnsafeSerializable
Persisted per-TLD configuration data.
See Also:
  • Field Details


      public static final Tld.TldState DEFAULT_TLD_STATE
      Default values for all the relevant TLD parameters.

      public static final boolean DEFAULT_ESCROW_ENABLED
      See Also:

      public static final boolean DEFAULT_DNS_PAUSED
      See Also:

      public static final org.joda.time.Duration DEFAULT_ADD_GRACE_PERIOD

      public static final org.joda.time.Duration DEFAULT_AUTO_RENEW_GRACE_PERIOD

      public static final org.joda.time.Duration DEFAULT_REDEMPTION_GRACE_PERIOD

      public static final org.joda.time.Duration DEFAULT_RENEW_GRACE_PERIOD

      public static final org.joda.time.Duration DEFAULT_TRANSFER_GRACE_PERIOD

      public static final org.joda.time.Duration DEFAULT_AUTOMATIC_TRANSFER_LENGTH

      public static final org.joda.time.Duration DEFAULT_PENDING_DELETE_LENGTH

      public static final org.joda.time.Duration DEFAULT_ANCHOR_TENANT_ADD_GRACE_PERIOD

      public static final DEFAULT_CURRENCY

      public static final DEFAULT_CREATE_BILLING_COST

      public static final DEFAULT_EAP_BILLING_COST

      public static final DEFAULT_RENEW_BILLING_COST

      public static final DEFAULT_RESTORE_BILLING_COST


  • Constructor Details

    • Tld

      public Tld()
  • Method Details

    • equalYaml

      public boolean equalYaml(Tld tldToCompare)
    • get

      public static Tld get(String tld)
      Returns the TLD for a given TLD, throwing if none exists.
    • get

      public static<Tld> get(Set<String> tlds)
      Returns the TLD entities for the given TLD strings, throwing if any don't exist.
    • invalidateInCache

      public void invalidateInCache()
      Invalidates the cache entry.

      This is called automatically when the tld is saved. One should also call it when a tld is deleted.

    • createVKey

      public static VKey<Tld> createVKey(String tld)
    • createVKey

      public VKey<Tld> createVKey()
      createVKey in class ImmutableObject
    • isEnrolledWithBsa

      public static boolean isEnrolledWithBsa(Tld tld, org.joda.time.DateTime now)
      Checks if tld is enrolled with BSA.
    • getReservedListNames

      public<String> getReservedListNames()
      Retrieves an ImmutableSet of all ReservedLists associated with this TLD.

      This set contains only the names of the list and not a reference to the lists. Updates to a reserved list in Cloud SQL are saved as a new ReservedList entity. When using the ReservedList for a tld, the database should be queried for the entity with this name that has the largest revision ID.

    • getTldStr

      public String getTldStr()
    • getRoidSuffix

      public String getRoidSuffix()
    • getTld

      public getTld()
      Retrieve the actual domain name representing the TLD for which this registry operates.
    • getTldType

      public Tld.TldType getTldType()
      Retrieve the TLD type (real or test).
    • getBsaEnrollStartTime

      public Optional<org.joda.time.DateTime> getBsaEnrollStartTime()
      Returns the time when this TLD was enrolled in the Brand Safety Alliance (BSA) program.
    • isInvoicingEnabled

      public boolean isInvoicingEnabled()
      Retrieve whether invoicing is enabled.
    • getTldState

      public Tld.TldState getTldState(org.joda.time.DateTime now)
      Retrieve the TLD state at the given time. Defaults to Tld.TldState.PREDELEGATION.

      Note that Tld.TldState.PDT TLDs pretend to be in Tld.TldState.GENERAL_AVAILABILITY.

    • isPdt

      public boolean isPdt(org.joda.time.DateTime now)
      Retrieve whether this TLD is in predelegation testing.
    • getCreationTime

      public org.joda.time.DateTime getCreationTime()
    • getEscrowEnabled

      public boolean getEscrowEnabled()
    • getDnsPaused

      public boolean getDnsPaused()
    • getDriveFolderId

      @Nullable public String getDriveFolderId()
    • getAddGracePeriodLength

      public org.joda.time.Duration getAddGracePeriodLength()
    • getAutoRenewGracePeriodLength

      public org.joda.time.Duration getAutoRenewGracePeriodLength()
    • getRedemptionGracePeriodLength

      public org.joda.time.Duration getRedemptionGracePeriodLength()
    • getRenewGracePeriodLength

      public org.joda.time.Duration getRenewGracePeriodLength()
    • getTransferGracePeriodLength

      public org.joda.time.Duration getTransferGracePeriodLength()
    • getAutomaticTransferLength

      public org.joda.time.Duration getAutomaticTransferLength()
    • getPendingDeleteLength

      public org.joda.time.Duration getPendingDeleteLength()
    • getAnchorTenantAddGracePeriodLength

      public org.joda.time.Duration getAnchorTenantAddGracePeriodLength()
    • getPremiumListName

      public Optional<String> getPremiumListName()
    • getCurrency

      public getCurrency()
    • getCreateBillingCost

      public getCreateBillingCost(org.joda.time.DateTime now)
      Use PricingEngineProxy.getDomainCreateCost instead of this to find the cost for a domain create.
    • getCreateBillingCostTransitions

      public<org.joda.time.DateTime,> getCreateBillingCostTransitions()
    • getRestoreBillingCost

      public getRestoreBillingCost()
      Returns the add-on cost of a domain restore (the flat tld-wide fee charged in addition to one year of renewal for that name).
    • getStandardRenewCost

      public getStandardRenewCost(org.joda.time.DateTime now)
      Use PricingEngineProxy.getDomainRenewCost instead of this to find the cost for a domain renewal, and all derived costs (i.e. autorenews, transfers, and the per-domain part of a restore cost).
    • getServerStatusChangeBillingCost

      public getServerStatusChangeBillingCost()
      Returns the cost of a server status change (i.e. lock).
    • getRegistryLockOrUnlockBillingCost

      public getRegistryLockOrUnlockBillingCost()
      Returns the cost of a registry lock/unlock.
    • getTldStateTransitions

      public<org.joda.time.DateTime,Tld.TldState> getTldStateTransitions()
    • getRenewBillingCostTransitions

      public<org.joda.time.DateTime,> getRenewBillingCostTransitions()
    • getEapFeeFor

      public Fee getEapFeeFor(org.joda.time.DateTime now)
      Returns the EAP fee for the tld at the given time.
    • getEapFeeScheduleAsMap

      public<org.joda.time.DateTime,> getEapFeeScheduleAsMap()
    • getLordnUsername

      public String getLordnUsername()
    • getClaimsPeriodEnd

      public org.joda.time.DateTime getClaimsPeriodEnd()
    • getPricingEngineClassName

      public String getPricingEngineClassName()
    • getDnsWriters

      public<String> getDnsWriters()
    • getNumDnsPublishLocks

      public int getNumDnsPublishLocks()
      Returns the number of simultaneous DNS publish operations we allow at once.
    • getDnsAPlusAaaaTtl

      public Optional<org.joda.time.Duration> getDnsAPlusAaaaTtl()
      Returns the time to live for A and AAAA records.
    • getDnsNsTtl

      public Optional<org.joda.time.Duration> getDnsNsTtl()
      Returns the time to live for NS records.
    • getDnsDsTtl

      public Optional<org.joda.time.Duration> getDnsDsTtl()
      Returns the time to live for DS records.
    • getTldUnicode

      public String getTldUnicode()
      Retrieve the TLD unicode representation.
    • getAllowedRegistrantContactIds

      public<String> getAllowedRegistrantContactIds()
    • getAllowedFullyQualifiedHostNames

      public<String> getAllowedFullyQualifiedHostNames()
    • getDefaultPromoTokens

      public<VKey<AllocationToken>> getDefaultPromoTokens()
    • getIdnTables

      public<IdnTableEnum> getIdnTables()
    • getBreakglassMode

      public boolean getBreakglassMode()
    • asBuilder

      public Tld.Builder asBuilder()
      Specified by:
      asBuilder in interface Buildable