1. Project Clover database Sat Feb 2 2019 06:45:20 CET
  2. Package org.xwiki.filter.descriptor

File DefaultFilterStreamBeanDescriptor.java

 

Coverage histogram

../../../../img/srcFileCovDistChart8.png
56% of files have more coverage

Code metrics

0
7
3
1
67
27
3
0.43
2.33
3
1

Classes

Class Line # Actions
DefaultFilterStreamBeanDescriptor 29 7 0% 3 2
0.880%
 

Contributing tests

This file is covered by 65 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.descriptor;
21   
22    import org.xwiki.properties.BeanDescriptor;
23    import org.xwiki.properties.PropertyDescriptor;
24   
25    /**
26    * @version $Id: 2fa580a4d200c8f13ff465d53244664939cff5dc $
27    * @since 6.2M1
28    */
 
29    public class DefaultFilterStreamBeanDescriptor extends AbstractFilterStreamDescriptor
30    implements FilterStreamBeanDescriptor
31    {
32    /**
33    * The description of the properties bean.
34    */
35    private BeanDescriptor propertiesBeanDescriptor;
36   
37    /**
38    * @param name the display name of the filter
39    * @param description the description of the filter
40    * @param parametersBeanDescriptor the description of filter parameter
41    */
 
42  1071 toggle public DefaultFilterStreamBeanDescriptor(String name, String description, BeanDescriptor parametersBeanDescriptor)
43    {
44  1071 super(name, description);
45   
46  1071 this.propertiesBeanDescriptor = parametersBeanDescriptor;
47   
48  1071 extractParameters();
49    }
50   
 
51  1071 toggle protected void extractParameters()
52    {
53  1071 for (PropertyDescriptor propertyDescriptor : this.propertiesBeanDescriptor.getProperties()) {
54  8726 DefaultFilterStreamBeanParameterDescriptor<?> desc =
55    new DefaultFilterStreamBeanParameterDescriptor<Object>(propertyDescriptor);
56  8726 this.parameterDescriptorMap.put(desc.getId().toLowerCase(), desc);
57    }
58    }
59   
60    // FilterBeanDescriptor
61   
 
62  0 toggle @Override
63    public Class<?> getBeanClass()
64    {
65  0 return this.propertiesBeanDescriptor.getBeanClass();
66    }
67    }