public void modifyUserOption(List questionAnswers,String userId,boolean forceReset) throws AMConsoleException {
  Map mapData=new HashMap(4);
  if (isLoggedInUser(userId)) {
    Set attribVals=formatOptionData(questionAnswers);
    mapData.put(PW_RESET_QUESTION_ANSWER,attribVals);
  }
  if (isRealmAdmin()) {
    Set set=new HashSet(2);
    set.add(String.valueOf(forceReset));
    mapData.put(PW_RESET_FORCE_RESET,set);
  }
  if (!mapData.isEmpty()) {
    String[] params={userId,PW_RESET_QUESTION_ANSWER};
    logEvent("ATTEMPT_MODIFY_IDENTITY_ATTRIBUTE_VALUE",params);
    try {
      AMIdentity amid=IdUtils.getIdentity(getUserSSOToken(),userId);
      amid.setAttributes(mapData);
      amid.store();
      logEvent("SUCCEED_MODIFY_IDENTITY_ATTRIBUTE_VALUE",params);
    }
 catch (    SSOException e) {
      String strError=getErrorString(e);
      String[] paramsEx={userId,PW_RESET_QUESTION_ANSWER,strError};
      logEvent("SSO_EXCEPTION_MODIFY_IDENTITY_ATTRIBUTE_VALUE",paramsEx);
      throw new AMConsoleException(strError);
    }
catch (    IdRepoException e) {
      String strError=getErrorString(e);
      String[] paramsEx={userId,PW_RESET_QUESTION_ANSWER,strError};
      logEvent("IDM_EXCEPTION_MODIFY_IDENTITY_ATTRIBUTE_VALUE",paramsEx);
      throw new AMConsoleException(strError);
    }
  }
}

public void modifyUserOption ( List questionAnswers , String userId , boolean forceReset ) throws AMConsoleException { Map mapData = new HashMap ( 4 ) ; if ( isLoggedInUser ( userId ) ) { Set attribVals = formatOptionData ( questionAnswers ) ; mapData . put ( PW_RESET_QUESTION_ANSWER , attribVals ) ; } if ( isRealmAdmin ( ) ) { Set set = new HashSet ( 2 ) ; set . add ( String . valueOf ( forceReset ) ) ; mapData . put ( PW_RESET_FORCE_RESET , set ) ; } if ( ! mapData . isEmpty ( ) ) { String [ ] params = { userId , PW_RESET_QUESTION_ANSWER } ; logEvent ( "ATTEMPT_MODIFY_IDENTITY_ATTRIBUTE_VALUE" , params ) ; try { AMIdentity amid = IdUtils . getIdentity ( getUserSSOToken ( ) , userId ) ; amid . setAttributes ( mapData ) ; amid . store ( ) ; logEvent ( "SUCCEED_MODIFY_IDENTITY_ATTRIBUTE_VALUE" , params ) ; } catch ( SSOException e ) { String strError = getErrorString ( e ) ; String [ ] paramsEx = { userId , PW_RESET_QUESTION_ANSWER , strError } ; logEvent ( "SSO_EXCEPTION_MODIFY_IDENTITY_ATTRIBUTE_VALUE" , paramsEx ) ; throw new AMConsoleException ( strError ) ; } catch ( IdRepoException e ) { String strError = getErrorString ( e ) ; String [ ] paramsEx = { userId , PW_RESET_QUESTION_ANSWER , strError } ; logEvent ( "IDM_EXCEPTION_MODIFY_IDENTITY_ATTRIBUTE_VALUE" , paramsEx ) ; throw new AMConsoleException ( strError ) ; } } }
modifies user ' s password reset option .
