Class PWResetQuestionModelImpl
- java.lang.Object
-
- com.sun.identity.password.ui.model.PWResetModelImpl
-
- com.sun.identity.password.ui.model.PWResetQuestionModelImpl
-
- All Implemented Interfaces:
PWResetModel,PWResetQuestionModel,Constants
public class PWResetQuestionModelImpl extends PWResetModelImpl implements PWResetQuestionModel, Constants
PWResetQuestionModelImpldefines a set of methods that are required by password reset question viewbean.
-
-
Field Summary
-
Fields inherited from class com.sun.identity.password.ui.model.PWResetModelImpl
debug, errorMsg, informationMsg, localeContext, logger, passwordResetMsg, pwResetLockoutAttrName, pwResetLockoutAttrValue, resBundle, ssoToken, STRING_TRUE, userId
-
Fields inherited from interface com.sun.identity.shared.Constants
ADVICES_TAG_NAME, AGENT_SESSION_IDLE_TIME, ALLOW_PERSIST_AM_COOKIE, AM_ADMIN_CLI_CERTDB_DIR, AM_AUTH_COOKIE_NAME, AM_BUILD_DATE, AM_BUILD_REVISION, AM_BUILD_VERSION, AM_CONSOLE_DEPLOYMENT_DESCRIPTOR, AM_CONSOLE_HOST, AM_CONSOLE_PORT, AM_CONSOLE_PROTOCOL, AM_CONSOLE_REMOTE, AM_COOKIE_CHECK, AM_COOKIE_ENCODE, AM_COOKIE_HTTPONLY, AM_COOKIE_NAME, AM_COOKIE_SAMESITE, AM_COOKIE_SECURE, AM_COOKIE_TIME_TO_LIVE, AM_CTX_ID, AM_DIRECTORY_HOST, AM_DIRECTORY_PORT, AM_DIRECTORY_SSL_ENABLED, AM_DIST_AUTH_COOKIE_NAME, AM_DISTAUTH_DEPLOYMENT_DESCRIPTOR, AM_DISTAUTH_LB_COOKIE_NAME, AM_DISTAUTH_LB_COOKIE_VALUE, AM_DISTAUTH_SITES, AM_FQDN_MAP, AM_INSTALL_DIR, AM_LB_COOKIE_NAME, AM_LB_COOKIE_VALUE, AM_LOCALE, AM_LOGSTATUS, AM_NAMING_URL, AM_NEW_CONFIGFILE_PATH, AM_PCOOKIE_NAME, AM_PROTECTED_PROPERTY_PREFIX, AM_REDIRECT, AM_SERVER_HOST, AM_SERVER_PORT, AM_SERVER_PROTOCOL, AM_SERVICES_DEPLOYMENT_DESCRIPTOR, AM_SERVICES_SECRET, AM_SESSION_CONSTRAINT_HANDLER, AM_SESSION_CONSTRAINT_MAX_WAIT_TIME, AM_SESSION_DENY_LOGIN_IF_DB_IS_DOWN, AM_SESSION_ENABLE_SESSION_CONSTRAINT, AM_SESSION_FAILOVER_CLUSTER_STATE_CHECK_PERIOD, AM_SESSION_FAILOVER_CLUSTER_STATE_CHECK_TIMEOUT, AM_SESSION_HTTP_SESSION_TRACKING_COOKIE_NAME, AM_SESSION_MAX_CACHE_SIZE, AM_SESSION_MAX_CACHE_TIME, AM_SESSION_MAX_SESSION_LIST_SIZE, AM_SESSION_SESSION_LIST_RETRIEVAL_TIMEOUT, AM_SMTP_HOST, AM_STATS_INTERVAL, AM_VERSION, AM_VERSION_HEADER_ENABLED, AMP, APPEND_SESS_COOKIE_IN_URL, APPLICATION_SESSION_MAX_CACHING_TIME, ASTERISK, AT, ATTR_COOKIE_DOMAINS, ATTR_LOGIN_URL, ATTR_NAME_AGENT_TYPE, AUDIT_AM_ACCESS_ATTEMPT_ENABLED, AUTH_LEVEL_CONDITION_ADVICE, AUTH_LEVEL_EXCLUDE_REQUIRED_REQUISITE, AUTH_RATE_MONITORING_INTERVAL, AUTH_SCHEME_CONDITION_ADVICE, AUTH_UNIQUE_COOKIE_DOMAIN, AUTH_UNIQUE_COOKIE_NAME, AUTHENTICATION_SPECIAL_USERS, AUTHENTICATION_SUPER_USER, AUTOCOMPLETE_ENABLED, C66_ENCODE_AM_COOKIE, CACHE_POLLING_TIME_PROPERTY, CASE_INSENSITIVE_DN, CASE_SENSITIVE_UUID, CDCSERVLET_LOGIN_URL, CDM_CONTENT_TYPE_PROPERTY_NAME, CLIENT_CERTIFICATE_ALIAS, CLIENT_IP_ADDR_HEADER, CLIENT_NOTIFICATION_URL, CLUSTER_SERVER_LIST, COLON, COMMA, COMPOSITE_ADVICE, CONFIG_STORE_DOWN_REDIRECT_URL, CONFIG_VAR_DISTAUTH_BOOTSTRAP_BASE_DIR, CONFIG_VAR_DISTAUTH_BOOTSTRAP_FILENAME, CONFIGURATION_NAME, CONSOLE_UI_DEFAULT_CHARSET, CORE_TOKEN_RESOURCE_ENABLED, CRL_CACHE_DIR_HOST, CRL_CACHE_DIR_PASSWD, CRL_CACHE_DIR_PORT, CRL_CACHE_DIR_SEARCH_ATTR, CRL_CACHE_DIR_SEARCH_LOC, CRL_CACHE_DIR_SSL_ENABLED, CRL_CACHE_DIR_USER, DEFAULT_CACHE_POLLING_TIME, DEFAULT_KRB5_LOGINMODULE, DEFAULT_LDAP_TIME_LIMIT, DEFAULT_OAUTH2_HA_ROOT_SUFFIX, DEFAULT_ROOT_NAMING_ATTRIBUTE, DEFAULT_ROOT_SUFFIX, DEFAULT_SAML2_HA_ROOT_SUFFIX, DEFAULT_SESSION_HA_ROOT_SUFFIX, DEFAULT_SESSION_HA_STORE_TYPE, DEFAULT_SESSION_UPGRADER_IMPL, DEFAULT_TOKEN_ROOT_SUFFIX, DELIMITER_PREF_LEFT, DESERIALISATION_CLASSES_WHITELIST, DESTROY_SESSION_AFTER_UPGRADE, DISTAUTH_BOOTSTRAP_FILE, DISTAUTH_CLUSTER, DISTAUTH_SERVER_HOST, DISTAUTH_SERVER_PORT, DISTAUTH_SERVER_PROTOCOL, DS_ADMIN_PORT, EMBED_REPL_PORT, EMBED_SYNC_SERVERS, EMPTY, ENABLE_HOST_LOOKUP, ENABLE_TRACE_IN_MESSAGE_MODE, ENC_PWD_PROPERTY, ENFORCE_JAAS_THREAD, EQUALS, EVENT_LISTENER_DISABLE_LIST, EVENT_LISTENER_REMOTE_CLIENT_BACKLOG_CACHE, FEDERATION_FED_COOKIE_NAME, FILE_SEPARATOR, FORBIDDEN_TO_COPY_HEADERS, FORBIDDEN_TO_COPY_REQUEST_HEADERS, FORWARD_PARAM, FORWARD_YES_VALUE, GENERIC_SOAP_REST_AUTHENTICATION_EXCEPTION, IDENTITY_WEB_CONTAINER, IGNORE_GOTO_DURING_LOGOUT, INVALID_GOTO_STRINGS, IS_ENABLE_UNIQUE_COOKIE, JSS_HANDLER, JSSE_HANDLER, KRB5_CREDENTIAL_TYPE, KRB5_LOGINMODULE, LDAP_CONN_IDLE_TIME_IN_SECS, LDAP_FALLBACK_SLEEP_TIME_IN_MINS, LDAP_HEARTBEAT, LDAP_HEARTBEAT_TIMEOUT, LDAP_SERVER_TLS_VERSION, LOCAL, LOGIN_URL, MAX_FILE_UPLOAD_SIZE, MONITORING_INTERVAL, MONITORING_TIMEOUT, MULTIPLE_TABS_USED, NAMING_AM_LB_COOKIE, NOTIFICATION_PROPERTY_LIST, NOTIFICATION_THREADPOOL_SIZE, NOTIFICATION_THREADPOOL_THRESHOLD, NOTIFICATIONS_AGENTS_ENABLED, OBJECTCLASS, ORGANIZATION, ORGANIZATION_NAME, ORGANIZATION_NAMING_ATTRIBUTE, PERSIST_AM_COOKIE, PLATFORM_LIST, POLLING_THREADPOOL_SIZE, POLLING_THREADPOOL_THRESHOLD, PROPERTY_CHANGE_NOTIFICATION, PROPERTY_NAME_LB_COOKIE_VALUE, PROTECTED_PROPERTIES_LIST, PROTOCOL_HANDLER, REMOTEAUTH_INCLUDE_REQRES, RESOURCE_LOOKUP_CACHE_ENABLED, REST_APIS_SERVICE_NAME, REST_APIS_SERVICE_VERSION, RETAINED_HTTP_HEADERS_LIST, RETAINED_HTTP_REQUEST_HEADERS_LIST, REWRITE_AS_PATH, RUNTIME_SHUTDOWN_HOOK_ENABLED, SAML_XMLSIG_CERT_ALIAS, SAML_XMLSIG_KEYPASS, SAML_XMLSIG_KEYSTORE, SAML_XMLSIG_STORE_PASS, SDK_GLOBAL_CACHE_PROPERTY, SECURITY_ENCRYPTOR, SECURITY_PROVIDER_PKG, SEMI_COLON, SERVER_MODE, SERVERID_LBCOOKIEVALUE_LIST, SERVICES_CDSSO_COOKIE_DOMAIN, SERVICES_COMM_SERVER_PLLREQUEST_MAX_CONTENT_LENGTH, SERVICES_DEBUG_DIRECTORY, SERVICES_DEBUG_LEVEL, SERVICES_DEBUG_MERGEALL, SERVICES_STATS_DIRECTORY, SERVICES_STATS_STATE, SESSION_REPOSITORY_ATTRIBUTE_NAME_COMPRESSION, SESSION_REPOSITORY_COMPRESSION, SESSION_REPOSITORY_ENCRYPTION, SESSION_RETURN_APP_SESSION, SESSION_UPGRADER_IMPL, SET_COOKIE_TO_ALL_DOMAINS, SITE_ID_LIST, SITE_LIST, SITE_NAMES_LIST, SITE_STATUS_CHECK_CLASS, SITEMONITOR_DISABLED, SM_SMTP_PORT, SM_THREADPOOL_SIZE, SMS_CACHE_PROPERTY, SMS_CACHE_TTL, SMS_CACHE_TTL_ENABLE, SMS_ENABLE_DB_NOTIFICATION, SSO_TOKEN, SUN_SECURITY_PROVIDER_PKG, SVC_NAME_AUTH_CONFIG, SVC_NAME_NAMING, SVC_NAME_PLATFORM, SVC_NAME_SAML, SVC_NAME_USER, SYS_PROPERTY_INSTALL_TIME, SYSTEM_PROXY_ENABLED, SYSTEM_TIMERPOOL_SIZE, TAG_SERVER_HOST, TAG_SERVER_PORT, TAG_SERVER_PROTO, TAG_SERVER_URI, TIMEOUT_HANDLER_LIST, TOP, TRUSTED_SOURCE_LIST, UNIVERSAL_IDENTIFIER, URL_CONNECTION_USE_CACHE, URLCHECKER_DOREQUEST, URLCHECKER_INVALIDATE_INTERVAL, URLCHECKER_RETRY_INTERVAL, URLCHECKER_RETRY_LIMIT, URLCHECKER_SLEEP_INTERVAL, URLCHECKER_TARGET_URL, USE_OLD_LOG_FORMAT, USER_LOCALE_ATTR, VALID_LOGIN_URIS, VERSION_DATE_FORMAT, WEBCONTAINER, WSFED_ACTIVE_LOGIN, XML_DOCUMENT_BUILDER_CACHE_SIZE, XML_SAXPARSER_CACHE_SIZE, XML_TRANSFORMER_FACTORY_CACHE_SIZE, XML_VALIDATING, XPATHFACTORY_CACHE_SIZE, XUI_USER_SESSION_VALIDATION_ENABLED, ZERO_PAGE_LOGIN_ALLOW_MISSING_REFERER, ZERO_PAGE_LOGIN_ENABLED, ZERO_PAGE_LOGIN_WHITELIST
-
Fields inherited from interface com.sun.identity.password.ui.model.PWResetModel
ACTIVE, DEFAULT_RB, USER_SERVICE
-
-
Constructor Summary
Constructors Constructor Description PWResetQuestionModelImpl()Constructs a password reset question model object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SetgetDefaultQuestions(String realm)Returns default administrator configured questionsStringgetLocalizedStrForQuestion(String question)Gets the localized string for the questionintgetMaxNumQuestions(String realmName)Returns the maximum number of question that can be display in the reset password page.StringgetMissingAnswerMessage()Returns missing answer message .StringgetOKBtnLabel()Gets ok button labelStringgetPreviousBtnLabel()Gets previous button labelStringgetPWQuestionTitleString(String attrValue)Gets password reset question titleMapgetSecretQuestions(String uuid, String realm)Returns map of secret questions that is displayed in reset page.booleanisQuestionAvailable(String uuid, String realm)Returnstrueif the secret questions are available for a userbooleanisUserLockout(String uuid, String realm)Returnstrueif the user is not active or is lockout.booleanisUserQuestionEnabled(String orgDN)Returnstrueif user personal question/answer feature is enabledvoidresetPassword(String uuid, String realm, Map map)Resets the user password.voidsetNoQuestionsInfoMsg()Sets no questions configured message-
Methods inherited from class com.sun.identity.password.ui.model.PWResetModelImpl
debugError, debugError, debugMessage, debugMessage, debugWarning, debugWarning, getAttributeValue, getAttributeValues, getCopyRightText, getDefaultAttrValues, getErrorMessage, getErrorString, getErrorTitle, getFirstElement, getHTMLPageTitle, getInformationMessage, getJavaLogoLabel, getL10NAttributeName, getL10NAttributeName, getLocalizedString, getMailAttribute, getPasswordResetFailureLockoutCount, getPasswordResetFailureLockoutDuration, getPasswordResetFailureLockoutMultiplier, getPasswordResetFailureLockoutTime, getPasswordResetLockoutAttributeName, getPasswordResetLockoutAttributeValue, getPasswordResetLockoutNotification, getPasswordResetLockoutUserWarningCount, getPasswordResetMessage, getProductLabel, getPWResetServiceSchema, getRootSuffix, getSSOToken, getSunLogoLabel, getUserId, getUserLocaleContext, isAttributeSet, isError, isPasswordResetEnabled, isPasswordResetFailureLockoutEnabled, messageEnabled, populateLockoutValues, readPWResetProfile, sendEmailToUser, setUserDN, setUserLocale, warningEnabled, writeLog, writeLog
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sun.identity.password.ui.model.PWResetModel
debugError, debugError, debugMessage, debugMessage, debugWarning, debugWarning, getCopyRightText, getErrorMessage, getErrorString, getErrorTitle, getHTMLPageTitle, getInformationMessage, getJavaLogoLabel, getLocalizedString, getMailAttribute, getPasswordResetMessage, getProductLabel, getRootSuffix, getSunLogoLabel, getUserId, isError, isPasswordResetEnabled, messageEnabled, readPWResetProfile, setUserDN, setUserLocale, warningEnabled
-
-
-
-
Method Detail
-
resetPassword
public void resetPassword(String uuid, String realm, Map map) throws PWResetException
Resets the user password.- Specified by:
resetPasswordin interfacePWResetQuestionModel- Parameters:
uuid- User Id.realm- Realm name.map- map of user question and answer- Throws:
PWResetException- if unable to reset the password
-
getSecretQuestions
public Map getSecretQuestions(String uuid, String realm)
Returns map of secret questions that is displayed in reset page.- Specified by:
getSecretQuestionsin interfacePWResetQuestionModel- Parameters:
uuid- User Id.realm- Realm name- Returns:
- map of secret question.
-
getLocalizedStrForQuestion
public String getLocalizedStrForQuestion(String question)
Gets the localized string for the question- Specified by:
getLocalizedStrForQuestionin interfacePWResetQuestionModel- Parameters:
question- i8n key for the question- Returns:
- localized string for the question
-
getPWQuestionTitleString
public String getPWQuestionTitleString(String attrValue)
Gets password reset question title- Specified by:
getPWQuestionTitleStringin interfacePWResetQuestionModel- Parameters:
attrValue- user attribute value- Returns:
- password reset question title
-
getOKBtnLabel
public String getOKBtnLabel()
Gets ok button label- Specified by:
getOKBtnLabelin interfacePWResetQuestionModel- Returns:
- ok button label
-
getPreviousBtnLabel
public String getPreviousBtnLabel()
Gets previous button label- Specified by:
getPreviousBtnLabelin interfacePWResetQuestionModel- Returns:
- previous button label
-
setNoQuestionsInfoMsg
public void setNoQuestionsInfoMsg()
Sets no questions configured message- Specified by:
setNoQuestionsInfoMsgin interfacePWResetQuestionModel
-
getDefaultQuestions
protected Set getDefaultQuestions(String realm) throws SSOException, SMSException
Returns default administrator configured questions- Parameters:
realm- Realm name.- Returns:
- default questions
- Throws:
SSOExceptionSMSException
-
isUserQuestionEnabled
public boolean isUserQuestionEnabled(String orgDN)
Returnstrueif user personal question/answer feature is enabled- Parameters:
orgDN- DN of organization- Returns:
trueif the feature is enabled, false otherwise
-
getMissingAnswerMessage
public String getMissingAnswerMessage()
Returns missing answer message .- Specified by:
getMissingAnswerMessagein interfacePWResetQuestionModel- Returns:
- missing answer message.
-
isQuestionAvailable
public boolean isQuestionAvailable(String uuid, String realm)
Returnstrueif the secret questions are available for a user- Specified by:
isQuestionAvailablein interfacePWResetQuestionModel- Parameters:
uuid- User Id.realm- Realm name.- Returns:
trueif the questions are available, false otherwise
-
isUserLockout
public boolean isUserLockout(String uuid, String realm)
Returnstrueif the user is not active or is lockout.- Specified by:
isUserLockoutin interfacePWResetModel- Overrides:
isUserLockoutin classPWResetModelImpl- Parameters:
uuid- User Id.realm- Realm name.- Returns:
trueif the user is active and is not lockout.
-
getMaxNumQuestions
public int getMaxNumQuestions(String realmName)
Returns the maximum number of question that can be display in the reset password page.- Specified by:
getMaxNumQuestionsin interfacePWResetQuestionModel- Returns:
- maximum number of question which can be in reset password page
-
-