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

File AbstractBeanOutputFilterStream.java

 

Coverage histogram

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

Code metrics

2
6
5
1
65
31
6
1
1.2
5
1.2

Classes

Class Line # Actions
AbstractBeanOutputFilterStream 29 6 0% 6 3
0.769230876.9%
 

Contributing tests

This file is covered by 46 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.output;
21   
22    import org.xwiki.filter.FilterException;
23   
24    /**
25    * @param <P> the type of the properties bean
26    * @version $Id: c7bad9ee2ecd6c5e8ab09f71b605e5bb9fd03764 $
27    * @since 6.2M1
28    */
 
29    public abstract class AbstractBeanOutputFilterStream<P> implements BeanOutputFilterStream<P>
30    {
31    protected P properties;
32   
33    protected Object filter;
34   
 
35  15226 toggle public AbstractBeanOutputFilterStream()
36    {
37   
38    }
39   
 
40  0 toggle public AbstractBeanOutputFilterStream(P properties) throws FilterException
41    {
42  0 setProperties(properties);
43    }
44   
 
45  15226 toggle @Override
46    public void setProperties(P properties) throws FilterException
47    {
48  15226 this.properties = properties;
49    }
50   
 
51  15207 toggle @Override
52    public Object getFilter() throws FilterException
53    {
54  15207 if (this.filter == null) {
55  15207 this.filter = createFilter();
56    }
57   
58  15207 return this.filter;
59    }
60   
 
61  15190 toggle protected Object createFilter() throws FilterException
62    {
63  15190 return this;
64    }
65    }