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

File DashboardMacroParameters.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart7.png
64% of files have more coverage

Code metrics

0
6
6
1
111
40
6
1
1
6
1

Classes

Class Line # Actions
DashboardMacroParameters 30 6 0% 6 4
0.666666766.7%
 

Contributing tests

This file is covered by 2 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.rendering.macro.dashboard;
21   
22    import org.xwiki.properties.annotation.PropertyDescription;
23   
24    /**
25    * Parameters for the dashboard macro.
26    *
27    * @version $Id: f921bb264b7af919ea51116f8a8e59fc6bca7329 $
28    * @since 2.5M2
29    */
 
30    public class DashboardMacroParameters
31    {
32    /**
33    * The identifier of the layout to be used for this dashboard. If none specified, columns will be used.
34    */
35    private String layout = "columns";
36   
37    /**
38    * The identifier of the style to be used for this dashboard. No style means that the gadgets will be rendered
39    * plain, as content of the page. "panels" style will render the gadgets the same as the panels. Note that this
40    * is used as the CSS class of the top level block of the dashboard, so you can pass any value to create your own
41    * dashboard style.
42    */
43    private String style = "";
44   
45    /**
46    * The source of the dashboard macro, as a serialized document reference, where the gadget configurations should be
47    * read from.
48    */
49    private String source;
50   
51    /**
52    * @return the layout style of this dashboard
53    */
 
54  9 toggle public String getLayout()
55    {
56  9 return layout;
57    }
58   
59    /**
60    * @param layout the layout to set
61    */
 
62  0 toggle @PropertyDescription("The identifier of the layout to use for this dashboard (e.g. columns, etc). "
63    + "If none specified, columns will be used.")
64    public void setLayout(String layout)
65    {
66  0 this.layout = layout;
67    }
68   
69    /**
70    * @return the style of the dasbboard
71    * @since 3.0M1
72    */
 
73  6 toggle public String getStyle()
74    {
75  6 return style;
76    }
77   
78    /**
79    * @param style the style to set
80    * @since 3.0M1
81    */
 
82  0 toggle @PropertyDescription("The identifier of the style to be used for this dashboard. No style means that the gadgets "
83    + "will be rendered plain, as content of the page. \"panels\" style will render the gadgets the same as "
84    + "the panels. Note that this is used as the CSS class of the top level block of the dashboard, so you can "
85    + "pass any value to create your own dashboard style.")
86    public void setStyle(String style)
87    {
88  0 this.style = style;
89    }
90   
91    /**
92    * @return the source of the dashboard macro, as a serialized document reference, where the gadget configurations
93    * should be read from.
94    * @since 3.0M3
95    */
 
96  8 toggle public String getSource()
97    {
98  8 return source;
99    }
100   
101    /**
102    * @param source the source to set
103    * @since 3.0M3
104    */
 
105  1 toggle @PropertyDescription("The source of the dashboard macro, as a serialized document reference, where the gadget "
106    + "configurations (objects) should be read from. By default the current document will be used.")
107    public void setSource(String source)
108    {
109  1 this.source = source;
110    }
111    }