# HG changeset patch # User one # Date 1349078356 -32400 # Node ID cb0baf8080473af88312e0876ce4f3b3765e9a88 # Parent d0ee9edfff286bf2657f6876a5bc44e8ff359a38 modified Application.java diff -r d0ee9edfff28 -r cb0baf808047 .classpath --- a/.classpath Mon Oct 01 16:39:19 2012 +0900 +++ b/.classpath Mon Oct 01 16:59:16 2012 +0900 @@ -1,99 +1,98 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r d0ee9edfff28 -r cb0baf808047 .settings/org.scala-ide.sdt.core.prefs --- a/.settings/org.scala-ide.sdt.core.prefs Mon Oct 01 16:39:19 2012 +0900 +++ b/.settings/org.scala-ide.sdt.core.prefs Mon Oct 01 16:59:16 2012 +0900 @@ -1,5 +1,5 @@ #Generated by sbteclipse -#Mon Oct 01 16:31:59 JST 2012 +#Mon Oct 01 16:58:56 JST 2012 Xcheckinit=true deprecation=true encoding=utf8 diff -r d0ee9edfff28 -r cb0baf808047 app/controllers/Application.java --- a/app/controllers/Application.java Mon Oct 01 16:39:19 2012 +0900 +++ b/app/controllers/Application.java Mon Oct 01 16:59:16 2012 +0900 @@ -26,7 +26,6 @@ @BodyParser.Of(BodyParser.Json.class) public static Result hello() { - JsonNode json = request().body().asJson(); ObjectNode result = Json.newObject(); String name = json.findPath("name").getTextValue(); @@ -40,8 +39,15 @@ return ok(result); } - - } + public static Result create() { + String name = "test"; + System.out.println("name = "+name); + + + return ok(name); + } + + } diff -r d0ee9edfff28 -r cb0baf808047 app/controllers/User.java --- a/app/controllers/User.java Mon Oct 01 16:39:19 2012 +0900 +++ b/app/controllers/User.java Mon Oct 01 16:59:16 2012 +0900 @@ -6,10 +6,11 @@ public class User extends Controller { public static Result create() { + String name = "test"; + System.out.println("name = "+name); - - return ok(); + return ok(name); } diff -r d0ee9edfff28 -r cb0baf808047 app/models/NodeModel.java --- a/app/models/NodeModel.java Mon Oct 01 16:39:19 2012 +0900 +++ b/app/models/NodeModel.java Mon Oct 01 16:59:16 2012 +0900 @@ -3,9 +3,6 @@ import java.util.HashMap; import java.util.Iterator; -import org.json.JSONException; -import org.json.JSONObject; - import com.tinkerpop.blueprints.Vertex; public class NodeModel { @@ -39,13 +36,12 @@ final String MAJORITY = "majority"; final String UNANIMOUSLY = "unanimously"; - JSONObject properties = new JSONObject(); public NodeModel(Vertex vertex) { this.vertex = vertex; this.id = vertex.getId(); } - +/* public JSONObject getProperties() throws JSONException { for (String key: vertex.getPropertyKeys() ) { properties.put(key, vertex.getProperty(key)); @@ -89,6 +85,6 @@ jobj.put("data", this.properties); return jobj; } - +*/ } diff -r d0ee9edfff28 -r cb0baf808047 conf/routes --- a/conf/routes Mon Oct 01 16:39:19 2012 +0900 +++ b/conf/routes Mon Oct 01 16:59:16 2012 +0900 @@ -4,7 +4,8 @@ # Home page GET / controllers.Application.index() -POST /db/data/node controllers.Application.hello() +POST /db/data/node controllers.Application.hello() +GET /users/create/:name controllers.Application.create() # Map static resources from the /public folder to the /assets URL path diff -r d0ee9edfff28 -r cb0baf808047 logs/application.log --- a/logs/application.log Mon Oct 01 16:39:19 2012 +0900 +++ b/logs/application.log Mon Oct 01 16:59:16 2012 +0900 @@ -1,6 +1,6 @@ -2012-10-01 16:33:22,607 - [INFO] - from play in main +2012-10-01 16:58:36,764 - [INFO] - from play in main Listening for HTTP on port 9000... -2012-10-01 16:33:29,036 - [INFO] - from play in play-akka.actor.default-dispatcher-3 +2012-10-01 16:58:44,078 - [INFO] - from play in play-akka.actor.default-dispatcher-2 Application started (Dev) diff -r d0ee9edfff28 -r cb0baf808047 target/.history --- a/target/.history Mon Oct 01 16:39:19 2012 +0900 +++ b/target/.history Mon Oct 01 16:59:16 2012 +0900 @@ -12,3 +12,9 @@ play debug help run +~ compile +~ run +~ test +~ run +run +eclipsify diff -r d0ee9edfff28 -r cb0baf808047 target/scala-2.9.1/cache/compile/compile Binary file target/scala-2.9.1/cache/compile/compile has changed diff -r d0ee9edfff28 -r cb0baf808047 target/scala-2.9.1/cache/compile/copy-resources Binary file target/scala-2.9.1/cache/compile/copy-resources has changed diff -r d0ee9edfff28 -r cb0baf808047 target/scala-2.9.1/classes/controllers/Application.class Binary file target/scala-2.9.1/classes/controllers/Application.class has changed diff -r d0ee9edfff28 -r cb0baf808047 target/scala-2.9.1/classes/routes --- a/target/scala-2.9.1/classes/routes Mon Oct 01 16:39:19 2012 +0900 +++ b/target/scala-2.9.1/classes/routes Mon Oct 01 16:59:16 2012 +0900 @@ -4,7 +4,8 @@ # Home page GET / controllers.Application.index() -POST /db/data/node controllers.Application.hello() +POST /db/data/node controllers.Application.hello() +GET /users/create/:name controllers.Application.create() # Map static resources from the /public folder to the /assets URL path diff -r d0ee9edfff28 -r cb0baf808047 target/streams/compile/compile/$global/out --- a/target/streams/compile/compile/$global/out Mon Oct 01 16:39:19 2012 +0900 +++ b/target/streams/compile/compile/$global/out Mon Oct 01 16:59:16 2012 +0900 @@ -1,1 +0,0 @@ -[info] Compiling 1 Java source to /Users/aotokage/workspace/Consensus/target/scala-2.9.1/classes...