Mercurial > hg > Members > nobuyasu > Consensus
changeset 11:6aa0452a7f9f
add controllers/Claim.java
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/controllers/Claim.java Tue Oct 02 10:36:39 2012 +0900 @@ -0,0 +1,12 @@ +package controllers; + +import play.mvc.Controller; + +public class Claim extends Controller { + + + + + + +}
--- a/logs/application.log Mon Oct 01 20:51:36 2012 +0900 +++ b/logs/application.log Tue Oct 02 10:36:39 2012 +0900 @@ -1,12 +1,30 @@ -2012-10-01 20:21:19,930 - [INFO] - from play in main +2012-10-01 20:38:24,801 - [INFO] - from play in main Listening for HTTP on port 9000... -2012-10-01 20:21:25,058 - [INFO] - from play in play-akka.actor.default-dispatcher-3 +2012-10-01 20:38:29,153 - [INFO] - from play in play-akka.actor.default-dispatcher-1 +Application started (Dev) + +2012-10-01 20:38:58,128 - [INFO] - from application in play-akka.actor.default-dispatcher-2 +Application shutdown... + +2012-10-01 20:38:58,142 - [INFO] - from play in play-akka.actor.default-dispatcher-2 Application started (Dev) -2012-10-01 20:22:56,156 - [INFO] - from application in play-akka.actor.default-dispatcher-1 +2012-10-01 20:39:22,148 - [INFO] - from application in play-akka.actor.default-dispatcher-2 +Application shutdown... + +2012-10-01 20:39:22,161 - [INFO] - from play in play-akka.actor.default-dispatcher-2 +Application started (Dev) + +2012-10-01 20:39:40,530 - [INFO] - from application in play-akka.actor.default-dispatcher-2 Application shutdown... -2012-10-01 20:22:56,170 - [INFO] - from play in play-akka.actor.default-dispatcher-1 +2012-10-01 20:39:40,543 - [INFO] - from play in play-akka.actor.default-dispatcher-2 Application started (Dev) +2012-10-01 20:44:45,235 - [INFO] - from application in play-akka.actor.default-dispatcher-2 +Application shutdown... + +2012-10-01 20:44:45,249 - [INFO] - from play in play-akka.actor.default-dispatcher-2 +Application started (Dev) +
Binary file target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$1$$anonfun$apply$2.class has changed
Binary file target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$3$$anonfun$apply$4.class has changed
Binary file target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$5$$anonfun$apply$6.class has changed
Binary file target/scala-2.9.1/classes/controllers/ref/ReverseApplication$$anonfun$hello$1.class has changed
Binary file target/scala-2.9.1/classes/controllers/ref/ReverseApplication$$anonfun$index$1.class has changed
Binary file target/scala-2.9.1/classes/controllers/ref/ReverseAssets$$anonfun$at$1.class has changed
--- a/target/scala-2.9.1/classes/routes Mon Oct 01 20:51:36 2012 +0900 +++ b/target/scala-2.9.1/classes/routes Tue Oct 02 10:36:39 2012 +0900 @@ -7,6 +7,8 @@ PUT /users/create/:name controllers.User.create(name: String) GET /users/browse/:name controllers.User.getUser(name: String) GET /users/requests/:name controllers.User.getUserRequests(name: String) +GET /users/consensus/:name controllers.User.getUserConsensus(name: String) +GET /users/claims/:name controllers.User.getUserClaims(name: String) # test action POST /hello controllers.Application.hello()
Binary file target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$1$$anonfun$apply$2.class has changed
Binary file target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$1.class has changed
Binary file target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$3$$anonfun$apply$4.class has changed
Binary file target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$3.class has changed
Binary file target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$5$$anonfun$apply$6.class has changed
Binary file target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$5.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/javascript/ReverseApplication.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/javascript/ReverseAssets.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/ref/ReverseApplication$$anonfun$hello$1.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/ref/ReverseApplication$$anonfun$index$1.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/ref/ReverseAssets$$anonfun$at$1.class has changed
--- a/target/scala-2.9.1/src_managed/main/controllers/routes.java Mon Oct 01 20:51:36 2012 +0900 +++ b/target/scala-2.9.1/src_managed/main/controllers/routes.java Tue Oct 02 10:36:39 2012 +0900 @@ -1,6 +1,6 @@ // @SOURCE:/Users/aotokage/workspace/Consensus/conf/routes -// @HASH:8bd085826bd380a3cbbff589f55d12bed544e145 -// @DATE:Mon Oct 01 20:23:04 JST 2012 +// @HASH:2d2bd39dcc02b26740ae9e09c23564ce88dbbf35 +// @DATE:Mon Oct 01 20:46:41 JST 2012 package controllers;
--- a/target/scala-2.9.1/src_managed/main/routes_reverseRouting.scala Mon Oct 01 20:51:36 2012 +0900 +++ b/target/scala-2.9.1/src_managed/main/routes_reverseRouting.scala Tue Oct 02 10:36:39 2012 +0900 @@ -1,6 +1,6 @@ // @SOURCE:/Users/aotokage/workspace/Consensus/conf/routes -// @HASH:8bd085826bd380a3cbbff589f55d12bed544e145 -// @DATE:Mon Oct 01 20:23:04 JST 2012 +// @HASH:2d2bd39dcc02b26740ae9e09c23564ce88dbbf35 +// @DATE:Mon Oct 01 20:46:41 JST 2012 import play.core._ import play.core.Router._ @@ -12,24 +12,26 @@ import Router.queryString -// @LINE:18 -// @LINE:14 -// @LINE:13 +// @LINE:21 +// @LINE:17 +// @LINE:16 +// @LINE:11 +// @LINE:10 // @LINE:9 // @LINE:8 // @LINE:7 // @LINE:6 package controllers { -// @LINE:14 -// @LINE:13 +// @LINE:17 +// @LINE:16 // @LINE:6 class ReverseApplication { -// @LINE:14 +// @LINE:17 def test() = { Call("GET", "/test") } @@ -41,7 +43,7 @@ } -// @LINE:13 +// @LINE:16 def hello() = { Call("POST", "/hello") } @@ -52,13 +54,13 @@ } -// @LINE:18 +// @LINE:21 class ReverseAssets { -// @LINE:18 +// @LINE:21 def at(file:String) = { Call("GET", "/assets/" + implicitly[PathBindable[String]].unbind("file", file)) } @@ -69,6 +71,8 @@ } +// @LINE:11 +// @LINE:10 // @LINE:9 // @LINE:8 // @LINE:7 @@ -94,6 +98,18 @@ Call("PUT", "/users/create/" + implicitly[PathBindable[String]].unbind("name", name)) } + +// @LINE:10 +def getUserConsensus(name:String) = { + Call("GET", "/users/consensus/" + implicitly[PathBindable[String]].unbind("name", name)) +} + + +// @LINE:11 +def getUserClaims(name:String) = { + Call("GET", "/users/claims/" + implicitly[PathBindable[String]].unbind("name", name)) +} + @@ -103,24 +119,26 @@ -// @LINE:18 -// @LINE:14 -// @LINE:13 +// @LINE:21 +// @LINE:17 +// @LINE:16 +// @LINE:11 +// @LINE:10 // @LINE:9 // @LINE:8 // @LINE:7 // @LINE:6 package controllers.javascript { -// @LINE:14 -// @LINE:13 +// @LINE:17 +// @LINE:16 // @LINE:6 class ReverseApplication { -// @LINE:14 +// @LINE:17 def test = JavascriptReverseRoute( "controllers.Application.test", """ @@ -142,7 +160,7 @@ ) -// @LINE:13 +// @LINE:16 def hello = JavascriptReverseRoute( "controllers.Application.hello", """ @@ -158,13 +176,13 @@ } -// @LINE:18 +// @LINE:21 class ReverseAssets { -// @LINE:18 +// @LINE:21 def at = JavascriptReverseRoute( "controllers.Assets.at", """ @@ -180,6 +198,8 @@ } +// @LINE:11 +// @LINE:10 // @LINE:9 // @LINE:8 // @LINE:7 @@ -220,6 +240,28 @@ """ ) + +// @LINE:10 +def getUserConsensus = JavascriptReverseRoute( + "controllers.User.getUserConsensus", + """ + function(name) { + return _wA({method:"GET", url:"/users/consensus/" + (""" + implicitly[PathBindable[String]].javascriptUnbind + """)("name", name)}) + } + """ +) + + +// @LINE:11 +def getUserClaims = JavascriptReverseRoute( + "controllers.User.getUserClaims", + """ + function(name) { + return _wA({method:"GET", url:"/users/claims/" + (""" + implicitly[PathBindable[String]].javascriptUnbind + """)("name", name)}) + } + """ +) + @@ -229,24 +271,26 @@ -// @LINE:18 -// @LINE:14 -// @LINE:13 +// @LINE:21 +// @LINE:17 +// @LINE:16 +// @LINE:11 +// @LINE:10 // @LINE:9 // @LINE:8 // @LINE:7 // @LINE:6 package controllers.ref { -// @LINE:14 -// @LINE:13 +// @LINE:17 +// @LINE:16 // @LINE:6 class ReverseApplication { -// @LINE:14 +// @LINE:17 def test() = new play.api.mvc.HandlerRef( controllers.Application.test(), HandlerDef(this, "controllers.Application", "test", Seq()) ) @@ -258,7 +302,7 @@ ) -// @LINE:13 +// @LINE:16 def hello() = new play.api.mvc.HandlerRef( controllers.Application.hello(), HandlerDef(this, "controllers.Application", "hello", Seq()) ) @@ -269,13 +313,13 @@ } -// @LINE:18 +// @LINE:21 class ReverseAssets { -// @LINE:18 +// @LINE:21 def at(path:String, file:String) = new play.api.mvc.HandlerRef( controllers.Assets.at(path, file), HandlerDef(this, "controllers.Assets", "at", Seq(classOf[String], classOf[String])) ) @@ -286,6 +330,8 @@ } +// @LINE:11 +// @LINE:10 // @LINE:9 // @LINE:8 // @LINE:7 @@ -311,6 +357,18 @@ controllers.User.create(name), HandlerDef(this, "controllers.User", "create", Seq(classOf[String])) ) + +// @LINE:10 +def getUserConsensus(name:String) = new play.api.mvc.HandlerRef( + controllers.User.getUserConsensus(name), HandlerDef(this, "controllers.User", "getUserConsensus", Seq(classOf[String])) +) + + +// @LINE:11 +def getUserClaims(name:String) = new play.api.mvc.HandlerRef( + controllers.User.getUserClaims(name), HandlerDef(this, "controllers.User", "getUserClaims", Seq(classOf[String])) +) +
--- a/target/scala-2.9.1/src_managed/main/routes_routing.scala Mon Oct 01 20:51:36 2012 +0900 +++ b/target/scala-2.9.1/src_managed/main/routes_routing.scala Tue Oct 02 10:36:39 2012 +0900 @@ -1,6 +1,6 @@ // @SOURCE:/Users/aotokage/workspace/Consensus/conf/routes -// @HASH:8bd085826bd380a3cbbff589f55d12bed544e145 -// @DATE:Mon Oct 01 20:23:04 JST 2012 +// @HASH:2d2bd39dcc02b26740ae9e09c23564ce88dbbf35 +// @DATE:Mon Oct 01 20:46:41 JST 2012 import play.core._ import play.core.Router._ @@ -30,18 +30,26 @@ val controllers_User_getUserRequests3 = Route("GET", PathPattern(List(StaticPart("/users/requests/"),DynamicPart("name", """[^/]+""")))) -// @LINE:13 -val controllers_Application_hello4 = Route("POST", PathPattern(List(StaticPart("/hello")))) +// @LINE:10 +val controllers_User_getUserConsensus4 = Route("GET", PathPattern(List(StaticPart("/users/consensus/"),DynamicPart("name", """[^/]+""")))) + + +// @LINE:11 +val controllers_User_getUserClaims5 = Route("GET", PathPattern(List(StaticPart("/users/claims/"),DynamicPart("name", """[^/]+""")))) -// @LINE:14 -val controllers_Application_test5 = Route("GET", PathPattern(List(StaticPart("/test")))) +// @LINE:16 +val controllers_Application_hello6 = Route("POST", PathPattern(List(StaticPart("/hello")))) -// @LINE:18 -val controllers_Assets_at6 = Route("GET", PathPattern(List(StaticPart("/assets/"),DynamicPart("file", """.+""")))) +// @LINE:17 +val controllers_Application_test7 = Route("GET", PathPattern(List(StaticPart("/test")))) -def documentation = List(("""GET""","""/""","""controllers.Application.index()"""),("""PUT""","""/users/create/$name<[^/]+>""","""controllers.User.create(name:String)"""),("""GET""","""/users/browse/$name<[^/]+>""","""controllers.User.getUser(name:String)"""),("""GET""","""/users/requests/$name<[^/]+>""","""controllers.User.getUserRequests(name:String)"""),("""POST""","""/hello""","""controllers.Application.hello()"""),("""GET""","""/test""","""controllers.Application.test()"""),("""GET""","""/assets/$file<.+>""","""controllers.Assets.at(path:String = "/public", file:String)""")) + +// @LINE:21 +val controllers_Assets_at8 = Route("GET", PathPattern(List(StaticPart("/assets/"),DynamicPart("file", """.+""")))) + +def documentation = List(("""GET""","""/""","""controllers.Application.index()"""),("""PUT""","""/users/create/$name<[^/]+>""","""controllers.User.create(name:String)"""),("""GET""","""/users/browse/$name<[^/]+>""","""controllers.User.getUser(name:String)"""),("""GET""","""/users/requests/$name<[^/]+>""","""controllers.User.getUserRequests(name:String)"""),("""GET""","""/users/consensus/$name<[^/]+>""","""controllers.User.getUserConsensus(name:String)"""),("""GET""","""/users/claims/$name<[^/]+>""","""controllers.User.getUserClaims(name:String)"""),("""POST""","""/hello""","""controllers.Application.hello()"""),("""GET""","""/test""","""controllers.Application.test()"""),("""GET""","""/assets/$file<.+>""","""controllers.Assets.at(path:String = "/public", file:String)""")) def routes:PartialFunction[RequestHeader,Handler] = { @@ -78,24 +86,40 @@ } -// @LINE:13 -case controllers_Application_hello4(params) => { +// @LINE:10 +case controllers_User_getUserConsensus4(params) => { + call(params.fromPath[String]("name", None)) { (name) => + invokeHandler(_root_.controllers.User.getUserConsensus(name), HandlerDef(this, "controllers.User", "getUserConsensus", Seq(classOf[String]))) + } +} + + +// @LINE:11 +case controllers_User_getUserClaims5(params) => { + call(params.fromPath[String]("name", None)) { (name) => + invokeHandler(_root_.controllers.User.getUserClaims(name), HandlerDef(this, "controllers.User", "getUserClaims", Seq(classOf[String]))) + } +} + + +// @LINE:16 +case controllers_Application_hello6(params) => { call { invokeHandler(_root_.controllers.Application.hello(), HandlerDef(this, "controllers.Application", "hello", Nil)) } } -// @LINE:14 -case controllers_Application_test5(params) => { +// @LINE:17 +case controllers_Application_test7(params) => { call { invokeHandler(_root_.controllers.Application.test(), HandlerDef(this, "controllers.Application", "test", Nil)) } } -// @LINE:18 -case controllers_Assets_at6(params) => { +// @LINE:21 +case controllers_Assets_at8(params) => { call(Param[String]("path", Right("/public")), params.fromPath[String]("file", None)) { (path, file) => invokeHandler(_root_.controllers.Assets.at(path, file), HandlerDef(this, "controllers.Assets", "at", Seq(classOf[String], classOf[String]))) }
--- a/target/streams/compile/compile/$global/out Mon Oct 01 20:51:36 2012 +0900 +++ b/target/streams/compile/compile/$global/out Tue Oct 02 10:36:39 2012 +0900 @@ -1,1 +1,1 @@ -[0m[[0minfo[0m] [0mCompiling 2 Scala sources and 1 Java source to /Users/aotokage/workspace/Consensus/target/scala-2.9.1/classes...[0m +[0m[[0minfo[0m] [0mCompiling 1 Java source to /Users/aotokage/workspace/Consensus/target/scala-2.9.1/classes...[0m