Modify pom file
[nemo.git] / nemo-tools / eclipse-plugin-project / nemo-rest / org.opendaylight.nemo.tool.eclipse.plugin.rest / src / org / opendaylight / nemo / tool / eclipse / plugin / rest / actions / model / NemoInput2.java
1 package org.opendaylight.nemo.tool.eclipse.plugin.rest.actions.model;
2
3 import org.json.JSONArray;
4 import org.json.JSONObject;
5
6 /**
7  * Created by hj on 10/29/15.
8  */
9 public class NemoInput2 implements INemoInput {
10         private User user;
11         private String nemo;
12
13         public NemoInput2(User user, String nemo) {
14                 this.user = user;
15                 this.nemo = nemo;
16         }
17
18         @Override
19         public String toJsonFormatString() {
20                 JSONObject dataJs = new JSONObject();
21                 JSONObject inputValueJson = new JSONObject();
22                 inputValueJson.put("user-id", user.getUser_id());
23                 inputValueJson.put("nemo-statement", nemo);
24                 dataJs.put("input", inputValueJson);
25                 return dataJs.toString();
26
27         }
28 }