Enum IdType
- java.lang.Object
-
- java.lang.Enum<IdType>
-
- io.mosip.authentication.core.indauth.dto.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
-
-
Field Summary
Fields Modifier and Type Field Description static IdTypeDEFAULT_ID_TYPEValue that indicates that default id.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>getAlias()Gets the alias.StringgetAliasOrType()Gets the alias or type.static StringgetAliasStrOrSameStr(String type)Gets the alias str or same str.static Optional<IdType>getIDType(String typeOrAlias)Look for id type or alias either "UIN" or "VID" or "USERID".static IdTypegetIDTypeOrDefault(String type)Gets the ID type or default.static StringgetIDTypeStrOrDefault(String type)Gets the ID type str or default.static StringgetIDTypeStrOrSameStr(String type)Gets the ID type str or same str.StringgetType()get id-type.static voidinitializeAliases(org.springframework.core.env.Environment env)Initialize aliases.StringtoString()static IdTypevalueOf(String name)Returns the enum constant of this type with the specified name.static IdType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 nameNullPointerException- 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
-
getAliasOrType
public String getAliasOrType()
Gets the alias or type.- Returns:
- the alias or type
-
-