37 lines
832 B
Java
37 lines
832 B
Java
package eu.eudat.commons.enums;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonValue;
|
|
import eu.eudat.data.converters.enums.DatabaseEnum;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
public enum ProviderType implements DatabaseEnum<Integer> {
|
|
|
|
Google (1),
|
|
Facebook ( 2),
|
|
Twitter ( 3),
|
|
LinkedIn (4),
|
|
NativeLogin ( 5),
|
|
B2Access ( 6),
|
|
ORCID (7),
|
|
OpenAire ( 8),
|
|
Configurable ( 9),
|
|
Zenodo (10),
|
|
Keycloack ( 128);
|
|
|
|
private final Integer value;
|
|
|
|
ProviderType(Integer value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public Integer getValue() { return this.value; }
|
|
|
|
private static final Map<Integer, ProviderType> map = EnumUtils.getEnumValueMap(ProviderType.class);
|
|
public static ProviderType of(Integer i) {
|
|
return map.get(i);
|
|
}
|
|
}
|