Search in sources :

Example 1 with SecurityQuestionsResetPolicyType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityQuestionsResetPolicyType 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;
    }
}
Also used : MailResetPolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.MailResetPolicyType) SmsResetPolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.SmsResetPolicyType) SecurityQuestionsResetPolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityQuestionsResetPolicyType)

Aggregations

MailResetPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.MailResetPolicyType)1 SecurityQuestionsResetPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityQuestionsResetPolicyType)1 SmsResetPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.SmsResetPolicyType)1