Enum IdType

  • All Implemented Interfaces:
    Serializable, Comparable<IdType>

    public enum IdType
    extends Enum<IdType>
    General-purpose annotation used for configuring details of user identification.
    Author:
    Rakesh Roshan, Loganathan Sekar
    • Enum Constant Detail

      • UIN

        public static final IdType UIN
        The uin.
      • VID

        public static final IdType VID
        The vid.
      • HANDLE

        public static final IdType HANDLE
    • Field Detail

      • DEFAULT_ID_TYPE

        public static final IdType DEFAULT_ID_TYPE
        Value that indicates that default id.
    • Method Detail

      • values

        public static IdType[] 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 (IdType c : IdType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static IdType 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
      • getType

        public String getType()
        get id-type.
        Returns:
        type
      • getIDType

        public static Optional<IdType> getIDType​(String typeOrAlias)
        Look for id type or alias either "UIN" or "VID" or "USERID". default id is "UIN"
        Parameters:
        typeOrAlias - String id-type or alias
        Returns:
        IDType Optional with IdType
      • getIDTypeOrDefault

        public static IdType getIDTypeOrDefault​(String type)
        Gets the ID type or default.
        Parameters:
        type - the type
        Returns:
        the ID type or default
      • getIDTypeStrOrDefault

        public static String getIDTypeStrOrDefault​(String type)
        Gets the ID type str or default.
        Parameters:
        type - the type
        Returns:
        the ID type str or default
      • getIDTypeStrOrSameStr

        public static String getIDTypeStrOrSameStr​(String type)
        Gets the ID type str or same str.
        Parameters:
        type - the type
        Returns:
        the ID type str or same str
      • getAliasStrOrSameStr

        public static String getAliasStrOrSameStr​(String type)
        Gets the alias str or same str.
        Parameters:
        type - the type
        Returns:
        the alias str or same str
      • initializeAliases

        public static void initializeAliases​(org.springframework.core.env.Environment env)
        Initialize aliases.
        Parameters:
        env - the env
      • getAlias

        public Optional<String> getAlias()
        Gets the alias.
        Returns:
        the alias
      • getAliasOrType

        public String getAliasOrType()
        Gets the alias or type.
        Returns:
        the alias or type