Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
UserAvatarMacroParameters | 31 | 6 | 0% | 6 | 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.macro.useravatar; | |
21 | ||
22 | import org.xwiki.properties.annotation.PropertyDescription; | |
23 | import org.xwiki.properties.annotation.PropertyMandatory; | |
24 | ||
25 | /** | |
26 | * Parameters for the {@link org.xwiki.rendering.internal.macro.useravatar.UserAvatarMacro} Macro. | |
27 | * | |
28 | * @version $Id: ca5a10b19f5b2cd8f066b6bd8278d31e0de64002 $ | |
29 | * @since 1.8RC2 | |
30 | */ | |
31 | public class UserAvatarMacroParameters | |
32 | { | |
33 | /** | |
34 | * The name of the user whose avatar is to be displayed. | |
35 | */ | |
36 | private String username; | |
37 | ||
38 | /** | |
39 | * The width of the image (optional). | |
40 | */ | |
41 | private Integer width; | |
42 | ||
43 | /** | |
44 | * The height of the image. | |
45 | */ | |
46 | private Integer height; | |
47 | ||
48 | /** | |
49 | * @return the name of the user whose avatar is to be displayed | |
50 | */ | |
51 | 12 | public String getUsername() |
52 | { | |
53 | 12 | return username; |
54 | } | |
55 | ||
56 | /** | |
57 | * @param username the name of the user whose avatar is to be displayed | |
58 | */ | |
59 | 6 | @PropertyMandatory |
60 | @PropertyDescription("the name of the user whose avatar is to be displayed") | |
61 | public void setUsername(String username) | |
62 | { | |
63 | 6 | this.username = username; |
64 | } | |
65 | ||
66 | /** | |
67 | * @return the width of the image. | |
68 | */ | |
69 | 13 | public Integer getWidth() |
70 | { | |
71 | 13 | return width; |
72 | } | |
73 | ||
74 | /** | |
75 | * @param width the width of the image | |
76 | */ | |
77 | 2 | @PropertyDescription("the image's width") |
78 | public void setWidth(Integer width) | |
79 | { | |
80 | 2 | this.width = width; |
81 | } | |
82 | ||
83 | /** | |
84 | * @return the height of the image | |
85 | */ | |
86 | 12 | public Integer getHeight() |
87 | { | |
88 | 12 | return height; |
89 | } | |
90 | ||
91 | /** | |
92 | * @param height the height of the image | |
93 | */ | |
94 | 1 | @PropertyDescription("the image's height") |
95 | public void setHeight(Integer height) | |
96 | { | |
97 | 1 | this.height = height; |
98 | } | |
99 | } |