1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package com.xpn.xwiki.plugin.svg; |
21 |
|
|
22 |
|
import java.io.IOException; |
23 |
|
|
24 |
|
import org.apache.batik.apps.rasterizer.SVGConverterException; |
25 |
|
|
26 |
|
import com.xpn.xwiki.XWikiContext; |
27 |
|
import com.xpn.xwiki.api.Api; |
28 |
|
|
|
|
| 0% |
Uncovered Elements: 27 (27) |
Complexity: 12 |
Complexity Density: 0.86 |
|
29 |
|
public class SVGPluginApi extends Api |
30 |
|
{ |
31 |
|
private SVGPlugin plugin; |
32 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
33 |
0 |
public SVGPluginApi(SVGPlugin plugin, XWikiContext context)... |
34 |
|
{ |
35 |
0 |
super(context); |
36 |
0 |
setPlugin(plugin); |
37 |
|
} |
38 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
39 |
0 |
public SVGPlugin getPlugin()... |
40 |
|
{ |
41 |
0 |
if (hasProgrammingRights()) { |
42 |
0 |
return this.plugin; |
43 |
|
} |
44 |
0 |
return null; |
45 |
|
} |
46 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
47 |
0 |
public void setPlugin(SVGPlugin plugin)... |
48 |
|
{ |
49 |
0 |
this.plugin = plugin; |
50 |
|
} |
51 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
52 |
0 |
public byte[] getSVGImage(String content, int height, int width) throws IOException, SVGConverterException... |
53 |
|
{ |
54 |
0 |
return this.plugin.getSVGImage(content, "png", height, width); |
55 |
|
} |
56 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
57 |
0 |
public byte[] getSVGImage(String content, String extension, int height, int width) throws IOException,... |
58 |
|
SVGConverterException |
59 |
|
{ |
60 |
0 |
return this.plugin.getSVGImage(content, extension, height, width); |
61 |
|
} |
62 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
63 |
0 |
public String getSVGImageURL(String content, int height, int width) throws IOException, SVGConverterException... |
64 |
|
{ |
65 |
0 |
return this.plugin.getSVGImageURL(content, height, width, getXWikiContext()); |
66 |
|
} |
67 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
68 |
0 |
public String writeSVGImage(String content, int height, int width) throws IOException, SVGConverterException... |
69 |
|
{ |
70 |
0 |
return this.plugin.writeSVGImage(content, "png", height, width); |
71 |
|
} |
72 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
73 |
0 |
public String writeSVGImage(String content, String extension, int height, int width) throws IOException,... |
74 |
|
SVGConverterException |
75 |
|
{ |
76 |
0 |
return this.plugin.writeSVGImage(content, extension, height, width); |
77 |
|
} |
78 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
79 |
0 |
public void outputSVGImage(String content, int height, int width) throws IOException, SVGConverterException... |
80 |
|
{ |
81 |
0 |
this.plugin.outputSVGImage(content, "gif", height, width, getXWikiContext()); |
82 |
|
} |
83 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
84 |
0 |
public void outputSVGImage(String content, String extension, int height, int width) throws IOException,... |
85 |
|
SVGConverterException |
86 |
|
{ |
87 |
0 |
this.plugin.outputSVGImage(content, extension, height, width, getXWikiContext()); |
88 |
|
} |
89 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
90 |
0 |
public void flushCache()... |
91 |
|
{ |
92 |
0 |
this.plugin.flushCache(); |
93 |
|
} |
94 |
|
} |