@Override public JSONObject toJson() throws JSONException { JSONObject stencil = new JSONObject(); stencil.put("id", "AND_Gateway"); JSONArray outgoing = JpdlToJson.getTransitions(outgoings); JSONObject properties = new JSONObject(); properties.put("bgcolor", "#ffffff"); if (name != null) properties.put("name", name); JSONArray childShapes = new JSONArray(); return JpdlToJson.createJsonObject( uuid, stencil, outgoing, properties, childShapes, bounds.toJson()); }
@Override public JSONObject toJson() throws JSONException { JSONObject stencil = new JSONObject(); stencil.put("id", "hql"); JSONArray outgoing = JpdlToJson.getTransitions(outgoings); JSONObject properties = new JSONObject(); properties.put("bgcolor", "#ffffcc"); if (name != null) properties.put("name", name); if (var != null) properties.put("var", var); if (unique != null) properties.put("unique", unique.toString()); if (query != null) properties.put("query", query); if (parameters != null) properties.put("parameters", parameters.toJson()); JSONArray childShapes = new JSONArray(); return JpdlToJson.createJsonObject( uuid, stencil, outgoing, properties, childShapes, bounds.toJson()); }
@Override public JSONObject toJson() throws JSONException { JSONObject stencil = new JSONObject(); stencil.put("id", "Task"); JSONArray outgoing = JpdlToJson.getTransitions(outgoings); JSONObject properties = new JSONObject(); properties.put("bgcolor", "#ffffcc"); if (name != null) properties.put("name", name); if (assignee != null) properties.put("assignee", assignee); if (candidateGroups != null) properties.put("candidate-groups", candidateGroups); if (candidateUsers != null) properties.put("candidate-users", candidateUsers); if (swimlane != null) properties.put("swimlane", swimlane); JSONArray childShapes = new JSONArray(); return JpdlToJson.createJsonObject( uuid, stencil, outgoing, properties, childShapes, bounds.toJson()); }
@Override public JSONObject toJson() throws JSONException { JSONObject stencil = new JSONObject(); stencil.put("id", "esb"); JSONArray outgoing = JpdlToJson.getTransitions(outgoings); JSONObject properties = new JSONObject(); properties.put("bgcolor", "#ffffcc"); if (name != null) properties.put("name", name); if (category != null) properties.put("category", category); if (service != null) properties.put("service", service); // TODO add parts JSONArray childShapes = new JSONArray(); return JpdlToJson.createJsonObject( uuid, stencil, outgoing, properties, childShapes, bounds.toJson()); }