Class AliasInfo


  • public class AliasInfo
    extends Object
    Class encapsulating domain alias information. The information is used to prevent harvesting the domains which are aliases of other domains.
    • Constructor Detail

      • AliasInfo

        public AliasInfo​(String domain,
                         String aliasOf,
                         Date lastChange)
                  throws ArgumentNotValid
        Constructor for the AliasInfo class.
        Parameters:
        domain - a given domain
        aliasOf - the given domain is an alias of this domain
        lastChange - the alias was (re-)registered on this date.
        Throws:
        ArgumentNotValid - in the following cases: 1. domain is null or empty 2. aliasOf is null or empty 3. lastChange is null 4. domain equals aliasOf
    • Method Detail

      • getAliasOf

        public String getAliasOf()
        Returns:
        Returns the aliasOf.
      • getDomain

        public String getDomain()
        Returns:
        Returns the domain.
      • getLastChange

        public Date getLastChange()
        Returns:
        Returns the lastChange.
      • isExpired

        public boolean isExpired()
        Is this alias expired? This method depends upon the Constant: dk.netarkivet.harvester.webinterface.Constants.ALIAS_TIMEOUT_IN_MILLISECONDS Note that this constant is now read from settings.
        Returns:
        true, if alias is expired
      • getExpirationDate

        public Date getExpirationDate()
        The date when this alias will expire (or has expired).
        Returns:
        The expiration date for this alias. May be in the past or in the future.