Interface InlineDiagramResources

  • All Superinterfaces:
    org.xwiki.rest.XWikiRestComponent

    @Unstable
    public interface InlineDiagramResources
    extends org.xwiki.rest.XWikiRestComponent
    Provides the APIs needed by the Inline Diagram Macro.
    Since:
    1.22.11
    Version:
    $Id$
    • 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 stored
        name - the name of the diagram that we want to save
        body - 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 stored
        name - the name of the diagram that we want to save
        body - 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.