| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
package org.xwiki.container.servlet; |
| 21 |
|
|
| 22 |
|
import java.io.File; |
| 23 |
|
import java.io.InputStream; |
| 24 |
|
import java.net.MalformedURLException; |
| 25 |
|
import java.net.URL; |
| 26 |
|
|
| 27 |
|
import javax.servlet.ServletContext; |
| 28 |
|
|
| 29 |
|
import org.slf4j.Logger; |
| 30 |
|
import org.slf4j.LoggerFactory; |
| 31 |
|
import org.xwiki.component.manager.ComponentManager; |
| 32 |
|
import org.xwiki.container.AbstractApplicationContext; |
| 33 |
|
|
| 34 |
|
|
| 35 |
|
@deprecated |
| 36 |
|
|
| 37 |
|
@Deprecated |
| |
|
| 63.6% |
Uncovered Elements: 4 (11) |
Complexity: 5 |
Complexity Density: 0.83 |
|
| 38 |
|
public class ServletApplicationContext extends AbstractApplicationContext |
| 39 |
|
{ |
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
protected static final Logger LOGGER = LoggerFactory.getLogger(ServletApplicationContext.class); |
| 44 |
|
|
| 45 |
|
private final ServletContext servletContext; |
| 46 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 47 |
116 |
public ServletApplicationContext(ServletContext servletContext, ComponentManager componentManager)... |
| 48 |
|
{ |
| 49 |
116 |
super(componentManager); |
| 50 |
|
|
| 51 |
116 |
this.servletContext = servletContext; |
| 52 |
|
} |
| 53 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 54 |
32 |
public ServletContext getServletContext()... |
| 55 |
|
{ |
| 56 |
32 |
return this.servletContext; |
| 57 |
|
} |
| 58 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 59 |
32 |
@Override... |
| 60 |
|
public InputStream getResourceAsStream(String resourceName) |
| 61 |
|
{ |
| 62 |
32 |
return getServletContext().getResourceAsStream(resourceName); |
| 63 |
|
} |
| 64 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 65 |
0 |
@Override... |
| 66 |
|
public URL getResource(String resourceName) throws MalformedURLException |
| 67 |
|
{ |
| 68 |
0 |
return getServletContext().getResource(resourceName); |
| 69 |
|
} |
| 70 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 71 |
0 |
@Override... |
| 72 |
|
public File getTemporaryDirectory() |
| 73 |
|
{ |
| 74 |
|
|
| 75 |
0 |
return (File) this.servletContext.getAttribute("javax.servlet.context.tempdir"); |
| 76 |
|
} |
| 77 |
|
} |