Extension:PlantUML

The PlantUML extension allows to easily add UML diagrams into Wiki using a simple text description.

The following diagrams are available:
 * sequence diagram,
 * use case diagram,
 * class diagram,
 * activity diagram,
 * component diagram,
 * state diagram

The language is explained in this document: Language Reference Guide.pdf

Usage
Just put a PlantUML model description between the tag.

Attributes

 * redraw
 * force diagram to be redrawn by deleting cached image.

Example1
Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response

Example2
skinparam usecaseBackgroundColor DarkSeaGreen skinparam usecaseArrowColor Olive skinparam actorBorderColor black skinparam usecaseBorderColor DarkSlateGray skinparam usecaseActorFontName Courier

User << Human >>
 * Main Database: as MySql << Application >>

(Start) << One Shot >> (Use the application) as (Use) << Main >>

User -> (Start) User --> (Use) MySql --> (Use)

Example3
package "Classic Collections" #DDDDDD Object <|-- ArrayList

package net.sourceforge.plantuml Object <|-- DemoTY Demo1 *- Demo2

Installation
The code of the extension is available here.


 * On Windows, you must set the read & execute permissions on C:\Windows\system32\cmd.exe for the account the PHP web service extension is running under. PHP needs those permissions to "fork" other process.
 * If using WAMP (and possibly other stacks) on Windows, you must set the "wampapache" service to "Allow service to interact with desktop".

In order to install this plugin, please follow the steps below.

1. Go to the extensions folder of your MediaWiki installation. On RedHat and derivates this will be /usr/share/mediawiki/extensions. # cd /usr/share/mediawiki/extensions

2. Create a new subdirectory PlantUML in this folder and move to this directory.
 * 1) mkdir PlantUML && cd PlantUML

3. Move the PlantUML.php file into the PlantUML directory.
 * 1) mv /PlantUML.php.

4. Choose your usage style. You can either process images locally (on the server where MediaWiki was installed) or in the cloud. The local version supports SVG-images and embedded urls, at the cost of local processing. The cloud version is lightweight for your server, but does not support embedded urls (yet) and is (still) stuck with PNG-images. Default local processing is expected. If you want to use the cloud, please edit the PlantUML.php file and change $usecloud to true.

5. When using local processing: get the plantuml.jar from SourceForge 6. (Optional) Edit PlantUML.php and change the variable $plantumlImagetype to your preference. Mind that SVG produces the superior graphics, but that only PNG-images and image maps are "rock solid". If you use the cloud, it will always generate PNG images. Local processing defaults to SVG.
 * 1) wget https://downloads.sourceforge.net/project/plantuml/plantuml.jar

7. (Optional) Adapt the getUploadPath and getUploadDirectory to your preference if you want these different from MediaWiki's standard settings. Mind that these directories must be writeable by the system user who runs MediaWiki.

8. Put the following line near the end of your LocalSettings.php in MediaWiki's root folder to include the extension:

require_once('extensions/PlantUML/PlantUML.php');

9. When using the cloud, make sure that httpd can submit HTTP-requests.

10. Reload http
 * 1) service httpd graceful