Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
HTMLCleanerConfiguration | 34 | 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.xml.html; | |
21 | ||
22 | import java.util.List; | |
23 | import java.util.Map; | |
24 | ||
25 | import org.xwiki.xml.html.filter.HTMLFilter; | |
26 | ||
27 | /** | |
28 | * Represents a configuration for the {@link HTMLCleaner} and allows to configure the cleaning parameters and cleaning | |
29 | * filters to apply. | |
30 | * | |
31 | * @version $Id: b06f110e3253ce9b1bc7495f6b730cf587e22d05 $ | |
32 | * @since 1.8.1 | |
33 | */ | |
34 | public interface HTMLCleanerConfiguration | |
35 | { | |
36 | /** | |
37 | * Cleaning property identifier which decides if parsing should omit/keep namespace information. | |
38 | */ | |
39 | String NAMESPACES_AWARE = "namespacesAware"; | |
40 | ||
41 | /** | |
42 | * Cleaning in restricted mode ({@code <script>} and {@code <style>} should not be allowed for example). | |
43 | */ | |
44 | String RESTRICTED = "restricted"; | |
45 | ||
46 | /** | |
47 | * @return the ordered list of filters to use for cleaning the HTML content | |
48 | */ | |
49 | List<HTMLFilter> getFilters(); | |
50 | ||
51 | /** | |
52 | * @param filters the ordered list of filters to use for cleaning the HTML content | |
53 | */ | |
54 | void setFilters(List<HTMLFilter> filters); | |
55 | ||
56 | /** | |
57 | * @return the list of cleaning parameters that will be used to clean the HTML content. Note that these parameters | |
58 | * are implementation dependent and thus depend on the HTML cleaner implementation used. | |
59 | */ | |
60 | Map<String, String> getParameters(); | |
61 | ||
62 | /** | |
63 | * @param cleaningParameters the list of cleaning parameters that will be used to clean the HTML content | |
64 | */ | |
65 | void setParameters(Map<String, String> cleaningParameters); | |
66 | } |