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:
java.util.EventListener, javax.faces.component.behavior.ClientBehaviorHolder, javax.faces.component.EditableValueHolder, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, org.apache.myfaces.component.AlignProperty

@JSFComponent(name="s:passwordStrength",
              clazz="org.apache.myfaces.custom.passwordStrength.PasswordStrengthComponent",
              tagClass="org.apache.myfaces.custom.passwordStrength.PasswordStrengthTag")
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.


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.faces.component.html.HtmlInputText
javax.faces.component.html.HtmlInputText.PropertyKeys
 
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, UPDATE_MESSAGE_ID, VALIDATE_EMPTY_FIELDS_PARAM_NAME
 
Fields inherited from class javax.faces.component.UIComponent
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY
 
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, getAutocomplete, getDefaultEventName, getDir, getEventNames, getFamily, getLabel, 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, setAutocomplete, setDir, setDisabled, setLabel, 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, clearInitialState, compareValues, decode, getConvertedValue, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValue, getValueChangeListener, getValueChangeListeners, isEmpty, isImmediate, isLocalValueSet, isRequired, isValid, markInitialState, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, resetValue, restoreState, saveState, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate, validateValue
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, visitTree
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
 
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.behavior.ClientBehaviorHolder
addClientBehavior, getClientBehaviors
 
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

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


getStrengthIndicatorType

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


getPreferredPasswordLength

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


getPrefixText

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


getTextStrengthDescriptions

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


getCustomSecurityExpression

@JSFProperty
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

@JSFProperty
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

@JSFProperty
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

@JSFProperty
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.