fr.paris.lutece.plugins.captcha.modules.jcaptcha.service.sound
Class LuteceGimpySoundFactory

java.lang.Object
  extended by com.octo.captcha.sound.SoundCaptchaFactory
      extended by fr.paris.lutece.plugins.captcha.modules.jcaptcha.service.sound.LuteceGimpySoundFactory
All Implemented Interfaces:
com.octo.captcha.CaptchaFactory

public class LuteceGimpySoundFactory
extends com.octo.captcha.sound.SoundCaptchaFactory

Author:
lutecer

Field Summary
static String BUNDLE_QUESTION_KEY
           
static String MESSAGE_INVALID_EXCEPTION
          The bundle question key for CaptchaQuestionHelper
 
Constructor Summary
LuteceGimpySoundFactory(com.octo.captcha.component.word.wordgenerator.WordGenerator thewordGenerator, com.octo.captcha.component.sound.wordtosound.WordToSound theword2Sound)
          Construct a GimpySoundFactory from a word generator component and a wordtosound component
LuteceGimpySoundFactory(com.octo.captcha.component.word.wordgenerator.WordGenerator wordGenerator, com.octo.captcha.component.sound.wordtosound.WordToSound word2Sound, com.octo.captcha.component.word.worddecorator.WordDecorator wordDecorator)
          Construct a GimpySoundFactory from a word generator component and a wordtosound component
 
Method Summary
protected  String getQuestion(Locale locale)
           
protected  Integer getRandomLength()
           
 com.octo.captcha.sound.SoundCaptcha getSoundCaptcha()
           
 com.octo.captcha.sound.SoundCaptcha getSoundCaptcha(Locale locale)
           
 com.octo.captcha.component.word.wordgenerator.WordGenerator getWordGenerator()
           
 com.octo.captcha.component.sound.wordtosound.WordToSound getWordToSound()
           
 
Methods inherited from class com.octo.captcha.sound.SoundCaptchaFactory
getCaptcha, getCaptcha
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_INVALID_EXCEPTION

public static final String MESSAGE_INVALID_EXCEPTION
The bundle question key for CaptchaQuestionHelper

See Also:
Constant Field Values

BUNDLE_QUESTION_KEY

public static final String BUNDLE_QUESTION_KEY
Constructor Detail

LuteceGimpySoundFactory

public LuteceGimpySoundFactory(com.octo.captcha.component.word.wordgenerator.WordGenerator thewordGenerator,
                               com.octo.captcha.component.sound.wordtosound.WordToSound theword2Sound)
Construct a GimpySoundFactory from a word generator component and a wordtosound component

Parameters:
thewordGenerator - component
theword2Sound - component

LuteceGimpySoundFactory

public LuteceGimpySoundFactory(com.octo.captcha.component.word.wordgenerator.WordGenerator wordGenerator,
                               com.octo.captcha.component.sound.wordtosound.WordToSound word2Sound,
                               com.octo.captcha.component.word.worddecorator.WordDecorator wordDecorator)
Construct a GimpySoundFactory from a word generator component and a wordtosound component

Parameters:
wordGenerator - the wordGenerator component
word2Sound - the word2Sound component
wordDecorator - the word Decodator
Method Detail

getWordToSound

public com.octo.captcha.component.sound.wordtosound.WordToSound getWordToSound()
Returns:
the word to sound

getWordGenerator

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

getSoundCaptcha

public com.octo.captcha.sound.SoundCaptcha getSoundCaptcha()
Specified by:
getSoundCaptcha in class com.octo.captcha.sound.SoundCaptchaFactory
Returns:
a Sound Captcha

getSoundCaptcha

public com.octo.captcha.sound.SoundCaptcha getSoundCaptcha(Locale locale)
Specified by:
getSoundCaptcha in class com.octo.captcha.sound.SoundCaptchaFactory
Parameters:
locale - the locale
Returns:
a localized sound captcha

getQuestion

protected String getQuestion(Locale locale)
Parameters:
locale - the locale
Returns:
the question

getRandomLength

protected Integer getRandomLength()
Returns:
the random length of word


Copyright © 2014 Mairie de Paris. All Rights Reserved.