1
2
3
4
5
6
7 package com.octo.captcha.image;
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 ImageCaptcha Factory</p>.
16 *
17 * @author <a href="mailto:mag@jcaptcha.net">Marc-Antoine Garrigue</a>
18 * @version 1.0
19 */
20 public abstract class ImageCaptchaFactory implements CaptchaFactory {
21
22 /***
23 * builds a captcha.
24 *
25 * @return a captcha
26 */
27 public final Captcha getCaptcha() {
28 return getImageCaptcha();
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 getImageCaptcha(locale);
38 }
39
40 /***
41 * ImageCaptcha.
42 *
43 * @return a image captcha
44 */
45 public abstract ImageCaptcha getImageCaptcha();
46
47 /***
48 * a ImageCaptcha.
49 *
50 * @return a localized ImageCaptcha
51 */
52 public abstract ImageCaptcha getImageCaptcha(Locale locale);
53
54 }