Reformatting.
This commit is contained in:
@ -81,7 +81,8 @@ public class QueryRestController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = CHANNELS, method = { RequestMethod.GET, RequestMethod.POST }, produces = { MediaType.APPLICATION_JSON_VALUE })
|
@RequestMapping(value = CHANNELS, method = {RequestMethod.GET, RequestMethod.POST},
|
||||||
|
produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||||
public @ResponseBody Collection<String> getChannels(@RequestBody(required = false) ChannelsRequest request)
|
public @ResponseBody Collection<String> getChannels(@RequestBody(required = false) ChannelsRequest request)
|
||||||
throws Throwable {
|
throws Throwable {
|
||||||
// in case not specified use default (e.g. GET)
|
// in case not specified use default (e.g. GET)
|
||||||
@ -102,35 +103,27 @@ public class QueryRestController {
|
|||||||
/**
|
/**
|
||||||
* Query specific channel names, and return only those.
|
* Query specific channel names, and return only those.
|
||||||
*
|
*
|
||||||
* @param channelName
|
* @param channelName part of (or full) channel name
|
||||||
* part of (or full) channel name
|
* @return Collection of channel names matching the specified input channel name
|
||||||
* @return Collection of channel names matching the specified input channel
|
|
||||||
* name
|
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = CHANNELS + "/{channelName}", method = { RequestMethod.GET }, produces = { MediaType.APPLICATION_JSON_VALUE })
|
@RequestMapping(value = CHANNELS + "/{channelName}", method = {RequestMethod.GET},
|
||||||
public @ResponseBody Collection<String> getChannels(@PathVariable(value = "channelName") String channelName) {
|
produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||||
|
public @ResponseBody Collection<String> getChannels(@PathVariable(value = "channelName") String channelName)
|
||||||
ChannelsRequest request = new ChannelsRequest(channelName);
|
throws Throwable {
|
||||||
Collection<String> specificChannels = getQueryProcessor(request.getDbMode()).getChannels(request.getRegex());
|
return getChannels(new ChannelsRequest(channelName));
|
||||||
return specificChannels;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Catch-all query method for getting data from the backend.
|
* Catch-all query method for getting data from the backend.
|
||||||
* <p>
|
* <p>
|
||||||
* The {@link AbstractQuery} object will be a concrete subclass based on the
|
* The {@link AbstractQuery} object will be a concrete subclass based on the combination of
|
||||||
* combination of fields defined in the user's query. The
|
* fields defined in the user's query. The {@link AttributeBasedDeserializer} decides which class
|
||||||
* {@link AttributeBasedDeserializer} decides which class to deserialize the
|
* to deserialize the information into and has been configured (see
|
||||||
* information into and has been configured (see
|
|
||||||
* QueryRestConfig#afterPropertiesSet) accordingly.
|
* QueryRestConfig#afterPropertiesSet) accordingly.
|
||||||
*
|
*
|
||||||
* @param query
|
* @param query concrete implementation of {@link AbstractQuery}
|
||||||
* concrete implementation of {@link AbstractQuery}
|
* @param res the {@link HttpServletResponse} instance associated with this request
|
||||||
* @param res
|
* @throws IOException thrown if writing to the output stream fails
|
||||||
* the {@link HttpServletResponse} instance associated with this
|
|
||||||
* request
|
|
||||||
* @throws IOException
|
|
||||||
* thrown if writing to the output stream fails
|
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = QUERY, method = RequestMethod.POST, consumes = {MediaType.APPLICATION_JSON_VALUE})
|
@RequestMapping(value = QUERY, method = RequestMethod.POST, consumes = {MediaType.APPLICATION_JSON_VALUE})
|
||||||
public void executeQuery(@RequestBody @Valid AbstractQuery query, HttpServletResponse res) throws IOException {
|
public void executeQuery(@RequestBody @Valid AbstractQuery query, HttpServletResponse res) throws IOException {
|
||||||
|
Reference in New Issue
Block a user