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

File XMLConfiguration.java

 

Coverage histogram

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

Code metrics

0
15
11
1
176
63
11
0.73
1.36
11
1

Classes

Class Line # Actions
XMLConfiguration 28 15 0% 11 0
1.0100%
 

Contributing tests

This file is covered by 640 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.filter.xml;
21   
22    /**
23    * Allow to customize the syntax.
24    *
25    * @version $Id: e1c44412103ad1f640b5c08bab2700a48ecdfbaf $
26    * @since 5.2M1
27    */
 
28    public class XMLConfiguration
29    {
30    /**
31    * The default name of block element.
32    */
33    public static final String DEFAULT_ELEM_BLOCK = "block";
34   
35    /**
36    * The default name of the attribute containing the name of the block.
37    */
38    public static final String DEFAULT_ATT_BLOCK_NAME = "n";
39   
40    /**
41    * The default name of the attribute containing the name of the parameter.
42    */
43    public static final String DEFAULT_ATT_PARAMETER_NAME = DEFAULT_ATT_BLOCK_NAME;
44   
45    /**
46    * The default name of the attribute containing the type of the parameter.
47    */
48    public static final String DEFAULT_ATT_PARAMETER_TYPE = "t";
49   
50    /**
51    * The default name of the parameter element.
52    */
53    public static final String DEFAULT_ELEM_PARAMETER = "p";
54   
55    /**
56    * The default name of the parameter element.
57    */
58    public static final String DEFAULT_ELEM_PARAMETERS = DEFAULT_ELEM_PARAMETER;
59   
60    /**
61    * @see #getElementBlock()
62    */
63    private String elementBlock;
64   
65    /**
66    * @see #getElementParameters()
67    */
68    private String elementParameters;
69   
70    /**
71    * @see #getAttributeParameterName()
72    */
73    private String attributeParameterName;
74   
75    /**
76    * @see #getAttributeParameterType()
77    */
78    private String attributeParameterType;
79   
80    /**
81    * @see #getAttributeBlockName()
82    */
83    private String attributeBlockName;
84   
85    /**
86    * Default constructor.
87    */
 
88  1204 toggle public XMLConfiguration()
89    {
90  1204 setElementBlock(DEFAULT_ELEM_BLOCK);
91  1204 setElementParameters(DEFAULT_ELEM_PARAMETERS);
92  1204 setAttributeBlockName(DEFAULT_ATT_BLOCK_NAME);
93  1204 setAttributeParameterName(DEFAULT_ATT_PARAMETER_NAME);
94  1204 setAttributeParameterType(DEFAULT_ATT_PARAMETER_TYPE);
95    }
96   
97    /**
98    * @return the name of the block element
99    */
 
100  8066 toggle public String getElementBlock()
101    {
102  8066 return this.elementBlock;
103    }
104   
105    /**
106    * @param elementBlock the name of the block element
107    */
 
108  1204 toggle public void setElementBlock(String elementBlock)
109    {
110  1204 this.elementBlock = elementBlock;
111    }
112   
113    /**
114    * @return the name of the parameters element
115    */
 
116  40081 toggle public String getElementParameters()
117    {
118  40081 return this.elementParameters;
119    }
120   
121    /**
122    * @param elementParameters the name of the parameters element
123    */
 
124  1204 toggle public void setElementParameters(String elementParameters)
125    {
126  1204 this.elementParameters = elementParameters;
127    }
128   
129    /**
130    * @return the name of the attribute containing the name of the block
131    */
 
132  2694 toggle public String getAttributeBlockName()
133    {
134  2694 return this.attributeBlockName;
135    }
136   
137    /**
138    * @param attributeBlockName the name of the attribute containing the name of the block
139    */
 
140  1204 toggle public void setAttributeBlockName(String attributeBlockName)
141    {
142  1204 this.attributeBlockName = attributeBlockName;
143    }
144   
145    /**
146    * @return the name of the attribute containing the name of the parameter
147    */
 
148  6375 toggle public String getAttributeParameterName()
149    {
150  6375 return this.attributeParameterName;
151    }
152   
153    /**
154    * @param attributeParameterName the name of the attribute containing the name of the parameter
155    */
 
156  1204 toggle public void setAttributeParameterName(String attributeParameterName)
157    {
158  1204 this.attributeParameterName = attributeParameterName;
159    }
160   
161    /**
162    * @return the name of the attribute containing the type of the parameter
163    */
 
164  981 toggle public String getAttributeParameterType()
165    {
166  981 return this.attributeParameterType;
167    }
168   
169    /**
170    * @param attributeParameterType the name of the attribute containing the type of the parameter
171    */
 
172  1204 toggle public void setAttributeParameterType(String attributeParameterType)
173    {
174  1204 this.attributeParameterType = attributeParameterType;
175    }
176    }