Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
XWikiCaptchaService | 33 | 0 | - | 0 | 0 |
1 | /* | |
2 | * See the NOTICE file distributed with this work for additional | |
3 | * information regarding copyright ownership. | |
4 | * | |
5 | * This is free software; you can redistribute it and/or modify it | |
6 | * under the terms of the GNU Lesser General Public License as | |
7 | * published by the Free Software Foundation; either version 2.1 of | |
8 | * the License, or (at your option) any later version. | |
9 | * | |
10 | * This software is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | * Lesser General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU Lesser General Public | |
16 | * License along with this software; if not, write to the Free | |
17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | |
19 | */ | |
20 | package org.xwiki.captcha; | |
21 | ||
22 | import java.util.List; | |
23 | ||
24 | import org.xwiki.component.annotation.Role; | |
25 | ||
26 | /** | |
27 | * Provides access to the classes implementing Captcha. | |
28 | * | |
29 | * @version $Id: 6fa0fab6a02f5c4530ef2757498ac1572324b1a7 $ | |
30 | * @since 2.2M2 | |
31 | */ | |
32 | @Role | |
33 | public interface XWikiCaptchaService | |
34 | { | |
35 | /** | |
36 | * Get a {@link org.xwiki.captcha.CaptchaVerifier} from the service. | |
37 | * | |
38 | * @param captchaName The name of the type of captcha, use {@link #listCaptchaNames()} for a list | |
39 | * @return A captcha object which can be used to check a specific answer for a given challange | |
40 | * @throws CaptchaVerifierNotFoundException If the named VaptchaVerifier could not be found. | |
41 | */ | |
42 | CaptchaVerifier getCaptchaVerifier(String captchaName) throws CaptchaVerifierNotFoundException; | |
43 | ||
44 | /** @return a List of the names of all registered classes implementing {@link org.xwiki.captcha.CaptchaVerifier}. */ | |
45 | List<String> listCaptchaNames(); | |
46 | ||
47 | /** | |
48 | * If this is false, the captcha system will still work. | |
49 | * It is for velocity scripts to determine whether captchas are needed. | |
50 | * | |
51 | * @return Is the captcha service enabled in the configuration. | |
52 | * @deprecated since 2.3M1 Captcha should only be enabled/disabled on an application by application basis. | |
53 | */ | |
54 | @Deprecated | |
55 | boolean isEnabled(); | |
56 | } |