org.apache.myfaces.custom.captcha
Class AbstractCAPTCHAComponent

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.apache.myfaces.custom.captcha.AbstractCAPTCHAComponent
All Implemented Interfaces:
EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder
Direct Known Subclasses:
CAPTCHAComponent

public abstract class AbstractCAPTCHAComponent
extends javax.faces.component.UIComponentBase

Since:
1.1.7
Author:
Hazem Saleh

Field Summary
static String ATTRIBUTE_CAPTCHA_SESSION_KEY_NAME
           
static String ATTRIBUTE_IMAGE_HEIGHT
           
static String ATTRIBUTE_IMAGE_WIDTH
           
static String COMPONENT_FAMILY
           
static String COMPONENT_TYPE
           
static String DEFAULT_RENDERER_TYPE
           
 
Fields inherited from class javax.faces.component.UIComponent
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
 
Constructor Summary
AbstractCAPTCHAComponent()
           
 
Method Summary
abstract  String getCaptchaSessionKeyName()
          Determines the CAPTCHA session key name.
 String getCaptchaSessionValue()
          Return the value stored in session map related to captchaSessionKeyName
abstract  String getImageHeight()
          Integer to indicate the CAPTCHA height.
abstract  String getImageWidth()
          Integer to indicate the CAPTCHA width.
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, visitTree
 
Methods inherited from class javax.faces.component.UIComponent
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getFamily, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_TYPE

public static String COMPONENT_TYPE

COMPONENT_FAMILY

public static String COMPONENT_FAMILY

DEFAULT_RENDERER_TYPE

public static String DEFAULT_RENDERER_TYPE

ATTRIBUTE_CAPTCHA_SESSION_KEY_NAME

public static final String ATTRIBUTE_CAPTCHA_SESSION_KEY_NAME
See Also:
Constant Field Values

ATTRIBUTE_IMAGE_WIDTH

public static final String ATTRIBUTE_IMAGE_WIDTH
See Also:
Constant Field Values

ATTRIBUTE_IMAGE_HEIGHT

public static final String ATTRIBUTE_IMAGE_HEIGHT
See Also:
Constant Field Values
Constructor Detail

AbstractCAPTCHAComponent

public AbstractCAPTCHAComponent()
Method Detail

getCaptchaSessionKeyName

public abstract String getCaptchaSessionKeyName()
Determines the CAPTCHA session key name. If org.apache.myfaces.tomahawk.PREFIX_CAPTCHA_SESSION_KEY is set to true (default), a prefix defined by the component is added to this key name.

Returns:

getImageWidth

public abstract String getImageWidth()
Integer to indicate the CAPTCHA width. default is 290.


getImageHeight

public abstract String getImageHeight()
Integer to indicate the CAPTCHA height. default is 81.


getCaptchaSessionValue

public String getCaptchaSessionValue()
Return the value stored in session map related to captchaSessionKeyName

Returns:


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