org.apache.myfaces.custom.passwordStrength
Class AbstractPasswordStrengthComponent

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
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder, org.apache.myfaces.component.AlignProperty
Direct Known Subclasses:
PasswordStrengthComponent

public abstract class AbstractPasswordStrengthComponent
extends javax.faces.component.html.HtmlInputText
implements org.apache.myfaces.component.AlignProperty

The passwordStrength component is needed by the web sites which ask the user to enter a powerful password for the purpose of the registration stuff.

The component enables its user to know the strength of the password while (he/she) types it before even submit the form to the server [please see the screenshots].

The component enables its user to define his custom security policy for his password in an easy manner.

The component also have 2 types of presenting the password strength. Till now the strength can be represented as text or progressbar.


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
AbstractPasswordStrengthComponent()
           
 
Method Summary
abstract  java.lang.String getAlign()
          HTML: Specifies the horizontal alignment of this element.
abstract  java.lang.String getCustomSecurityExpression()
          This string determines the expression of the custom security rule of the password
abstract  java.lang.String getPenaltyRatio()
          This attribute determines the penalty ratio that will decrease the password Strength if the custom security expression is not met.
abstract  java.lang.String getPreferredPasswordLength()
          The prefered length of the password
abstract  java.lang.String getPrefixText()
          The prefix of the component message
abstract  java.lang.String getShowDetails()
          This flag {true | false} determines whether to show the details (left characters).
abstract  java.lang.String getStrengthIndicatorType()
          This flag determines the indicator type.
abstract  java.lang.String getTextStrengthDescriptions()
          The text strength descriptions
abstract  java.lang.String getUseCustomSecurity()
          This flag determines whether to user custom security rules instead of just depending on the password length.
 
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, restoreState, saveState, 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, getFamily, 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_TYPE

public static java.lang.String COMPONENT_TYPE

DEFAULT_RENDERER_TYPE

public static java.lang.String DEFAULT_RENDERER_TYPE

COMPONENT_FAMILY

public static java.lang.String COMPONENT_FAMILY
Constructor Detail

AbstractPasswordStrengthComponent

public AbstractPasswordStrengthComponent()
Method Detail

getShowDetails

public abstract java.lang.String getShowDetails()
This flag {true | false} determines whether to show the details (left characters). default is true


getStrengthIndicatorType

public abstract java.lang.String getStrengthIndicatorType()
This flag determines the indicator type. It can be {text or bar}. Default is text


getPreferredPasswordLength

public abstract java.lang.String getPreferredPasswordLength()
The prefered length of the password


getPrefixText

public abstract java.lang.String getPrefixText()
The prefix of the component message


getTextStrengthDescriptions

public abstract java.lang.String getTextStrengthDescriptions()
The text strength descriptions


getCustomSecurityExpression

public abstract java.lang.String getCustomSecurityExpression()
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.


getUseCustomSecurity

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


getPenaltyRatio

public abstract java.lang.String getPenaltyRatio()
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.


getAlign

public abstract java.lang.String getAlign()
HTML: Specifies the horizontal alignment of this element. Deprecated in HTML 4.01.

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


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