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