1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.localization.macro

File TranslationMacroParameters.java

 

Coverage histogram

../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
6
6
1
101
38
6
1
1
6
1

Classes

Class Line # Actions
TranslationMacroParameters 33 6 0% 6 0
1.0100%
 

Contributing tests

This file is covered by 6 tests. .

Source view

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.localization.macro;
21   
22    import java.util.Locale;
23   
24    import org.xwiki.properties.annotation.PropertyDescription;
25    import org.xwiki.properties.annotation.PropertyMandatory;
26   
27    /**
28    * Parameters for the translation macro.
29    *
30    * @version $Id: 7d0ce9fbafbb29683b21f1a76904fc0fcf5fa139 $
31    * @since 4.3M2
32    */
 
33    public class TranslationMacroParameters
34    {
35    /**
36    * @see #getKey()
37    */
38    private String key;
39   
40    /**
41    * @see #getLocale()
42    */
43    private Locale locale;
44   
45    /**
46    * @see #getParameters()
47    */
48    private String[] parameters;
49   
50    /**
51    * @return the key associated to the translation
52    */
 
53  239 toggle @PropertyDescription("the key associated to the translation")
54    @PropertyMandatory
55    public String getKey()
56    {
57  239 return this.key;
58    }
59   
60    /**
61    * @param key the key associated to the translation
62    */
 
63  217 toggle public void setKey(String key)
64    {
65  217 this.key = key;
66    }
67   
68    /**
69    * @return the locale in which to resolve the translation
70    */
 
71  239 toggle public Locale getLocale()
72    {
73  239 return this.locale;
74    }
75   
76    /**
77    * @param locale the locale in which to resolve the translation
78    */
 
79  1 toggle @PropertyDescription("the locale in which to resolve the translation. Current one is used if not set.")
80    public void setLocale(Locale locale)
81    {
82  1 this.locale = locale;
83    }
84   
85    /**
86    * @return the translation parameters
87    */
 
88  237 toggle public String[] getParameters()
89    {
90  237 return this.parameters;
91    }
92   
93    /**
94    * @param parameters the translation parameters
95    */
 
96  1 toggle @PropertyDescription("the translation parameters")
97    public void setParameters(String[] parameters)
98    {
99  1 this.parameters = parameters;
100    }
101    }