Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
What the branch says biotches part @
- Loading branch information
1 parent
70da299
commit 73ab3bb
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/main/java/org/usergrid/vx/server/operations/ComponentSelectHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.usergrid.vx.server.operations; | ||
|
||
import java.util.Set; | ||
|
||
import org.vertx.java.core.Handler; | ||
import org.vertx.java.core.eventbus.Message; | ||
import org.vertx.java.core.json.JsonObject; | ||
|
||
public class ComponentSelectHandler implements Handler<Message<JsonObject>>{ | ||
|
||
/* | ||
Set<String> parts = (Set<String>) op.getOp().get("components"); | ||
state.components = parts; | ||
*/ | ||
|
||
@Override | ||
public void handle(Message<JsonObject> event) { | ||
Integer id = event.body.getInteger("id"); | ||
JsonObject params = event.body.getObject("op"); | ||
JsonObject state = event.body.getObject("state"); | ||
//state.putBoolean("autotimestamp", params.getBoolean("autotimestamp")); | ||
System.out.println ("components is "+params.getArray("components")); | ||
state.putArray("components", params.getArray("components")); | ||
event.reply(new JsonObject() | ||
.putString(id.toString(), "OK") | ||
.putObject("state", state) | ||
); | ||
|
||
} | ||
|
||
} |