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

    • DEFAULT_TLD_STATE

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

      public static final boolean DEFAULT_ESCROW_ENABLED
      See Also:
    • DEFAULT_DNS_PAUSED

      public static final boolean DEFAULT_DNS_PAUSED
      See Also:
    • DEFAULT_ADD_GRACE_PERIOD

      public static final org.joda.time.Duration DEFAULT_ADD_GRACE_PERIOD
    • DEFAULT_AUTO_RENEW_GRACE_PERIOD

      public static final org.joda.time.Duration DEFAULT_AUTO_RENEW_GRACE_PERIOD
    • DEFAULT_REDEMPTION_GRACE_PERIOD

      public static final org.joda.time.Duration DEFAULT_REDEMPTION_GRACE_PERIOD
    • DEFAULT_RENEW_GRACE_PERIOD

      public static final org.joda.time.Duration DEFAULT_RENEW_GRACE_PERIOD
    • DEFAULT_TRANSFER_GRACE_PERIOD

      public static final org.joda.time.Duration DEFAULT_TRANSFER_GRACE_PERIOD
    • DEFAULT_AUTOMATIC_TRANSFER_LENGTH

      public static final org.joda.time.Duration DEFAULT_AUTOMATIC_TRANSFER_LENGTH
    • DEFAULT_PENDING_DELETE_LENGTH

      public static final org.joda.time.Duration DEFAULT_PENDING_DELETE_LENGTH
    • DEFAULT_ANCHOR_TENANT_ADD_GRACE_PERIOD

      public static final org.joda.time.Duration DEFAULT_ANCHOR_TENANT_ADD_GRACE_PERIOD
    • DEFAULT_CURRENCY

      public static final org.joda.money.CurrencyUnit DEFAULT_CURRENCY
    • DEFAULT_CREATE_BILLING_COST

      public static final org.joda.money.Money DEFAULT_CREATE_BILLING_COST
    • DEFAULT_EAP_BILLING_COST

      public static final org.joda.money.Money DEFAULT_EAP_BILLING_COST
    • DEFAULT_RENEW_BILLING_COST

      public static final org.joda.money.Money DEFAULT_RENEW_BILLING_COST
    • DEFAULT_RESTORE_BILLING_COST

      public static final org.joda.money.Money DEFAULT_RESTORE_BILLING_COST
    • DEFAULT_SERVER_STATUS_CHANGE_BILLING_COST

      public static final org.joda.money.Money DEFAULT_SERVER_STATUS_CHANGE_BILLING_COST
    • DEFAULT_REGISTRY_LOCK_OR_UNLOCK_BILLING_COST

      public static final org.joda.money.Money DEFAULT_REGISTRY_LOCK_OR_UNLOCK_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 com.google.common.collect.ImmutableSet<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()
      Overrides:
      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 com.google.common.collect.ImmutableSet<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 com.google.common.net.InternetDomainName 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 org.joda.money.CurrencyUnit getCurrency()
    • getCreateBillingCost

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

      public com.google.common.collect.ImmutableSortedMap<org.joda.time.DateTime,org.joda.money.Money> getCreateBillingCostTransitions()
    • createBillingCostTransitionsEqual

      public boolean createBillingCostTransitionsEqual(Tld newTld)
    • getRestoreBillingCost

      public org.joda.money.Money 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 org.joda.money.Money 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 org.joda.money.Money getServerStatusChangeBillingCost()
      Returns the cost of a server status change (i.e. lock).
    • getRegistryLockOrUnlockBillingCost

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

      public com.google.common.collect.ImmutableSortedMap<org.joda.time.DateTime,Tld.TldState> getTldStateTransitions()
    • getRenewBillingCostTransitions

      public com.google.common.collect.ImmutableSortedMap<org.joda.time.DateTime,org.joda.money.Money> getRenewBillingCostTransitions()
    • getEapFeeFor

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

      public com.google.common.collect.ImmutableSortedMap<org.joda.time.DateTime,org.joda.money.Money> getEapFeeScheduleAsMap()
    • getLordnUsername

      public String getLordnUsername()
    • getClaimsPeriodEnd

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

      public String getPricingEngineClassName()
    • getDnsWriters

      public com.google.common.collect.ImmutableSet<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 com.google.common.collect.ImmutableSet<String> getAllowedRegistrantContactIds()
    • getAllowedFullyQualifiedHostNames

      public com.google.common.collect.ImmutableSet<String> getAllowedFullyQualifiedHostNames()
    • getDefaultPromoTokens

      public com.google.common.collect.ImmutableList<VKey<AllocationToken>> getDefaultPromoTokens()
    • getIdnTables

      public com.google.common.collect.ImmutableSet<IdnTableEnum> getIdnTables()
    • getBreakglassMode

      public boolean getBreakglassMode()
    • asBuilder

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