Rev 1653 | Rev 1776 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1653 | jmachado | 1 | package pt.estgp.estgweb.domain; |
2 | |||
1670 | jmachado | 3 | import com.owlike.genson.Genson; |
4 | import com.owlike.genson.TransformationException; |
||
5 | import org.json.JSONException; |
||
6 | import org.json.JSONObject; |
||
7 | |||
8 | import java.io.IOException; |
||
9 | |||
1653 | jmachado | 10 | /** |
11 | * Created by jorgemachado on 03/02/17. |
||
12 | */ |
||
1670 | jmachado | 13 | public class BpmnProcessImpl extends BpmnProcess |
14 | { |
||
15 | static Genson genson = new Genson.Builder() |
||
16 | .include(BpmnProcess.class) |
||
17 | //.include(BpmnProcessStep.class) |
||
18 | .create(); |
||
19 | |||
20 | public JSONObject getJsonObject() throws 1.5.0/docs/api/java/io/IOException.html">IOException, TransformationException, JSONException |
||
21 | { |
||
22 | return new JSONObject(genson.serialize(this)); |
||
23 | } |
||
24 | |||
25 | public 1.5.0/docs/api/java/lang/String.html">String getJson() throws 1.5.0/docs/api/java/io/IOException.html">IOException, TransformationException |
||
26 | { |
||
27 | return genson.serialize(this); |
||
28 | } |
||
1653 | jmachado | 29 | } |