Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Moved statics for common request params into IntravertRestUtils

  • Loading branch information...
commit b02021b97125607c0a68f93dfd7f61741dc01d8b 1 parent de0d2a9
@zznate authored
Showing with 5 additions and 27 deletions.
  1. +5 −27 src/main/java/org/usergrid/vx/handler/rest/IntravertRestUtils.java
View
32 src/main/java/org/usergrid/vx/handler/rest/IntravertRestUtils.java
@@ -23,6 +23,11 @@
*/
public static final String CONSISTENCY_LEVEL_HEADER = "X-Consistency-Level";
+ public static final String KEYSPACE = "ks";
+ public static final String COLUMN_FAMILY = "cf";
+ public static final String ROWKEY = "rawKey";
+ public static final String COLUMN = "col";
+
/**
* Returns the consistency level from the header if present. Defaults to
* {@link ConsistencyLevel#ONE} if:
@@ -50,31 +55,4 @@ public static ConsistencyLevel fromHeader(HttpServerRequest request) {
return ConsistencyLevel.ONE;
}
-
-
- /**
- * Returns the JSONObject for the event bus that represents a set operation.
- */
- public static IntraReq getReadOperation(HttpServerRequest request, Buffer buffer) {
- String ks = request.params().get(IntraHandlerRest.KEYSPACE);
- String cf = request.params().get(IntraHandlerRest.COLUMN_FAMILY);
- String row = request.params().get(IntraHandlerRest.ROWKEY);
- String col = request.params().get(IntraHandlerRest.COLUMN);
-
- IntraReq req = new IntraReq();
- if ( log.isDebugEnabled()) {
- log.debug("ReadOperation @ ks=[{}], cf=[{}], row=[{}], col=[{}]",
- new Object[]{ks, cf, row, col});
- }
-
- if (ks == null){
- log.debug("Listing keyspaces.");
- req.add(Operations.listKeyspacesOp());
- } else if (ks != null) {
- log.debug("Listing column families for [{}]",ks);
- req.add(Operations.listColumnFamilyOp(ks));
- }
- return req;
- }
-
}

0 comments on commit b02021b

Please sign in to comment.
Something went wrong with that request. Please try again.