Package net.sourceforge.plantuml.servlet
Class DiagramResponse
- java.lang.Object
-
- net.sourceforge.plantuml.servlet.DiagramResponse
-
public class DiagramResponse extends Object
Delegates the diagram generation from the UML source and the filling of the HTTP response with the diagram in the right format. Its own responsibility is to produce the right HTTP headers.
-
-
Constructor Summary
Constructors Constructor Description DiagramResponse(jakarta.servlet.http.HttpServletResponse res, net.sourceforge.plantuml.FileFormat fmt, jakarta.servlet.http.HttpServletRequest req)
Create new diagram response instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
sendCheck(String uml)
Check the syntax of the diagram and send a report in TEXT format.void
sendDiagram(String uml, int idx)
Render and send a specific uml diagram.void
sendMap(String uml, int idx)
Produce and send the image map of the uml diagram in HTML format.
-
-
-
Constructor Detail
-
DiagramResponse
public DiagramResponse(jakarta.servlet.http.HttpServletResponse res, net.sourceforge.plantuml.FileFormat fmt, jakarta.servlet.http.HttpServletRequest req)
Create new diagram response instance.- Parameters:
res
- http responsefmt
- target file formatreq
- http request
-
-
Method Detail
-
sendDiagram
public void sendDiagram(String uml, int idx) throws IOException
Render and send a specific uml diagram.- Parameters:
uml
- textual UML diagram(s) sourceidx
- diagram index ofuml
to send- Throws:
IOException
- if an input or output exception occurred
-
sendMap
public void sendMap(String uml, int idx) throws IOException
Produce and send the image map of the uml diagram in HTML format.- Parameters:
uml
- textual UML diagram sourceidx
- diagram index ofuml
to send- Throws:
IOException
- if an input or output exception occurred
-
sendCheck
public void sendCheck(String uml) throws IOException
Check the syntax of the diagram and send a report in TEXT format.- Parameters:
uml
- textual UML diagram source- Throws:
IOException
- if an input or output exception occurred
-
-