use of org.springframework.web.bind.annotation.ResponseBody in project geode by apache.
the class IndexCommandsController method defineIndex.
@RequestMapping(method = RequestMethod.POST, value = "/indexes", params = "op=define")
@ResponseBody
public String defineIndex(@RequestParam(CliStrings.DEFINE_INDEX_NAME) final String name, @RequestParam(CliStrings.DEFINE_INDEX__EXPRESSION) final String expression, @RequestParam(CliStrings.DEFINE_INDEX__REGION) final String regionNamePath, @RequestParam(value = CliStrings.DEFINE_INDEX__TYPE, defaultValue = DEFAULT_INDEX_TYPE) final String type) {
CommandStringBuilder command = new CommandStringBuilder(CliStrings.DEFINE_INDEX);
command.addOption(CliStrings.DEFINE_INDEX_NAME, name);
command.addOption(CliStrings.DEFINE_INDEX__EXPRESSION, expression);
command.addOption(CliStrings.DEFINE_INDEX__REGION, regionNamePath);
command.addOption(CliStrings.DEFINE_INDEX__TYPE, type);
return processCommand(command.toString());
}
use of org.springframework.web.bind.annotation.ResponseBody in project geode by apache.
the class IndexCommandsController method listIndex.
@RequestMapping(method = RequestMethod.GET, value = "/indexes")
@ResponseBody
public String listIndex(@RequestParam(value = CliStrings.LIST_INDEX__STATS, defaultValue = "false") final Boolean withStats) {
CommandStringBuilder command = new CommandStringBuilder(CliStrings.LIST_INDEX);
command.addOption(CliStrings.LIST_INDEX__STATS, String.valueOf(Boolean.TRUE.equals(withStats)));
return processCommand(command.toString());
}
use of org.springframework.web.bind.annotation.ResponseBody in project geode by apache.
the class MemberCommandsController method describeMember.
@RequestMapping(method = RequestMethod.GET, value = "/members/{name}")
@ResponseBody
public String describeMember(@PathVariable("name") final String memberNameId) {
CommandStringBuilder command = new CommandStringBuilder(CliStrings.DESCRIBE_MEMBER);
command.addOption(CliStrings.DESCRIBE_MEMBER__IDENTIFIER, decode(memberNameId));
return processCommand(command.toString());
}
use of org.springframework.web.bind.annotation.ResponseBody in project geode by apache.
the class PdxCommandsController method pdxRename.
@RequestMapping(method = RequestMethod.POST, value = "/pdx/type")
@ResponseBody
public String pdxRename(@RequestParam(value = CliStrings.PDX_RENAME_OLD) final String oldClassName, @RequestParam(value = CliStrings.PDX_RENAME_NEW) final String newClassName, @RequestParam(value = CliStrings.PDX_DISKSTORE) final String diskStore, @RequestParam(value = CliStrings.PDX_DISKDIR, required = false) final String[] diskDirs) {
CommandStringBuilder command = new CommandStringBuilder(CliStrings.PDX_RENAME);
command.addOption(CliStrings.PDX_RENAME_OLD, oldClassName);
command.addOption(CliStrings.PDX_RENAME_NEW, newClassName);
command.addOption(CliStrings.PDX_DISKSTORE, diskStore);
if (hasValue(diskDirs)) {
command.addOption(CliStrings.PDX_DISKDIR, StringUtils.join(diskDirs, StringUtils.COMMA_DELIMITER));
}
return processCommand(command.toString());
}
use of org.springframework.web.bind.annotation.ResponseBody in project geode by apache.
the class MiscellaneousCommandsController method showDeadLock.
// TODO determine if Async functionality is required
@RequestMapping(method = RequestMethod.GET, value = "/deadlocks")
@ResponseBody
public String showDeadLock(@RequestParam(CliStrings.SHOW_DEADLOCK__DEPENDENCIES__FILE) final String dependenciesFile) {
CommandStringBuilder command = new CommandStringBuilder(CliStrings.SHOW_DEADLOCK);
command.addOption(CliStrings.SHOW_DEADLOCK__DEPENDENCIES__FILE, decode(dependenciesFile));
return processCommand(command.toString());
}
Aggregations