001/* 002 * Copyright 2023 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.ametys.plugins.captchetat.captcha.v1; 018 019import java.util.Arrays; 020import java.util.List; 021import java.util.regex.Pattern; 022 023import org.apache.avalon.framework.service.ServiceException; 024import org.apache.avalon.framework.service.ServiceManager; 025 026import org.ametys.runtime.i18n.I18nizableText; 027 028/** 029 * Captcha implementation with images 030 */ 031@Deprecated 032public class CaptchEtat extends org.ametys.plugins.captchetat.captcha.CaptchEtat 033{ 034 @Override 035 public void service(ServiceManager manager) throws ServiceException 036 { 037 _captchEtatHelper = (org.ametys.plugins.captchetat.captcha.CaptchEtatHelper) manager.lookup(CaptchEtatHelper.ROLE); 038 } 039 040 @Override 041 public I18nizableText getLabel() 042 { 043 return new I18nizableText("plugin.captchetat", "PLUGINS_CAPTCHETAT_CONFIG_TYPE_CAPTCHETAT_V1"); 044 } 045 046 @Override 047 public List<Pattern> getUsedUrlPatterns() 048 { 049 return Arrays.asList(new Pattern[] {Pattern.compile("^plugins/captchetat/v1/simple-captcha-endpoint")}); 050 } 051}