use of com.sun.identity.password.ui.model.PWResetQuestionModel in project OpenAM by OpenRock.
the class PWResetQuestionViewBean method beginResetPageDisplay.
/**
* Begins password secret questions content
*
* @param event child display event
* @return true if password reset secret questions question is to
* displayed, false otherwise
*/
public boolean beginResetPageDisplay(ChildDisplayEvent event) {
PWResetQuestionModel model = (PWResetQuestionModel) getModel();
String orgDN = (String) getPageSessionAttribute(ORG_DN);
String userDN = (String) getPageSessionAttribute(USER_DN);
return isPWResetEnabled() && model.isQuestionAvailable(userDN, orgDN) && !model.isUserLockout(userDN, orgDN);
}
use of com.sun.identity.password.ui.model.PWResetQuestionModel in project OpenAM by OpenRock.
the class PWResetQuestionViewBean method forwardTo.
/**
* Forwards to current view bean after populating questions. It
* will forward to <code>PWResetUserValidationViewBean</code> if
* the user DN or organization does not exists.
*
* @param context request context
*/
public void forwardTo(RequestContext context) {
String orgDN = (String) getPageSessionAttribute(ORG_DN);
String userDN = (String) getPageSessionAttribute(USER_DN);
ISLocaleContext localeContext = new ISLocaleContext();
localeContext.setLocale(context.getRequest());
java.util.Locale locale = localeContext.getLocale();
if (orgDN == null || orgDN.length() == 0 || userDN == null || userDN.length() == 0) {
PWResetUserValidationViewBean vb = (PWResetUserValidationViewBean) getViewBean(PWResetUserValidationViewBean.class);
vb.forwardTo(context);
} else {
PWResetQuestionModel model = (PWResetQuestionModel) getModel();
model.readPWResetProfile(orgDN);
model.setUserLocale(locale.toString());
populateQuestionsList(userDN, orgDN);
super.forwardTo(context);
}
}
use of com.sun.identity.password.ui.model.PWResetQuestionModel in project OpenAM by OpenRock.
the class PWResetQuestionViewBean method populateQuestionsList.
private void populateQuestionsList(String userDN, String orgDN) {
PWResetQuestionModel model = (PWResetQuestionModel) getModel();
Map map = model.getSecretQuestions(userDN, orgDN);
if (map == null || map.isEmpty()) {
model.setNoQuestionsInfoMsg();
}
}
Aggregations