public class TablesApiRequestImpl extends ApiRequestImpl implements TablesApiRequest
asyncAfter, builder, COMMA_AFTER_BRACKET_PATTERN, format, pagination, paginationParameters, uriInfoREQUEST_MAPPER_NAMESPACEASYNCHRONOUS_ASYNC_AFTER_VALUE, SYNCHRONOUS_ASYNC_AFTER_VALUE| Constructor and Description |
|---|
TablesApiRequestImpl(String tableName,
String granularity,
String format,
String perPage,
String page,
javax.ws.rs.core.UriInfo uriInfo,
BardConfigResources bardConfigResources)
Parses the API request URL and generates the Api Request object.
|
TablesApiRequestImpl(String tableName,
String granularity,
String format,
String perPage,
String page,
javax.ws.rs.core.UriInfo uriInfo,
BardConfigResources bardConfigResources,
List<javax.ws.rs.core.PathSegment> dimensions,
String metrics,
String intervals,
String filters,
String timeZoneId)
Parses the API request URL and generates the API Request object with specified query constraints, i.e.
|
| Modifier and Type | Method and Description |
|---|---|
protected LinkedHashSet<LogicalMetric> |
generateLogicalMetrics(String apiMetricQuery,
MetricDictionary metricDictionary)
Extracts the list of metrics from the url metric query string and generates a set of LogicalMetrics.
|
protected Set<LogicalTable> |
generateTables(String tableName,
LogicalTableDictionary tableDictionary)
Extracts the list of logical table names from the url table path segment and generates a set of logical table
objects based on it.
|
ApiFilters |
getApiFilters()
Returns a map of filters by dimension for this request, grouped by dimensions.
|
Set<Dimension> |
getDimensions()
Returns the set of grouping dimensions on this request.
|
Set<Dimension> |
getFilterDimensions()
Returns the dimensions used in filters on this request.
|
Granularity |
getGranularity()
Returns the grain to group the results of this request.
|
Set<org.joda.time.Interval> |
getIntervals()
Returns the intervals for this query.
|
Set<LogicalMetric> |
getLogicalMetrics()
Returns the logical metrics requested in this query.
|
LogicalTable |
getTable()
Returns the LogicalTable requested in the table API request URL.
|
Set<LogicalTable> |
getTables()
Returns a set of LogicalTables associated with a table API request.
|
TablesApiRequest |
withBuilder(javax.ws.rs.core.Response.ResponseBuilder builder) |
TablesApiRequest |
withDimensions(Set<Dimension> dimensions) |
TablesApiRequest |
withFilters(Map<Dimension,Set<ApiFilter>> filters) |
TablesApiRequest |
withFormat(ResponseFormatType format) |
TablesApiRequest |
withGranularity(Set<LogicalTable> tables) |
TablesApiRequest |
withIntervals(Set<org.joda.time.Interval> intervals) |
TablesApiRequest |
withMetrics(Set<LogicalMetric> logicalMetrics) |
TablesApiRequest |
withPaginationParameters(Optional<PaginationParameters> paginationParameters) |
TablesApiRequest |
withTable(LogicalTable table) |
TablesApiRequest |
withTables(Granularity granularity) |
TablesApiRequest |
withTables(Set<LogicalTable> tables) |
TablesApiRequest |
withUriInfo(javax.ws.rs.core.UriInfo uriInfo) |
addPageLink, addPageLink, generateAcceptFormat, generateAsyncAfter, generateDimensions, generateFilters, generateGranularity, generateGranularity, generateIntervals, generateIntervals, generateMetricName, generatePaginationParameters, generateTable, generateTimeZone, getAllPagesPaginationFactory, getAsDateTime, getAsyncAfter, getBuilder, getDefaultPagination, getFormat, getPage, getPage, getPagination, getPaginationParameters, getUriInfo, validateMetrics, validateRequestDimensions, validateTimeAlignmentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgenerateDateTimeFormatter, getAsyncAfter, getBuilder, getDefaultPagination, getFormat, getPage, getPage, getPagination, getPaginationParameters, getUriInfopublic TablesApiRequestImpl(String tableName, String granularity, String format, @NotNull String perPage, @NotNull String page, javax.ws.rs.core.UriInfo uriInfo, BardConfigResources bardConfigResources) throws BadApiRequestException
tableName - logical table corresponding to the table name specified in the URLgranularity - string time granularity in URL
((field name and operation):((multiple values bounded by [])or(single value))))(followed by , or end of string)
format - response data format JSON or CSV. Default is JSON.perPage - number of rows to display per page of results. If present in the original request,
must be a positive integer. If not present, must be the empty string.page - desired page of results. If present in the original request, must be a positive
integer. If not present, must be the empty string.uriInfo - The URI of the request object.bardConfigResources - The configuration resources used to build this api requestBadApiRequestException - is thrown in the following scenarios:
public TablesApiRequestImpl(String tableName, String granularity, String format, @NotNull String perPage, @NotNull String page, javax.ws.rs.core.UriInfo uriInfo, BardConfigResources bardConfigResources, List<javax.ws.rs.core.PathSegment> dimensions, String metrics, String intervals, String filters, String timeZoneId) throws BadApiRequestException
tableName - Logical table corresponding to the table name specified in the URLgranularity - Requested time granularityformat - Response data format JSON or CSV. Default is JSON.perPage - Number of rows to display per page of results. It must represent a positive integer or an empty
string if it's not specifiedpage - Desired page of results. It must represent a positive integer or an empty
string if it's not specifieduriInfo - The URI of the requestbardConfigResources - The configuration resources used to build this API requestdimensions - Grouping dimensions / Dimension constraintmetrics - Metrics constraintintervals - Data / Time constraintfilters - Filter constrainttimeZoneId - A joda time zone idBadApiRequestException - on
protected Set<LogicalTable> generateTables(String tableName, LogicalTableDictionary tableDictionary) throws BadApiRequestException
tableName - logical table corresponding to the table name specified in the URLtableDictionary - Logical table dictionary contains the map of valid table names and table objects.BadApiRequestException - if an invalid table is requested or the logical table dictionary is empty.protected LinkedHashSet<LogicalMetric> generateLogicalMetrics(String apiMetricQuery, MetricDictionary metricDictionary) throws BadApiRequestException
generateLogicalMetrics in class ApiRequestImplapiMetricQuery - URL query string containing the metrics separated by ','.metricDictionary - Metric dictionary contains the map of valid metric names and logical metric objects.BadApiRequestException - if the metric dictionary returns a null or if the apiMetricQuery is invalid.public Set<LogicalTable> getTables()
TablesApiRequestgetTables in interface TablesApiRequestpublic LogicalTable getTable()
TablesApiRequestgetTable in interface TablesApiRequestpublic Granularity getGranularity()
TablesApiRequestgetGranularity in interface TablesApiRequestpublic Set<Dimension> getDimensions()
TablesApiRequestgetDimensions in interface TablesApiRequestpublic Set<Dimension> getFilterDimensions()
TablesApiRequestgetFilterDimensions in interface TablesApiRequestpublic ApiFilters getApiFilters()
TablesApiRequestgetApiFilters in interface TablesApiRequestpublic Set<org.joda.time.Interval> getIntervals()
TablesApiRequestgetIntervals in interface TablesApiRequestpublic Set<LogicalMetric> getLogicalMetrics()
TablesApiRequestgetLogicalMetrics in interface TablesApiRequestpublic TablesApiRequest withFormat(ResponseFormatType format)
withFormat in interface TablesApiRequestpublic TablesApiRequest withPaginationParameters(Optional<PaginationParameters> paginationParameters)
withPaginationParameters in interface TablesApiRequestpublic TablesApiRequest withUriInfo(javax.ws.rs.core.UriInfo uriInfo)
withUriInfo in interface TablesApiRequestpublic TablesApiRequest withBuilder(javax.ws.rs.core.Response.ResponseBuilder builder)
withBuilder in interface TablesApiRequestpublic TablesApiRequest withTables(Set<LogicalTable> tables)
withTables in interface TablesApiRequestpublic TablesApiRequest withTable(LogicalTable table)
withTable in interface TablesApiRequestpublic TablesApiRequest withGranularity(Set<LogicalTable> tables)
withGranularity in interface TablesApiRequestpublic TablesApiRequest withTables(Granularity granularity)
withTables in interface TablesApiRequestpublic TablesApiRequest withDimensions(Set<Dimension> dimensions)
withDimensions in interface TablesApiRequestpublic TablesApiRequest withMetrics(Set<LogicalMetric> logicalMetrics)
withMetrics in interface TablesApiRequestpublic TablesApiRequest withIntervals(Set<org.joda.time.Interval> intervals)
withIntervals in interface TablesApiRequestpublic TablesApiRequest withFilters(Map<Dimension,Set<ApiFilter>> filters)
withFilters in interface TablesApiRequestCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.