public class SlicesApiRequestImpl extends ApiRequestImpl implements SlicesApiRequest
asyncAfter, builder, COMMA_AFTER_BRACKET_PATTERN, format, pagination, paginationParameters, uriInfo
REQUEST_MAPPER_NAMESPACE
ASYNCHRONOUS_ASYNC_AFTER_VALUE, SYNCHRONOUS_ASYNC_AFTER_VALUE
Constructor and Description |
---|
SlicesApiRequestImpl(String sliceName,
String format,
String perPage,
String page,
PhysicalTableDictionary tableDictionary,
DataSourceMetadataService dataSourceMetadataService,
javax.ws.rs.core.UriInfo uriInfo)
Parses the API request URL and generates the Api Request object.
|
Modifier and Type | Method and Description |
---|---|
protected Map<String,Object> |
generateSlice(String sliceName,
PhysicalTableDictionary tableDictionary,
DataSourceMetadataService dataSourceMetadataService,
javax.ws.rs.core.UriInfo uriInfo)
Generates a slice object for a given slice name.
|
protected Set<Map<String,String>> |
generateSlices(PhysicalTableDictionary tableDictionary,
javax.ws.rs.core.UriInfo uriInfo)
Generates the set of all available slices.
|
Map<String,Object> |
getSlice()
Returns a slice object.
|
Set<Map<String,String>> |
getSlices()
Returns a set of all available slices.
|
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 SlicesApiRequestImpl(String sliceName, String format, @NotNull String perPage, @NotNull String page, PhysicalTableDictionary tableDictionary, DataSourceMetadataService dataSourceMetadataService, javax.ws.rs.core.UriInfo uriInfo) throws BadApiRequestException
sliceName
- string corresponding to the slice name specified in the 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.tableDictionary
- cache containing all the valid physical table objects.dataSourceMetadataService
- a resource holding the available datasource metadatauriInfo
- The URI of the request object.BadApiRequestException
- is thrown in the following scenarios:
protected Set<Map<String,String>> generateSlices(PhysicalTableDictionary tableDictionary, javax.ws.rs.core.UriInfo uriInfo) throws BadApiRequestException
tableDictionary
- Physical table dictionary contains the map of valid table names to table objects.uriInfo
- The URI of the request object.BadApiRequestException
- if the physical table dictionary is empty.protected Map<String,Object> generateSlice(String sliceName, PhysicalTableDictionary tableDictionary, DataSourceMetadataService dataSourceMetadataService, javax.ws.rs.core.UriInfo uriInfo) throws BadApiRequestException
sliceName
- string corresponding to the slice name specified in the URLtableDictionary
- Physical table dictionary contains the map of valid table names to table objects.dataSourceMetadataService
- a resource holding the available datasource metadatauriInfo
- The URI of the request object.BadApiRequestException
- if an invalid slice is requested or the physical table dictionary is empty.public Set<Map<String,String>> getSlices()
SlicesApiRequest
getSlices
in interface SlicesApiRequest
public Map<String,Object> getSlice()
SlicesApiRequest
getSlice
in interface SlicesApiRequest
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.