Package overit.geocall.basic.ui.control
Class Captcha
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.control.Captcha
- All Implemented Interfaces:
Serializable,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,Arrangeable,Badgeable,Identified,Tool,overit.geocall.ux.configurability.UIConfigurable,overit.geocall.ux.edm.ModelConfigurable
This class implements the graphic user interface element that is used to display the captcha test,
where the user is asked to write down the letters or numbers in a sequence, which appears distorted
or blurred on the screen.
The use of this component is suited to those situations in which there is a need to ensure that the data entered in the form have been inserted by a real person, thus preventing the automatic compilation by any bots. Eventually, the user has the possibility to generate a new verification code by clicking on the current image.
The verification of the captcha can be done via code, following the submit of the form, using the
The use of this component is suited to those situations in which there is a need to ensure that the data entered in the form have been inserted by a real person, thus preventing the automatic compilation by any bots. Eventually, the user has the possibility to generate a new verification code by clicking on the current image.
The verification of the captcha can be done via code, following the submit of the form, using the
validate(java.lang.String)
method.- See Also:
- GCApi:
- component
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class overit.geocall.ui.Component
Component.Configurable, Component.ConfigurableAttribute, Component.ConfigurableAttributes, Component.FilterCriteria, Component.Registry -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.octo.captcha.image.ImageCaptchaprotected Captcha.Rawprotected StringFields inherited from class overit.geocall.ui.Control
_blank, _cleaner, _dblink, _enabled, _ro, _title, altEventIconsList, altIcon, ariaDescription, ariaLabel, badge, badgeformat, FILTER_PREFIXES, LABEL_ATTRIBUTE, LABEL_IN_LINE_ATTRIBUTE, STATE_BLANK, STATE_NORMAL, STATE_RO, STATE_ROBLANKFields inherited from class overit.geocall.ui.Component
_basic, _childrenContainers, _currentId, _gridalign, _gridcols, _gridrows, _gridvalign, _iconElement, _id, _keylabel, _label, _layoutName, _name, _parentContainer, _registryName, _shortcut, _tabindex, _transformations, _valuesContainer, aliasField, BR, configHidden, configuredLabel, configuredLabelInLine, defaultHidden, ELEMENT_BR, ELEMENT_NULL, entityContainer, entityName, extendedField, fullHeight, important, labelInLine, layoutLabel, PIXEL_IMG, safeInlineService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidajaxQuery(HttpServletRequest request, HttpServletResponse response) Method that must be extended to implements the Ajax interaction request / response logic for the Componentprotected voidorg.apache.ecs.ElementgetContentHtml(Object generationhandle, EntitySet es) Returns the html code that represents the active part of the component, i.e. the field and the validation scriptsorg.apache.ecs.ElementgetDescriptionHtml(Object generationhandle, EntitySet es) Returns the html code that represents the component description i.e. the formatted label of the fieldReturns the object to generate when the Arrangeable element is composed by more than one elementorg.apache.ecs.ElementgetHiddenHtml(Object generationhandle, EntitySet es) Returns the hidden but active html part of an hidden componentorg.apache.ecs.ElementAbstract method that must be extended and returns the html code of the Componentprotected LocalevoidSets the algorithm used to generate the captcha imagevoidsetup()Setup the ComponentChecks if the value corresponds to the one requested by the CaptchaMethods inherited from class overit.geocall.ui.Control
avoidNull, clean, getBadgeFormat, getBadgeValue, getBLANK, getCleaner, getConfigurableProperties, getDAValues, getDBLINK, getKEYLABEL, getLABEL, getRO, getState, getTITLE, getValues, getWM, isEnabled, isEnabledBasedOnFunction, isFunctionEnabled, isImportant, isRoBasedOnFunction, nameWithNoFilterPrefix, setALTEVENTICON, setALTICON, setARIADESCRIPTION, setARIALABEL, setBADGEFORMAT, setBADGEVALUE, setBLANK, setCLEANER, setConfiguredProperty, setDBLINK, setENABLED, setFUNCTION, setModelProperties, setRO, setTitle, setTITLEMethods inherited from class overit.geocall.ui.Component
adapt, appendAttribute, buildDisplayScript, buildSetupScript, calcKeyLabel, calcLabel, calcShortcut, canBeConfigured, changed, clearConfiguredProperties, componentIterator, componentSize, connect, containerIterator, createAjaxFrame, deprecate, fillSetupScript, generateFlexableFullHeightContainer, generateId, getBASIC, getBoolean, getBoolean, getChildrenComponents, getChildrenContainers, getDefaultLabel, getDefaultLayoutLabel, getEntityContainer, getEntityName, getFullHeight, getGridAlign, getGridCols, getGridRows, getGridVAlign, getHtmlLabel, getHtmlLabel, getIcon, getId, getIdentity, getint, getLayoutLabel, getLayoutName, getNAME, getParentComponent, getParentContainer, getPublishedChildrenList, getRegistryName, getSHORTCUT, getTabIndex, getTeacher, getValuesContainer, getWindow, initChilds, isActivable, isActive, isAliasField, isConfigHidden, isDefaultHidden, isExtendedField, isLabelInLine, onInit, setActivable, setActive, setAliasField, setBASIC, setConfigHidden, setDEFAULTHIDDEN, setEntityName, setExtendedField, setFULLHEIGHT, setGRIDALIGN, setGRIDCOLS, setGRIDROWS, setGRIDVALIGN, setICON, setIdentity, setIMPORTANT, setLabel, setLABEL, setLABELINLINE, setLAYOUTLABEL, setLAYOUTNAME, setNAME, setREGISTRYNAME, setTooltip, setValuesContainer, stringForJs, tabIndexerMethods inherited from class overit.geocall.platform.ui.UINode
addChild, addChildText, getChildren, getNodeId, getParent, getRoot, getSchema, setNodeId, setParent, setSchemaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.ui.Badgeable
badgeFormat, makeBadgedIcon
-
Field Details
-
_captcha
protected com.octo.captcha.image.ImageCaptcha _captcha -
_raw
-
_type
-
-
Constructor Details
-
Captcha
public Captcha()
-
-
Method Details
-
setTYPE
Sets the algorithm used to generate the captcha image- Parameters:
s- Accepted values are: "Bafflelist", "Deformedbafflelist", "Basic", "Doublerandomlist", "Nonlineartext", "Simplelist"
-
setup
public void setup()Description copied from class:ComponentSetup the Component -
createCaptcha
protected void createCaptcha() -
getLocale
-
validate
Checks if the value corresponds to the one requested by the Captcha- Parameters:
text- The text inserted by the user- Returns:
trueif the value corresponds and the validation is passed,falseotherwise
-
getHiddenHtml
Description copied from interface:ArrangeableReturns the hidden but active html part of an hidden component- Specified by:
getHiddenHtmlin interfaceArrangeable- Parameters:
generationhandle- the unique generatin handlees- the page entity set- Returns:
- The html code of the hidden part of the component
-
getHtml
Description copied from class:ComponentAbstract method that must be extended and returns the html code of the Component -
getGenerationHandle
Description copied from interface:ArrangeableReturns the object to generate when the Arrangeable element is composed by more than one element- Specified by:
getGenerationHandlein interfaceArrangeable- Returns:
- The Object to generate
-
getDescriptionHtml
Description copied from interface:ArrangeableReturns the html code that represents the component description i.e. the formatted label of the field- Specified by:
getDescriptionHtmlin interfaceArrangeable- Parameters:
generationhandle- the unique generatin handlees- the page entity set- Returns:
- The html code of the label of the field
-
getContentHtml
Description copied from interface:ArrangeableReturns the html code that represents the active part of the component, i.e. the field and the validation scripts- Specified by:
getContentHtmlin interfaceArrangeable- Parameters:
generationhandle- the unique generatin handlees- the page entity set- Returns:
- The html code of the component
-
ajaxQuery
Description copied from class:ComponentMethod that must be extended to implements the Ajax interaction request / response logic for the Component- Overrides:
ajaxQueryin classComponent- Parameters:
request-HttpServletRequestresponse-HttpServletResponse
-