fr.paris.lutece.plugins.captcha.modules.jcaptcha.service.image
Class LuteceGimpyImageFactory

java.lang.Object
  extended by com.octo.captcha.image.ImageCaptchaFactory
      extended by fr.paris.lutece.plugins.captcha.modules.jcaptcha.service.image.LuteceGimpyImageFactory
All Implemented Interfaces:
com.octo.captcha.CaptchaFactory

public class LuteceGimpyImageFactory
extends com.octo.captcha.image.ImageCaptchaFactory

Factories for Gimpies. Built on top of WordGenerator and WordToImage. It uses thoses interfaces to build an ImageCaptha answered by a String and for which the question is : Spell the word.


Field Summary
static String BUNDLE_QUESTION_KEY
           
 
Constructor Summary
LuteceGimpyImageFactory(com.octo.captcha.component.word.wordgenerator.WordGenerator generator, com.octo.captcha.component.image.wordtoimage.WordToImage word2image)
           
 
Method Summary
 com.octo.captcha.image.ImageCaptcha getImageCaptcha()
          gimpies are ImageCaptcha
 com.octo.captcha.image.ImageCaptcha getImageCaptcha(Locale locale)
          gimpies are ImageCaptcha
protected  Integer getRandomLength()
           
 com.octo.captcha.component.word.wordgenerator.WordGenerator getWordGenerator()
           
 com.octo.captcha.component.image.wordtoimage.WordToImage getWordToImage()
           
 
Methods inherited from class com.octo.captcha.image.ImageCaptchaFactory
getCaptcha, getCaptcha
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUNDLE_QUESTION_KEY

public static final String BUNDLE_QUESTION_KEY
Constructor Detail

LuteceGimpyImageFactory

public LuteceGimpyImageFactory(com.octo.captcha.component.word.wordgenerator.WordGenerator generator,
                               com.octo.captcha.component.image.wordtoimage.WordToImage word2image)
Parameters:
generator - the generator
word2image - the word to image
Method Detail

getImageCaptcha

public com.octo.captcha.image.ImageCaptcha getImageCaptcha()
gimpies are ImageCaptcha

Specified by:
getImageCaptcha in class com.octo.captcha.image.ImageCaptchaFactory
Returns:
the image captcha with default locale

getWordToImage

public com.octo.captcha.component.image.wordtoimage.WordToImage getWordToImage()
Returns:
the word to the image

getWordGenerator

public com.octo.captcha.component.word.wordgenerator.WordGenerator getWordGenerator()
Returns:
the word generator

getImageCaptcha

public com.octo.captcha.image.ImageCaptcha getImageCaptcha(Locale locale)
gimpies are ImageCaptcha

Specified by:
getImageCaptcha in class com.octo.captcha.image.ImageCaptchaFactory
Parameters:
locale - the locale
Returns:
a pixCaptcha with the question :"spell the word"

getRandomLength

protected Integer getRandomLength()
Returns:
a random length for the word image


Copyright © 2014 Mairie de Paris. All Rights Reserved.