mirror of
https://github.com/octoleo/plantuml-server.git
synced 2024-12-22 16:58:54 +00:00
Merge branch 'halindrome-proxy-format'
This commit is contained in:
commit
f348627e84
@ -61,6 +61,7 @@ public class ProxyServlet extends HttpServlet {
|
||||
@Override
|
||||
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
|
||||
|
||||
final String fmt = request.getParameter("fmt");
|
||||
final String source = request.getParameter("src");
|
||||
final String index = request.getParameter("idx");
|
||||
final URL srcUrl;
|
||||
@ -72,9 +73,12 @@ public class ProxyServlet extends HttpServlet {
|
||||
return;
|
||||
}
|
||||
|
||||
if (fmt != "") {
|
||||
format = fmt;
|
||||
}
|
||||
|
||||
// generate the response
|
||||
String diagmarkup = getSource(srcUrl);
|
||||
System.out.println("getSource=>" + diagmarkup);
|
||||
SourceStringReader reader = new SourceStringReader(diagmarkup);
|
||||
int n = index == null ? 0 : Integer.parseInt(index);
|
||||
List<BlockUml> blocks = reader.getBlocks();
|
||||
@ -82,7 +86,7 @@ public class ProxyServlet extends HttpServlet {
|
||||
Diagram diagram = block.getDiagram();
|
||||
UmlSource umlSrc = diagram.getSource();
|
||||
String uml = umlSrc.getPlainString();
|
||||
System.out.println("uml=" + uml);
|
||||
//System.out.println("uml=" + uml);
|
||||
|
||||
// generate the response
|
||||
DiagramResponse dr = new DiagramResponse(response, getOutputFormat());
|
||||
|
Loading…
Reference in New Issue
Block a user