Package com.xwiki.diagram.script
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.ScriptServiceScript services for the Diagram application.- Since:
- 1.14
- Version:
- $Id$
-
-
Constructor Summary
Constructors Constructor Description DiagramScriptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <S extends org.xwiki.script.service.ScriptService>
Sget(String serviceName)StringimportDiagram(String diagram, String fileName)Attempts to convert the given diagram from a third party format to the draw.io format.
-
-
-
Field Detail
-
ROLEHINT
public static final String ROLEHINT
The role hint of this component.- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public <S extends org.xwiki.script.service.ScriptService> S get(String serviceName)
- Type Parameters:
S- the type of theScriptService- Parameters:
serviceName- the name of the subScriptService- Returns:
- the
ScriptServiceor 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 formatfileName- the diagram file name, used to detect the diagram type- Returns:
- the diagram XML in draw.io format, or
nullif the diagram format is not recognized or unsupported - Since:
- 1.14
-
-