public class PWResetModelImpl extends Object implements PWResetModel
PWResetModelImpl
defines the basic and commonly used
methods used by view beans.Modifier and Type | Field and Description |
---|---|
static Debug |
debug
Debug object
|
protected String |
errorMsg
Error message stored in the model
|
protected String |
informationMsg
Info message stored in the model
|
protected ISLocaleContext |
localeContext |
protected PWResetAdminLog |
logger
Logger object
|
protected String |
passwordResetMsg
Reset password message stored in the model
|
String |
pwResetLockoutAttrName |
String |
pwResetLockoutAttrValue |
protected ResourceBundle |
resBundle
Resource bundle object
|
protected SSOToken |
ssoToken
SSO token object
|
static String |
STRING_TRUE
Name for string true value
|
protected String |
userId
User distinguished name
|
ACTIVE, DEFAULT_RB, PW_RESET_SERVICE, USER_SERVICE
Constructor and Description |
---|
PWResetModelImpl()
Creates a base model for password reset.
|
Modifier and Type | Method and Description |
---|---|
void |
debugError(String message)
Prints a message to the console debug file.
|
void |
debugError(String message,
Exception e)
Prints a message to the console debug file.
|
void |
debugMessage(String message)
Prints a message to the console debug file.
|
void |
debugMessage(String message,
Exception e)
Prints a message to the console debug file.
|
void |
debugWarning(String message)
Prints a message to the console debug file.
|
void |
debugWarning(String message,
Exception e)
Prints a message to the console debug file.
|
protected String |
getAttributeValue(String realm,
String attrName) |
protected Set |
getAttributeValues(String realm,
String attrName) |
String |
getCopyRightText()
Returns copyright text.
|
protected Set |
getDefaultAttrValues(ServiceSchema schema,
String attrName) |
String |
getErrorMessage()
Returns error message.
|
String |
getErrorString(Exception ex)
Returns a localized error message from an exception.
|
String |
getErrorTitle()
Returns title for error message.
|
static String |
getFirstElement(Set set)
Returns the first
String element from the given set. |
String |
getHTMLPageTitle()
Returns HTML page title
|
String |
getInformationMessage()
Returns information message
|
String |
getJavaLogoLabel()
Returns label for Java logo.
|
protected String |
getL10NAttributeName(ServiceSchemaManager mgr,
String key)
Returns localized string of an attribute in a service
|
String |
getL10NAttributeName(String serviceName,
String key)
Returns localized string of an attribute in a service.
|
String |
getLocalizedString(String key)
Returns localized string.
|
String |
getMailAttribute(String realm)
Returns the name of the mail attribute.
|
int |
getPasswordResetFailureLockoutCount()
Returns failure lockout count for password reset.
|
long |
getPasswordResetFailureLockoutDuration()
Returns lockout duration for password reset.
|
int |
getPasswordResetFailureLockoutMultiplier()
Returns lockout multiplier for password reset.
|
long |
getPasswordResetFailureLockoutTime()
Returns failure lockout time interval for password reset.
|
String |
getPasswordResetLockoutAttributeName()
Returns password reset lockout attribute name.
|
String |
getPasswordResetLockoutAttributeValue()
Returns password reset lockout attribute value.
|
String |
getPasswordResetLockoutNotification()
Returns lockout notification email address for password reset.
|
int |
getPasswordResetLockoutUserWarningCount()
Returns lockout warn user count for password reset.
|
String |
getPasswordResetMessage()
Returns password reset message.
|
String |
getProductLabel()
Returns label for product logo.
|
protected ServiceSchema |
getPWResetServiceSchema()
Returns service schema.
|
String |
getRootSuffix()
Returns root suffix.
|
protected SSOToken |
getSSOToken() |
String |
getSunLogoLabel()
Returns label for SUN logo.
|
String |
getUserId()
Returns the user distinguished name.
|
ISLocaleContext |
getUserLocaleContext()
Returns locale of user.
|
protected boolean |
isAttributeSet(String realm,
String attrName) |
boolean |
isError()
Returns
true if there is an error while processing request. |
boolean |
isPasswordResetEnabled()
Returns
true if the password service is available. |
boolean |
isPasswordResetFailureLockoutEnabled()
Returns true if the password reset lockout feature is enabled.
|
boolean |
isUserLockout(String userDN,
String orgDN)
Returns true if the user is locked out from resetting password.
|
boolean |
messageEnabled()
Returns
true if message debugging is enabled. |
void |
populateLockoutValues(String orgDN)
Populates the password reset lockout attributes for a given
organization distinguished name and stored them in the model.
|
void |
readPWResetProfile(String realm)
Sets the password reset enabled flag depending
what is set in the password service for a given realm.
|
void |
sendEmailToUser(String from,
String[] to,
String subject,
String msg,
String charset)
Sents email to the user(s).
|
void |
setUserDN(String value)
Set the user distinguished name.
|
void |
setUserLocale(String localeString)
Sets the user locale.
|
boolean |
warningEnabled()
true if warning message is enabled. |
void |
writeLog(String msgId,
String userDN)
Writes to the log file formatted message.
|
void |
writeLog(String msgId,
String msg,
String userDN)
Writes to the log file formatted message.
|
public static final String STRING_TRUE
public static Debug debug
protected SSOToken ssoToken
protected ResourceBundle resBundle
protected String userId
protected String errorMsg
protected String informationMsg
protected String passwordResetMsg
protected PWResetAdminLog logger
protected ISLocaleContext localeContext
public String pwResetLockoutAttrName
public String pwResetLockoutAttrValue
public PWResetModelImpl()
public String getLocalizedString(String key)
getLocalizedString
in interface PWResetModel
key
- resource string key.public ISLocaleContext getUserLocaleContext()
public void debugError(String message)
debugError
in interface PWResetModel
message
- to be sent to the debug file.public void debugError(String message, Exception e)
debugError
in interface PWResetModel
message
- to be printed. If message is null it is ignored.e
- printStackTrace
will be invoked to print
the stack trace.public boolean warningEnabled()
true
if warning message is enabled.warningEnabled
in interface PWResetModel
true
if warning message is enabled.public void debugWarning(String message)
debugWarning
in interface PWResetModel
message
- to be printed. If message is null it is ignored.public void debugWarning(String message, Exception e)
debugWarning
in interface PWResetModel
message
- to be printed. If message is null it is ignored.e
- printStackTrace
will be invoked to print
the stack trace.public boolean messageEnabled()
true
if message debugging is enabled.messageEnabled
in interface PWResetModel
true
if message debugging is enabled.com.iplanet.am.util.Debug#messageEnabled
public void debugMessage(String message)
debugMessage
in interface PWResetModel
message
- to be printed. If message is null it is ignored.public void debugMessage(String message, Exception e)
debugMessage
in interface PWResetModel
message
- to be printed. If message is null it is ignored.e
- printStackTrace
will be invoked to print
the stack trace.public String getHTMLPageTitle()
getHTMLPageTitle
in interface PWResetModel
public boolean isPasswordResetEnabled()
true
if the password service is available.isPasswordResetEnabled
in interface PWResetModel
true
if the password service is available.public String getUserId()
getUserId
in interface PWResetModel
public void setUserDN(String value)
setUserDN
in interface PWResetModel
value
- user distinguished name.public String getErrorTitle()
getErrorTitle
in interface PWResetModel
public String getErrorMessage()
getErrorMessage
in interface PWResetModel
public boolean isError()
true
if there is an error while processing request.isError
in interface PWResetModel
true
if there is an error while processing request.public String getCopyRightText()
getCopyRightText
in interface PWResetModel
public String getPasswordResetMessage()
getPasswordResetMessage
in interface PWResetModel
public String getErrorString(Exception ex)
AMException
the error code and any possible
arguments will be extracted from the exception and the message will be
generated from the code and arguments. All other exception types will
return the message from Exception.getMessage
.getErrorString
in interface PWResetModel
ex
- exceptionpublic String getRootSuffix()
getRootSuffix
in interface PWResetModel
protected ServiceSchema getPWResetServiceSchema() throws SSOException, SMSException
SSOException
SMSException
protected String getL10NAttributeName(ServiceSchemaManager mgr, String key)
mgr
- Service schema manager.key
- localization key of the attribute.public String getL10NAttributeName(String serviceName, String key)
serviceName
- Name of service.key
- Localization key of the attribute.public void readPWResetProfile(String realm)
readPWResetProfile
in interface PWResetModel
realm
- Realmprotected boolean isAttributeSet(String realm, String attrName) throws SSOException, SMSException
SSOException
SMSException
protected Set getDefaultAttrValues(ServiceSchema schema, String attrName)
protected String getAttributeValue(String realm, String attrName) throws SSOException, SMSException
SSOException
SMSException
protected Set getAttributeValues(String realm, String attrName) throws SSOException, SMSException
SSOException
SMSException
public String getInformationMessage()
getInformationMessage
in interface PWResetModel
public static String getFirstElement(Set set)
String
element from the given set.
If the set is empty, or null, an empty string will be returned.set
- where element residespublic void writeLog(String msgId, String userDN)
msgId
- Id of the message to be writtenuserDN
- user distinguished namepublic void writeLog(String msgId, String msg, String userDN)
msgId
- Id of the message to be writtenmsg
- additional message to be writtenuserDN
- user distinguished namepublic boolean isPasswordResetFailureLockoutEnabled()
public long getPasswordResetFailureLockoutDuration()
public int getPasswordResetFailureLockoutMultiplier()
public long getPasswordResetFailureLockoutTime()
public int getPasswordResetFailureLockoutCount()
public String getPasswordResetLockoutNotification()
public int getPasswordResetLockoutUserWarningCount()
public void populateLockoutValues(String orgDN)
orgDN
- organization distinguished namepublic boolean isUserLockout(String userDN, String orgDN)
isUserLockout
in interface PWResetModel
userDN
- user distinguished nameorgDN
- organization distinguished namepublic void sendEmailToUser(String from, String[] to, String subject, String msg, String charset)
from
- sender email addressto
- user to which email is send tosubject
- email subjectmsg
- email messagecharset
- charset valuepublic String getPasswordResetLockoutAttributeName()
public String getPasswordResetLockoutAttributeValue()
public String getSunLogoLabel()
getSunLogoLabel
in interface PWResetModel
public String getProductLabel()
getProductLabel
in interface PWResetModel
public String getJavaLogoLabel()
getJavaLogoLabel
in interface PWResetModel
protected SSOToken getSSOToken()
public void setUserLocale(String localeString)
setUserLocale
in interface PWResetModel
localeString
- localeString.public String getMailAttribute(String realm)
getMailAttribute
in interface PWResetModel
realm
- The realm the user belongs to.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.