Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
ExtendedRenderingConfiguration | 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.rendering.configuration; | |
21 | ||
22 | import java.util.List; | |
23 | ||
24 | import org.xwiki.component.annotation.Role; | |
25 | import org.xwiki.rendering.syntax.Syntax; | |
26 | ||
27 | /** | |
28 | * Extends {@link RenderingConfiguration} with XWiki-specific configuration properties. | |
29 | * | |
30 | * @version $Id: b31975fe1fed65f7497049b27c2f29f77b108b8e $ | |
31 | * @since 8.2M1 | |
32 | */ | |
33 | @Role | |
34 | public interface ExtendedRenderingConfiguration | |
35 | { | |
36 | /** | |
37 | * @return {@code true} to include the image dimensions extracted from the image parameters in the image URL, | |
38 | * {@code false} otherwise; when image dimensions are included in the image URL the image can be resized on | |
39 | * the server side before being downloaded. | |
40 | */ | |
41 | boolean isImageDimensionsIncludedInImageURL(); | |
42 | ||
43 | /** | |
44 | * One way to improve page load speed is to resize images on the server side just before rendering the page. The | |
45 | * rendering module can use the image width provided by the user to scale the image. When the user doesn't specify | |
46 | * the image width the rendering module can limit the width of the image based on this configuration parameter. | |
47 | * <p> | |
48 | * The default value is {@code -1} which means image width is not limited by default. Use a value greater than 0 to | |
49 | * limit the image width (pixels). Note that the aspect ratio is kept even when both the width and the height of the | |
50 | * image are limited. | |
51 | * | |
52 | * @return the maximum image width when there's no user supplied width | |
53 | * @see #isImageDimensionsIncludedInImageURL() | |
54 | */ | |
55 | int getImageWidthLimit(); | |
56 | ||
57 | /** | |
58 | * One way to improve page load speed is to resize images on the server side just before rendering the page. The | |
59 | * rendering module can use the image height provided by the user to scale the image. When the user doesn't specify | |
60 | * the image height the rendering module can limit the height of the image based on this configuration parameter. | |
61 | * <p> | |
62 | * The default value is {@code -1} which means image height is not limited by default. Use a value greater than 0 to | |
63 | * limit the image height (pixels). Note that the aspect ratio is kept even when both the width and the height of | |
64 | * the image are limited. | |
65 | * | |
66 | * @return the maximum image height when there's no user supplied height | |
67 | * @see #isImageDimensionsIncludedInImageURL() | |
68 | */ | |
69 | int getImageHeightLimit(); | |
70 | ||
71 | /** | |
72 | * @return the list of Rendering Syntaxes that should be used for the current wiki (i.e. that should be proposed to | |
73 | * the user when editing wiki pages). | |
74 | */ | |
75 | List<Syntax> getConfiguredSyntaxes(); | |
76 | ||
77 | /** | |
78 | * @return the list of Rendering Syntaxes that should not be used for the current wiki (i.e. that should not be | |
79 | * proposed to the user when editing wiki pages). The reason is that we want by default that all syntaxes | |
80 | * are enabled (for example so that when installing a new Syntax throught the Extension Manager it's active | |
81 | * by default) | |
82 | */ | |
83 | List<Syntax> getDisabledSyntaxes(); | |
84 | } |