public class DimensionsApiRequestImpl extends ApiRequestImpl implements DimensionsApiRequest
asyncAfter, builder, COMMA_AFTER_BRACKET_PATTERN, format, pagination, paginationParameters, uriInfo
REQUEST_MAPPER_NAMESPACE
ASYNCHRONOUS_ASYNC_AFTER_VALUE, SYNCHRONOUS_ASYNC_AFTER_VALUE
Constructor and Description |
---|
DimensionsApiRequestImpl(String dimension,
String filters,
String format,
String perPage,
String page,
DimensionDictionary dimensionDictionary,
javax.ws.rs.core.UriInfo uriInfo)
Parses the API request URL and generates the Api Request object.
|
addPageLink, addPageLink, generateAcceptFormat, generateAsyncAfter, generateDimensions, generateFilters, generateGranularity, generateGranularity, generateIntervals, generateIntervals, generateLogicalMetrics, generateMetricName, generatePaginationParameters, generateTable, generateTimeZone, getAllPagesPaginationFactory, getAsDateTime, getAsyncAfter, getBuilder, getDefaultPagination, getFormat, getPage, getPage, getPagination, getPaginationParameters, getUriInfo, validateMetrics, validateRequestDimensions, validateTimeAlignment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateDateTimeFormatter, getAsyncAfter, getBuilder, getDefaultPagination, getFormat, getPage, getPage, getPagination, getPaginationParameters, getUriInfo
public DimensionsApiRequestImpl(String dimension, String filters, String format, @NotNull String perPage, @NotNull String page, DimensionDictionary dimensionDictionary, javax.ws.rs.core.UriInfo uriInfo) throws BadApiRequestException
dimension
- single dimension URLfilters
- URL filter query String in the format:
((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.dimensionDictionary
- cache containing all the valid dimension objects.uriInfo
- The URI of the request object.BadApiRequestException
- is thrown in the following scenarios:
protected LinkedHashSet<Dimension> generateDimensions(String apiDimension, DimensionDictionary dimensionDictionary) throws BadApiRequestException
apiDimension
- Dimension string from the URL.dimensionDictionary
- Dimension dictionary contains the map of valid dimension names and dimension objects.BadApiRequestException
- if an invalid dimension is requested or the dimension dictionary is empty.protected LinkedHashSet<ApiFilter> generateFilters(String filterQuery, DimensionDictionary dimensionDictionary) throws BadApiRequestException
filterQuery
- Expects a URL filter query String in the format:
(dimension name).(fieldname)-(operation):[?(value or comma separated values)]?dimensionDictionary
- DimensionDictionaryBadApiRequestException
- if the filter query string does not match required syntax.public DimensionsApiRequest withFormat(ResponseFormatType format)
withFormat
in interface DimensionsApiRequest
public DimensionsApiRequest withPaginationParameters(Optional<PaginationParameters> paginationParameters)
withPaginationParameters
in interface DimensionsApiRequest
public DimensionsApiRequest withUriInfo(javax.ws.rs.core.UriInfo uriInfo)
withUriInfo
in interface DimensionsApiRequest
public DimensionsApiRequest withBuilder(javax.ws.rs.core.Response.ResponseBuilder builder)
withBuilder
in interface DimensionsApiRequest
public DimensionsApiRequest withDimensions(LinkedHashSet<Dimension> dimensions)
withDimensions
in interface DimensionsApiRequest
public DimensionsApiRequest withFilters(Set<ApiFilter> filters)
withFilters
in interface DimensionsApiRequest
public LinkedHashSet<Dimension> getDimensions()
getDimensions
in interface DimensionsApiRequest
public Dimension getDimension()
getDimension
in interface DimensionsApiRequest
public Set<ApiFilter> getFilters()
getFilters
in interface DimensionsApiRequest
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.