Enum FqdnValidator

  • All Implemented Interfaces:
    Serializable, Comparable<FqdnValidator>

    public enum FqdnValidator
    extends Enum<FqdnValidator>
    This class determines whether a host name is valid; and allows to retrieve fully qualified host name from a partial (virtual) host name. The list of valid FQDNs are maintained by NamingService.updateFqdnMappings(Set).
    • Enum Constant Detail

    • Method Detail

      • values

        public static FqdnValidator[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FqdnValidator c : FqdnValidator.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FqdnValidator valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • initialize

        public void initialize()
      • isHostnameValid

        public boolean isHostnameValid​(String hostname)
        Returns true if a host name is valid. hostname is valid if it is contained in the list of fully qualified host names. Or, it is the default host name where OpenAM is installed.
        Parameters:
        hostname - host name.
        Returns:
        true if a host name is valid.
      • getFullyQualifiedHostName

        public String getFullyQualifiedHostName​(String hostname)
        Returns null if a given host name is valid. Otherwise, this method looks up the fully qualified domain name map for matching entry. Default host name is returned if there is no matching entry.
        Parameters:
        hostname - host name.
        Returns:
        fully qualified host name of hostname.