Class BaseFee

java.lang.Object
google.registry.model.ImmutableObject
google.registry.model.domain.fee.BaseFee
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
Credit, Fee

public abstract class BaseFee extends ImmutableObject
Base class for the fee and credit types.
  • Constructor Details

    • BaseFee

      public BaseFee()
  • Method Details

    • getDescription

      public String getDescription()
    • getApplied

      public BaseFee.AppliedType getApplied()
    • getGracePeriod

      public org.joda.time.Period getGracePeriod()
    • getRefundable

      public Boolean getRefundable()
    • isPremium

      public boolean isPremium()
      Returns whether the fee in question is a premium price.
    • getCost

      public BigDecimal getCost()
      According to the fee extension specification, a fee must always be non-negative, while a credit must always be negative. Essentially, they are the same thing, just with different sign. However, we need them to be separate classes for proper JAXB handling.
      See Also:
    • getType

      public BaseFee.FeeType getType()
    • hasValidDateRange

      public boolean hasValidDateRange()
    • getValidDateRange

      public com.google.common.collect.Range<org.joda.time.DateTime> getValidDateRange()
    • hasZeroCost

      public boolean hasZeroCost()
    • hasDefaultAttributes

      public boolean hasDefaultAttributes()
    • parseDescriptionForTypes

      public com.google.common.collect.ImmutableList<BaseFee.FeeType> parseDescriptionForTypes()
      Parses the description field and returns BaseFee.FeeTypes that match the description.

      A BaseFee.FeeType is a match when its formatString contains the description, case insensitively.