New servlet structure with a dedicated class UmlDiagramService to

produce diagram from a compressed source.
This commit is contained in:
Maxime Sinclair
2011-03-29 18:15:53 +02:00
parent 225ef45c37
commit 01a16339be
6 changed files with 170 additions and 2 deletions

View File

@@ -0,0 +1,27 @@
package net.sourceforge.plantuml.servlet;
import net.sourceforge.plantuml.FileFormat;
/*
* SVG servlet of the webapp.
* TODO.
*/
@SuppressWarnings("serial")
public class SvgServlet extends UmlDiagramService {
@Override
public String getSource( String uri) {
String[] result = uri.split("/svg/", 2);
if (result.length != 2) {
return "";
} else {
return result[1];
}
}
@Override
FileFormat getOutputFormat() {
return FileFormat.SVG;
}
}