1. Project Clover database Sat Feb 2 2019 06:45:20 CET
  2. Package com.xpn.xwiki.internal.template

File DefaultTemplateManager.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart4.png
80% of files have more coverage

Code metrics

0
20
20
1
164
117
20
1
1
20
1

Classes

Class Line # Actions
DefaultTemplateManager 40 20 0% 20 24
0.440%
 

Contributing tests

This file is covered by 24 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 com.xpn.xwiki.internal.template;
21   
22    import java.io.Writer;
23   
24    import javax.inject.Inject;
25    import javax.inject.Singleton;
26   
27    import org.xwiki.component.annotation.Component;
28    import org.xwiki.model.reference.DocumentReference;
29    import org.xwiki.rendering.block.XDOM;
30    import org.xwiki.skin.Skin;
31    import org.xwiki.template.Template;
32    import org.xwiki.template.TemplateManager;
33   
34    /**
35    * @version $Id: b113b01a4c4e5bd057a2dc1e6edb5e1b3c2d9bb8 $
36    * @since 7.0M1
37    */
38    @Component
39    @Singleton
 
40    public class DefaultTemplateManager implements TemplateManager
41    {
42    @Inject
43    private InternalTemplateManager templateManager;
44   
 
45  0 toggle @Override
46    public XDOM getXDOMNoException(Template template)
47    {
48  0 return this.templateManager.getXDOMNoException(template);
49    }
50   
 
51  0 toggle @Override
52    public XDOM getXDOMNoException(String templateName)
53    {
54  0 return this.templateManager.getXDOMNoException(templateName);
55    }
56   
 
57  0 toggle @Override
58    public XDOM getXDOM(Template template) throws Exception
59    {
60  0 return this.templateManager.getXDOM(template);
61    }
62   
 
63  0 toggle @Override
64    public XDOM getXDOM(String templateName) throws Exception
65    {
66  0 return this.templateManager.getXDOM(templateName);
67    }
68   
 
69  0 toggle @Override
70    public String renderNoException(String templateName)
71    {
72  0 return this.templateManager.renderNoException(templateName);
73    }
74   
 
75  786206 toggle @Override
76    public String render(String templateName) throws Exception
77    {
78  786576 return this.templateManager.render(templateName);
79    }
80   
 
81  6 toggle @Override
82    public String renderFromSkin(String templateName, Skin skin) throws Exception
83    {
84  6 return this.templateManager.renderFromSkin(templateName, skin);
85    }
86   
 
87  0 toggle @Override
88    public void renderNoException(Template template, Writer writer)
89    {
90  0 this.templateManager.renderNoException(template, writer);
91    }
92   
 
93  0 toggle @Override
94    public void renderNoException(String templateName, Writer writer)
95    {
96  0 this.templateManager.renderNoException(templateName, writer);
97    }
98   
 
99  0 toggle @Override
100    public void render(Template template, Writer writer) throws Exception
101    {
102  0 this.templateManager.render(template, writer);
103    }
104   
 
105  0 toggle @Override
106    public void render(String template, Writer writer) throws Exception
107    {
108  0 this.templateManager.render(template, writer);
109    }
110   
 
111  0 toggle @Override
112    public void renderFromSkin(String templateName, Skin skin, Writer writer) throws Exception
113    {
114  0 this.templateManager.renderFromSkin(templateName, skin, writer);
115    }
116   
 
117  0 toggle @Override
118    public XDOM executeNoException(Template template)
119    {
120  0 return this.templateManager.executeNoException(template);
121    }
122   
 
123  22 toggle @Override
124    public XDOM executeNoException(String templateName)
125    {
126  22 return this.templateManager.executeNoException(templateName);
127    }
128   
 
129  15 toggle @Override
130    public XDOM execute(Template template) throws Exception
131    {
132  15 return this.templateManager.execute(template);
133    }
134   
 
135  35823 toggle @Override
136    public XDOM execute(String templateName) throws Exception
137    {
138  35824 return this.templateManager.execute(templateName);
139    }
140   
 
141  0 toggle @Override
142    public Template getSkinTemplate(String templateName, Skin skin)
143    {
144  0 return this.templateManager.getResourceTemplate(templateName, skin);
145    }
146   
 
147  11242 toggle @Override
148    public Template getTemplate(String templateName, Skin skin)
149    {
150  11242 return this.templateManager.getTemplate(templateName, skin);
151    }
152   
 
153  92807 toggle @Override
154    public Template getTemplate(String templateName)
155    {
156  93149 return this.templateManager.getTemplate(templateName);
157    }
158   
 
159  1 toggle @Override
160    public Template createStringTemplate(String content, DocumentReference author) throws Exception
161    {
162  1 return this.templateManager.createStringTemplate(content, author);
163    }
164    }