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

File XWikiServletContext.java

 

Coverage histogram

../../../../img/srcFileCovDistChart9.png
41% of files have more coverage

Code metrics

0
8
8
1
77
47
8
1
1
8
1

Classes

Class Line # Actions
XWikiServletContext 28 8 0% 8 2
0.87587.5%
 

Contributing tests

No tests hitting this source file were found.

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.web;
21   
22    import java.io.InputStream;
23    import java.net.MalformedURLException;
24    import java.net.URL;
25   
26    import javax.servlet.ServletContext;
27   
 
28    public class XWikiServletContext implements XWikiEngineContext
29    {
30    private ServletContext scontext;
31   
 
32  43016 toggle public XWikiServletContext(ServletContext scontext)
33    {
34  43016 this.scontext = scontext;
35    }
36   
 
37  0 toggle public ServletContext getServletContext()
38    {
39  0 return this.scontext;
40    }
41   
 
42  43097 toggle @Override
43    public Object getAttribute(String name)
44    {
45  43114 return this.scontext.getAttribute(name);
46    }
47   
 
48  41 toggle @Override
49    public void setAttribute(String name, Object value)
50    {
51  41 this.scontext.setAttribute(name, value);
52    }
53   
 
54  347 toggle @Override
55    public String getRealPath(String path)
56    {
57  347 return this.scontext.getRealPath(path);
58    }
59   
 
60  379606 toggle @Override
61    public URL getResource(String name) throws MalformedURLException
62    {
63  379621 return this.scontext.getResource(name);
64    }
65   
 
66  22094 toggle @Override
67    public InputStream getResourceAsStream(String name)
68    {
69  22135 return this.scontext.getResourceAsStream(name);
70    }
71   
 
72  1370 toggle @Override
73    public String getMimeType(String filename)
74    {
75  1372 return this.scontext.getMimeType(filename);
76    }
77    }