package uk.me.graphe.server.messages;

import org.json.JSONException;
import org.json.JSONObject;

public class StateIdMessage extends Message {

    private int mGraph, mState;
    
    public StateIdMessage(int graph, int state) {
        mState = state;
        mGraph = graph;
    }
    
    @Override
    public String toJson() {
        JSONObject jso = new JSONObject();
        try {
            jso.put("message", this.getMessage());
            jso.put("graph", mGraph);
            jso.put("state", mState);
            return jso.toString();
        } catch (JSONException jse) {
            throw new Error(jse);
        }
    }

    @Override
    public String getMessage() {
        return "updateStateId";
    }

}

@@ -722,10 +722,132 @@
 %0A    %7D%0A%0A
+    public int getGraphId() %7B%0A        return mGraph;%0A    %7D%0A    %0A    public int getState() %7B%0A        return mState;%0A    %7D%0A%0A
 %7D%0A

add getters on the properties of stateid message