Package org.jbpm.designer.server.diagram
Class DiagramBuilder
- java.lang.Object
-
- org.jbpm.designer.server.diagram.DiagramBuilder
-
public class DiagramBuilder extends Object
-
-
Constructor Summary
Constructors Constructor Description DiagramBuilder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HashMap<String,org.json.JSONObject>
flatRessources(org.json.JSONObject object)
Prepare a model JSON for analyze, resolves the hierarchical structure creates a HashMap which contains all resourceIds as keys and for each key the JSONObject, all id are keys of this mapstatic Diagram
parseJson(String json)
static Diagram
parseJson(String json, Boolean keepGlossaryLink)
Parse the json string to the diagram model, assumes that the json is hierarchical orderedstatic Diagram
parseJson(org.json.JSONObject json)
static Diagram
parseJson(org.json.JSONObject json, Boolean keepGlossaryLink)
do the parsing on an JSONObject, assumes that the json is hierarchical ordered, so all shapes are reachable over child relations
-
-
-
Method Detail
-
parseJson
public static Diagram parseJson(String json) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseJson
public static Diagram parseJson(String json, Boolean keepGlossaryLink) throws org.json.JSONException
Parse the json string to the diagram model, assumes that the json is hierarchical ordered- Parameters:
json
-- Returns:
- Model with all shapes defined in JSON
- Throws:
org.json.JSONException
-
parseJson
public static Diagram parseJson(org.json.JSONObject json) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseJson
public static Diagram parseJson(org.json.JSONObject json, Boolean keepGlossaryLink) throws org.json.JSONException
do the parsing on an JSONObject, assumes that the json is hierarchical ordered, so all shapes are reachable over child relations- Parameters:
json
- hierarchical JSON object- Returns:
- Model with all shapes defined in JSON
- Throws:
org.json.JSONException
-
flatRessources
public static HashMap<String,org.json.JSONObject> flatRessources(org.json.JSONObject object) throws org.json.JSONException
Prepare a model JSON for analyze, resolves the hierarchical structure creates a HashMap which contains all resourceIds as keys and for each key the JSONObject, all id are keys of this map- Parameters:
object
-- Returns:
- a HashMap keys: all ressourceIds values: all child JSONObjects
- Throws:
org.json.JSONException
-
-