Package com.xwiki.diagram
Interface InlineDiagramResources
-
- All Superinterfaces:
org.xwiki.rest.XWikiRestComponent
@Unstable public interface InlineDiagramResources extends org.xwiki.rest.XWikiRestComponentProvides the APIs needed by the Inline Diagram Macro.- Since:
- 1.22.11
- Version:
- $Id$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.ws.rs.core.Responsesave(String sourceReference, String name, InputStream body)Handles the initial save of a diagram and subsequent updates.javax.ws.rs.core.ResponsesaveRender(String sourceReference, String name, String body)Handles the initial save of a diagram and subsequent updates.
-
-
-
Method Detail
-
save
javax.ws.rs.core.Response save(String sourceReference, String name, InputStream body)
Handles the initial save of a diagram and subsequent updates. If is the first save it creates both the png and the .diagram.xml and if is an update it updates the content.- Parameters:
sourceReference- the document where the diagram should be storedname- the name of the diagram that we want to savebody- the content of the diagram as plain text- Returns:
- 201 if the diagram was created, 200 if the diagram was updated 403 for forbidden and 500 for any backend logic errors.
-
saveRender
javax.ws.rs.core.Response saveRender(String sourceReference, String name, String body)
Handles the initial save of a diagram and subsequent updates. If is the first save it creates both the png and the png and if is an update it updates the content.- Parameters:
sourceReference- the document where the diagram should be storedname- the name of the diagram that we want to savebody- the content of the diagram as plain text- Returns:
- 201 if the diagram was created, 200 if the diagram was updated 403 for forbidden and 500 for any backend logic errors.
-
-