org.apache.myfaces.custom.passwordStrength
Class PasswordStrengthComponent

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.UIInput
                  extended by javax.faces.component.html.HtmlInputText
                      extended by org.apache.myfaces.custom.passwordStrength.AbstractPasswordStrengthComponent
                          extended by org.apache.myfaces.custom.passwordStrength.PasswordStrengthComponent
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder, org.apache.myfaces.component.AlignProperty

public class PasswordStrengthComponent
extends AbstractPasswordStrengthComponent


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String DEFAULT_RENDERER_TYPE
           
 
Fields inherited from class javax.faces.component.UIInput
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID
 
Constructor Summary
PasswordStrengthComponent()
           
 
Method Summary
 java.lang.String getAlign()
          HTML: Specifies the horizontal alignment of this element.
 java.lang.String getCustomSecurityExpression()
          This string determines the expression of the custom security rule of the password
 java.lang.String getFamily()
           
 java.lang.String getPenaltyRatio()
          This attribute determines the penalty ratio that will decrease the password Strength if the custom security expression is not met.
 java.lang.String getPreferredPasswordLength()
          The prefered length of the password
 java.lang.String getPrefixText()
          The prefix of the component message
 java.lang.String getShowDetails()
          This flag {true | false} determines whether to show the details (left characters).
 java.lang.String getStrengthIndicatorType()
          This flag determines the indicator type.
 java.lang.String getTextStrengthDescriptions()
          The text strength descriptions
 java.lang.String getUseCustomSecurity()
          This flag determines whether to user custom security rules instead of just depending on the password length.
 void restoreState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
           
 void setAlign(java.lang.String align)
           
 void setCustomSecurityExpression(java.lang.String customSecurityExpression)
           
 void setPenaltyRatio(java.lang.String penaltyRatio)
           
 void setPreferredPasswordLength(java.lang.String preferredPasswordLength)
           
 void setPrefixText(java.lang.String prefixText)
           
 void setShowDetails(java.lang.String showDetails)
           
 void setStrengthIndicatorType(java.lang.String strengthIndicatorType)
           
 void setTextStrengthDescriptions(java.lang.String textStrengthDescriptions)
           
 void setUseCustomSecurity(java.lang.String useCustomSecurity)
           
 
Methods inherited from class javax.faces.component.html.HtmlInputText
getAccesskey, getAlt, getDir, getLang, getMaxlength, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getSize, getStyle, getStyleClass, getTabindex, getTitle, isDisabled, isReadonly, setAccesskey, setAlt, setDir, setDisabled, setLang, setMaxlength, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setSize, setStyle, setStyleClass, setTabindex, setTitle
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, broadcast, compareValues, decode, getConvertedValue, getSubmittedValue, getValidator, getValidators, getValue, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, setValue, setValueChangeListener, updateModel, validate, validateValue
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, setConverter
 

Field Detail

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

DEFAULT_RENDERER_TYPE

public static final java.lang.String DEFAULT_RENDERER_TYPE
See Also:
Constant Field Values
Constructor Detail

PasswordStrengthComponent

public PasswordStrengthComponent()
Method Detail

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class javax.faces.component.UIInput

getShowDetails

public java.lang.String getShowDetails()
Description copied from class: AbstractPasswordStrengthComponent
This flag {true | false} determines whether to show the details (left characters). default is true

Specified by:
getShowDetails in class AbstractPasswordStrengthComponent

setShowDetails

public void setShowDetails(java.lang.String showDetails)

getStrengthIndicatorType

public java.lang.String getStrengthIndicatorType()
Description copied from class: AbstractPasswordStrengthComponent
This flag determines the indicator type. It can be {text or bar}. Default is text

Specified by:
getStrengthIndicatorType in class AbstractPasswordStrengthComponent

setStrengthIndicatorType

public void setStrengthIndicatorType(java.lang.String strengthIndicatorType)

getPreferredPasswordLength

public java.lang.String getPreferredPasswordLength()
Description copied from class: AbstractPasswordStrengthComponent
The prefered length of the password

Specified by:
getPreferredPasswordLength in class AbstractPasswordStrengthComponent

setPreferredPasswordLength

public void setPreferredPasswordLength(java.lang.String preferredPasswordLength)

getPrefixText

public java.lang.String getPrefixText()
Description copied from class: AbstractPasswordStrengthComponent
The prefix of the component message

Specified by:
getPrefixText in class AbstractPasswordStrengthComponent

setPrefixText

public void setPrefixText(java.lang.String prefixText)

getTextStrengthDescriptions

public java.lang.String getTextStrengthDescriptions()
Description copied from class: AbstractPasswordStrengthComponent
The text strength descriptions

Specified by:
getTextStrengthDescriptions in class AbstractPasswordStrengthComponent

setTextStrengthDescriptions

public void setTextStrengthDescriptions(java.lang.String textStrengthDescriptions)

getCustomSecurityExpression

public java.lang.String getCustomSecurityExpression()
Description copied from class: AbstractPasswordStrengthComponent
This string determines the expression of the custom security rule of the password

Note that the expression has the following format :

*******************************************************

S (Number) N (Number) A (Number)

*******************************************************

For example) A4N2S3A2 Means that the password will be as following :

*******************************************************

Note also that the useCustomSecurity should be set to true.

Specified by:
getCustomSecurityExpression in class AbstractPasswordStrengthComponent

setCustomSecurityExpression

public void setCustomSecurityExpression(java.lang.String customSecurityExpression)

getUseCustomSecurity

public java.lang.String getUseCustomSecurity()
Description copied from class: AbstractPasswordStrengthComponent
This flag determines whether to user custom security rules instead of just depending on the password length. The default is false.

Specified by:
getUseCustomSecurity in class AbstractPasswordStrengthComponent

setUseCustomSecurity

public void setUseCustomSecurity(java.lang.String useCustomSecurity)

getPenaltyRatio

public java.lang.String getPenaltyRatio()
Description copied from class: AbstractPasswordStrengthComponent
This attribute determines the penalty ratio that will decrease the password Strength if the custom security expression is not met. Note also that the useCustomSecurity should be set to true to apply this flag. Possible values from 0 to 100. Default value is 50.

Specified by:
getPenaltyRatio in class AbstractPasswordStrengthComponent

setPenaltyRatio

public void setPenaltyRatio(java.lang.String penaltyRatio)

getAlign

public java.lang.String getAlign()
Description copied from class: AbstractPasswordStrengthComponent
HTML: Specifies the horizontal alignment of this element. Deprecated in HTML 4.01.

Specified by:
getAlign in interface org.apache.myfaces.component.AlignProperty
Specified by:
getAlign in class AbstractPasswordStrengthComponent

setAlign

public void setAlign(java.lang.String align)

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.html.HtmlInputText

restoreState

public void restoreState(javax.faces.context.FacesContext facesContext,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.html.HtmlInputText


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.