Class PWResetUserValidationModelImpl
- java.lang.Object
-
- com.sun.identity.password.ui.model.PWResetModelImpl
-
- com.sun.identity.password.ui.model.PWResetUserValidationModelImpl
-
- All Implemented Interfaces:
PWResetModel,PWResetUserValidationModel
public class PWResetUserValidationModelImpl extends PWResetModelImpl implements PWResetUserValidationModel
PWResetUserValidationModelImpldefines a set of methods that are required by password reset user validation viewbean.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSTRING_FALSEName for string false value-
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.password.ui.model.PWResetModel
ACTIVE, DEFAULT_RB, PW_RESET_SERVICE, USER_SERVICE
-
-
Constructor Summary
Constructors Constructor Description PWResetUserValidationModelImpl()Constructs a password reset user validation model object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLocalizedStrForAttr(String attrName)Returns the localized string for attribute name in the user service.StringgetMissingUserAttrMessage(String userAttrName)Returns missing user attribute message.StringgetNextBtnLabel()Gets next button labelStringgetRealm(String realm)Returns realm name.StringgetUserAttr(String orgDN)Returns user attribute configured in password reset service.StringgetUserRealm()Realm for the user resetting password.StringgetUserValidateTitleString()Gets user validation titlebooleanisUserActive(String realm)Returns true if the user is active and account is not expired.booleanisUserAttrValueValid(String orgDN, String userAttrValue)Returnstrueif the entered user attr value is comprised of safe characters.booleanisUserExists(String userAttrValue, String userAttrName, String realm)Returnstrueif the user exists.booleanisValidRealm()Returnstrueif the realm is valid.voidsetRealmFlag(boolean value)Sets the organization DN flagvoidsetValidRealm(String realm)Sets the valid realm flag.-
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, isUserLockout, 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, isUserLockout, messageEnabled, readPWResetProfile, setUserDN, setUserLocale, warningEnabled
-
-
-
-
Field Detail
-
STRING_FALSE
public static final String STRING_FALSE
Name for string false value- See Also:
- Constant Field Values
-
-
Method Detail
-
getUserAttr
public String getUserAttr(String orgDN)
Returns user attribute configured in password reset service.- Specified by:
getUserAttrin interfacePWResetUserValidationModel- Parameters:
orgDN- Realm name.- Returns:
- user attribute configured in password reset service.
-
isUserExists
public boolean isUserExists(String userAttrValue, String userAttrName, String realm)
Returnstrueif the user exists. If more than one users is found then it will return false and view bean will display an error message.- Specified by:
isUserExistsin interfacePWResetUserValidationModel- Parameters:
userAttrValue- User attribute value to search for.userAttrName- User attribute name to search for.realm- Base realm- Returns:
trueif user exists.
-
getUserValidateTitleString
public String getUserValidateTitleString()
Gets user validation title- Specified by:
getUserValidateTitleStringin interfacePWResetUserValidationModel- Returns:
- user validation title
-
getNextBtnLabel
public String getNextBtnLabel()
Gets next button label- Specified by:
getNextBtnLabelin interfacePWResetUserValidationModel- Returns:
- next button label
-
setRealmFlag
public void setRealmFlag(boolean value)
Sets the organization DN flag- Specified by:
setRealmFlagin interfacePWResetUserValidationModel- Parameters:
value- organization flag value either true or false
-
isValidRealm
public boolean isValidRealm()
Returnstrueif the realm is valid.- Specified by:
isValidRealmin interfacePWResetUserValidationModel- Returns:
trueif the realm is valid.
-
getLocalizedStrForAttr
public String getLocalizedStrForAttr(String attrName)
Returns the localized string for attribute name in the user service.- Specified by:
getLocalizedStrForAttrin interfacePWResetUserValidationModel- Parameters:
attrName- attribute name- Returns:
- localized string for the attribute
-
getMissingUserAttrMessage
public String getMissingUserAttrMessage(String userAttrName)
Returns missing user attribute message.- Specified by:
getMissingUserAttrMessagein interfacePWResetUserValidationModel- Parameters:
userAttrName- user attribute name.- Returns:
- missing user attribute message.
-
isUserActive
public boolean isUserActive(String realm)
Returns true if the user is active and account is not expired. This method will use the user DN stored in the model to determine if the user's account is active or has expired.- Specified by:
isUserActivein interfacePWResetUserValidationModel- Parameters:
realm- organization DN- Returns:
- true if user is active and account is not expired.
-
getRealm
public String getRealm(String realm) throws PWResetException
Returns realm name. If the given realm name is null or blank. then root realm will be returned.- Specified by:
getRealmin interfacePWResetUserValidationModel- Parameters:
realm- Realm name.- Returns:
- Realm Name
- Throws:
PWResetException- if unable to get realm or realm does not exists
-
setValidRealm
public void setValidRealm(String realm)
Sets the valid realm flag.- Specified by:
setValidRealmin interfacePWResetUserValidationModel- Parameters:
realm- Realm Name.
-
getUserRealm
public String getUserRealm()
Realm for the user resetting password.- Specified by:
getUserRealmin interfacePWResetUserValidationModel- Returns:
- the realm for the user resetting password.
-
isUserAttrValueValid
public boolean isUserAttrValueValid(String orgDN, String userAttrValue)
Returnstrueif the entered user attr value is comprised of safe characters. It will return false and view bean will display an error message if it contains invalid characters- Specified by:
isUserAttrValueValidin interfacePWResetUserValidationModel- Parameters:
orgDN- organization DN.userAttrValue- User enter data for user validation.- Returns:
trueif entered data is valid.
-
-