| 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.charts.actions; |
| 21 |
|
|
| 22 |
|
import java.io.IOException; |
| 23 |
|
|
| 24 |
|
import com.xpn.xwiki.XWikiContext; |
| 25 |
|
import com.xpn.xwiki.XWikiException; |
| 26 |
|
import com.xpn.xwiki.plugin.charts.ChartingPluginApi; |
| 27 |
|
import com.xpn.xwiki.util.Util; |
| 28 |
|
import com.xpn.xwiki.web.XWikiAction; |
| 29 |
|
import com.xpn.xwiki.web.XWikiRequest; |
| 30 |
|
|
| |
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 2 |
Complexity Density: 0.29 |
|
| 31 |
|
public class ChartingAction extends XWikiAction |
| 32 |
|
{ |
| |
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 2 |
Complexity Density: 0.29 |
|
| 33 |
0 |
@Override... |
| 34 |
|
public String render(XWikiContext context) throws XWikiException |
| 35 |
|
{ |
| 36 |
0 |
XWikiRequest request = context.getRequest(); |
| 37 |
0 |
String path = request.getRequestURI(); |
| 38 |
0 |
String filename = Util.decodeURI(path.substring(path.lastIndexOf("/") + 1), context); |
| 39 |
0 |
try { |
| 40 |
0 |
((ChartingPluginApi) context.getWiki().getPluginApi("charting", context)).outputFile(filename, context); |
| 41 |
|
} catch (IOException e) { |
| 42 |
0 |
throw new XWikiException(XWikiException.MODULE_XWIKI_APP, |
| 43 |
|
XWikiException.ERROR_XWIKI_APP_SEND_RESPONSE_EXCEPTION, "Exception while sending response", e); |
| 44 |
|
} |
| 45 |
0 |
return null; |
| 46 |
|
} |
| 47 |
|
} |