argos/dmp-backend/core/src/main/java/eu/eudat/commons/enums/ProviderType.java

37 lines
832 B
Java
Raw Normal View History

2023-10-16 16:38:12 +02:00
package eu.eudat.commons.enums;
2023-10-23 14:58:33 +02:00
import com.fasterxml.jackson.annotation.JsonValue;
2023-10-16 16:38:12 +02:00
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;
}
2023-10-23 14:58:33 +02:00
@JsonValue
2023-10-16 16:38:12 +02:00
public Integer getValue() { return this.value; }
2023-10-17 11:39:29 +02:00
2023-10-17 12:45:59 +02:00
private static final Map<Integer, ProviderType> map = EnumUtils.getEnumValueMap(ProviderType.class);
2023-10-17 11:39:29 +02:00
public static ProviderType of(Integer i) {
return map.get(i);
}
2023-10-16 16:38:12 +02:00
}