Class DiagramScriptService

java.lang.Object
com.xwiki.diagram.script.DiagramScriptService
All Implemented Interfaces:
org.xwiki.script.service.ScriptService

@Component @Named("diagram") @Singleton @Unstable public class DiagramScriptService extends Object implements org.xwiki.script.service.ScriptService
Script services for the Diagram application.
Since:
1.14
Version:
$Id$
  • Field Details

  • Constructor Details

    • DiagramScriptService

      public DiagramScriptService()
  • Method Details

    • get

      public <S extends org.xwiki.script.service.ScriptService> S get(String serviceName)
      Type Parameters:
      S - the type of the ScriptService
      Parameters:
      serviceName - the name of the sub ScriptService
      Returns:
      the ScriptService or null of none could be found
    • importDiagram

      @Unstable public String importDiagram(String diagram, String fileName)
      Attempts to convert the given diagram from a third party format to the draw.io format.
      Parameters:
      diagram - the diagram content, using a third-party format
      fileName - the diagram file name, used to detect the diagram type
      Returns:
      the diagram XML in draw.io format, or null if the diagram format is not recognized or unsupported
      Since:
      1.14