
ee.sk.smartid.CertificateLevel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smart-id-java-client Show documentation
Show all versions of smart-id-java-client Show documentation
Smart-ID Java client is a Java library that can be used for easy integration of the Smart-ID solution to information systems or e-services
package ee.sk.smartid;
import org.apache.commons.lang3.StringUtils;
import java.util.HashMap;
import java.util.Map;
public class CertificateLevel {
private String certificateLevel;
private static final Map certificateLevels = new HashMap<>();
static {
certificateLevels.put("ADVANCED", 1);
certificateLevels.put("QUALIFIED", 2);
}
public CertificateLevel(String certificateLevel) {
this.certificateLevel = certificateLevel;
}
public boolean isEqualOrAbove(String certificateLevel) {
if (StringUtils.equalsIgnoreCase(this.certificateLevel, certificateLevel)) {
return true;
} else if (certificateLevels.get(certificateLevel) != null && certificateLevels.get(this.certificateLevel) != null) {
return certificateLevels.get(certificateLevel) <= certificateLevels.get(this.certificateLevel);
}
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy