use of com.sun.identity.console.user.model.UMUserPasswordResetOptionsModel in project OpenAM by OpenRock.
the class UMUserPasswordResetOptionsViewBean method getQuestions.
private void getQuestions() {
UMUserPasswordResetOptionsModel model = (UMUserPasswordResetOptionsModel) getModel();
String userId = (String) getPageSessionAttribute(EntityEditViewBean.UNIVERSAL_ID);
try {
List questionAnswers = model.getUserAnswers(userId);
populateTableModel(questionAnswers);
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
use of com.sun.identity.console.user.model.UMUserPasswordResetOptionsModel in project OpenAM by OpenRock.
the class UMUserPasswordResetOptionsViewBean method handleButton1Request.
/**
* Handles save password options request.
*
* @param event Request invocation event.
* @throws ModelControlException if action table model state cannot be
* restored.
*/
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
List optionData = restoreOptionsData();
CCCheckBox cbForceResetPwd = (CCCheckBox) getChild(CB_FORCE_RESET_PWD);
boolean forceResetPwd = cbForceResetPwd.isChecked();
UMUserPasswordResetOptionsModel model = (UMUserPasswordResetOptionsModel) getModel();
String userId = (String) getPageSessionAttribute(EntityEditViewBean.UNIVERSAL_ID);
try {
model.modifyUserOption(optionData, userId, forceResetPwd);
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", model.getLocalizedString("profile.updated"));
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
use of com.sun.identity.console.user.model.UMUserPasswordResetOptionsModel in project OpenAM by OpenRock.
the class UMUserPasswordResetOptionsViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
if (!tblModelPopulated) {
getQuestions();
CCCheckBox cbForceResetPwd = (CCCheckBox) getChild(CB_FORCE_RESET_PWD);
UMUserPasswordResetOptionsModel model = (UMUserPasswordResetOptionsModel) getModel();
String userId = (String) getPageSessionAttribute(EntityEditViewBean.UNIVERSAL_ID);
cbForceResetPwd.setChecked(model.isForceReset(userId));
}
}
use of com.sun.identity.console.user.model.UMUserPasswordResetOptionsModel in project OpenAM by OpenRock.
the class UMUserPasswordResetOptionsViewBean method beginQuestionsDisplay.
public boolean beginQuestionsDisplay(ChildDisplayEvent event) {
boolean display = false;
UMUserPasswordResetOptionsModel model = (UMUserPasswordResetOptionsModel) getModel();
String userId = (String) getPageSessionAttribute(EntityEditViewBean.UNIVERSAL_ID);
if (model.isLoggedInUser(userId)) {
SerializedField szCache = (SerializedField) getChild(SZ_CACHE);
List data = (List) szCache.getSerializedObj();
display = (data != null) && !data.isEmpty();
}
return display;
}
Aggregations