1
2
3
4
5
6
7 package com.octo.captcha.text;
8
9 import com.octo.captcha.Captcha;
10 import com.octo.captcha.CaptchaFactory;
11
12 import java.util.Locale;
13
14 /***
15 * <p>Implements a TextCaptcha Factory</p>.
16 *
17 * @author <a href="mailto:mag@jcaptcha.net">Marc-Antoine Garrigue</a>
18 * @version 1.0
19 */
20 public abstract class TextCaptchaFactory implements CaptchaFactory {
21
22 /***
23 * builds a captcha.
24 *
25 * @return a captcha
26 */
27 public final Captcha getCaptcha() {
28 return getTextCaptcha();
29 }
30
31 /***
32 * build Localized captcha (don't forget those captcha are for human beings!).
33 *
34 * @return a captcha corresponding to the locale
35 */
36 public final Captcha getCaptcha(final Locale locale) {
37 return getTextCaptcha(locale);
38 }
39
40 /***
41 * TextCaptcha.
42 *
43 * @return a Text captcha
44 */
45 public abstract TextCaptcha getTextCaptcha();
46
47 /***
48 * a TextCaptcha.
49 *
50 * @return a localized TextCaptcha
51 */
52 public abstract TextCaptcha getTextCaptcha(Locale locale);
53
54 }