1
2
3
4
5
6
7
8
9
10
11
12 package com.octo.captcha.engine;
13
14 import com.octo.captcha.image.ImageCaptcha;
15 import com.octo.captcha.image.ImageCaptchaFactory;
16
17 import java.util.Locale;
18
19 /***
20 * @author <a href="mailto:marc.antoine.garrigue@gmail.com">Marc-Antoine Garrigue</a>
21 * @version $Id: MockImageCaptchaFactory.java 322 2007-03-26 17:45:25Z antoineveret $
22 */
23 public class MockImageCaptchaFactory extends ImageCaptchaFactory {
24 /***
25 * ImageCaptcha.
26 *
27 * @return a image captcha
28 */
29 public ImageCaptcha getImageCaptcha() {
30 return new ImageCaptcha(null, null) {
31 public Boolean validateResponse(Object response) {
32 return Boolean.FALSE;
33 }
34 };
35 }
36
37 /***
38 * a ImageCaptcha.
39 *
40 * @return a localized ImageCaptcha
41 */
42 public ImageCaptcha getImageCaptcha(Locale locale) {
43 return getImageCaptcha();
44 }
45
46
47 }