Subversion Repositories bacoAlunos

Rev

Rev 1653 | Rev 1776 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package pt.estgp.estgweb.domain;

import com.owlike.genson.Genson;
import com.owlike.genson.TransformationException;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.IOException;

/**
 * Created by jorgemachado on 03/02/17.
 */

public class BpmnProcessImpl extends BpmnProcess
{
    static Genson genson = new Genson.Builder()
            .include(BpmnProcess.class)
            //.include(BpmnProcessStep.class)
            .create();

    public JSONObject getJsonObject() throws 1.5.0/docs/api/java/io/IOException.html">IOException, TransformationException, JSONException
    {
        return new JSONObject(genson.serialize(this));
    }

    public 1.5.0/docs/api/java/lang/String.html">String getJson() throws 1.5.0/docs/api/java/io/IOException.html">IOException, TransformationException
    {
        return genson.serialize(this);
    }
}