use of com.evolveum.midpoint.xml.ns._public.common.common_3.SmsResetPolicyType in project midpoint by Evolveum.
the class ResetPolicyDto method initResetPolicyDto.
public void initResetPolicyDto(SecurityPolicyType securityPolicyType) throws SchemaException {
if (securityPolicyType == null) {
return;
}
if (securityPolicyType.getCredentialsReset() == null) {
return;
}
MailResetPolicyType mailResetPolicy = securityPolicyType.getCredentialsReset().getMailReset();
if (mailResetPolicy != null) {
this.resetMethod = ResetMethod.MAIL;
initResetPolicy(mailResetPolicy, securityPolicyType);
return;
}
SmsResetPolicyType smsResetPolicy = securityPolicyType.getCredentialsReset().getSmsReset();
if (smsResetPolicy != null) {
this.resetMethod = ResetMethod.SMS;
initResetPolicy(smsResetPolicy, securityPolicyType);
return;
}
SecurityQuestionsResetPolicyType securityQuestionsResetPolicy = securityPolicyType.getCredentialsReset().getSecurityQuestionReset();
if (securityQuestionsResetPolicy != null) {
this.resetMethod = ResetMethod.SECURITY_QUESTIONS;
initResetPolicy(securityQuestionsResetPolicy, securityPolicyType);
return;
}
}
Aggregations