Enum Class IdType

java.lang.Object
java.lang.Enum<IdType>
io.mosip.authentication.core.indauth.dto.IdType
All Implemented Interfaces:
Serializable, Comparable<IdType>, Constable

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

    • UIN

      public static final IdType UIN
      The uin.
    • VID

      public static final IdType VID
      The vid.
    • HANDLE

      public static final IdType HANDLE
  • Field Details

    • DEFAULT_ID_TYPE

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

    • values

      public static IdType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IdType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getType

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

      public String toString()
      Overrides:
      toString in class Enum<IdType>
    • 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