Skip to content

Commit

Permalink
Have Table Endpoint Filter Using Dimensions, Metrics, and Filters to …
Browse files Browse the repository at this point in the history
…Display Availability
  • Loading branch information
QubitPi committed Jul 21, 2017
1 parent 9e2a0e2 commit 2dcf411
Showing 1 changed file with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
Expand All @@ -51,6 +52,7 @@
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.PathSegment;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;

Expand Down Expand Up @@ -256,6 +258,40 @@ public Response getTableByGrain(
}
}

@GET
@Timed
@Produces(MediaType.APPLICATION_JSON)
@Path("/{tableName}/{granularity}/{dimensions:.*}")
public void getTableAvailability(
@PathParam("tableName") String tableName,
@PathParam("granularity") String granularity,
@PathParam("dimensions") List<PathSegment> dimensions,
@QueryParam("metrics") String metrics,
@QueryParam("dateTime") String intervals,
@QueryParam("filters") String filters,
@Context UriInfo uriInfo,
@Context final ContainerRequestContext containerRequestContext
) {
RequestLog.startTiming(this);
RequestLog.record(new TableRequest(tableName, granularity));

TablesApiRequest tablesApiRequest = new TablesApiRequest(
tableName,
granularity,
null,
"",
"",
uriInfo,
this,
dimensions,
metrics,
intervals,
filters,
null
);
}


/**
* Get all the tables full view.
*
Expand Down

0 comments on commit 2dcf411

Please sign in to comment.