@Controller @RequestMapping(value="/api/1/search") public class SearchRestController extends Object
| Constructor and Description |
|---|
SearchRestController() |
| Modifier and Type | Method and Description |
|---|---|
String |
commit() |
String |
delete(String site,
String id) |
void |
handleException(Exception e,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Writer responseWriter) |
Map<String,Object> |
search(javax.servlet.http.HttpServletRequest request) |
void |
setSearchService(SearchService searchService) |
String |
update(String site,
String id,
boolean ignoreRootInFieldNames,
String xml) |
String |
updateDocument(String site,
String id,
org.springframework.web.multipart.MultipartFile document,
org.springframework.web.multipart.MultipartFile descriptor) |
public void setSearchService(SearchService searchService)
@RequestMapping(value="/search",
method=GET)
@ResponseBody
public Map<String,Object> search(javax.servlet.http.HttpServletRequest request)
throws org.springframework.web.bind.MissingServletRequestParameterException,
SearchException
org.springframework.web.bind.MissingServletRequestParameterExceptionSearchException@RequestMapping(value="/update",
method=POST)
@ResponseBody
public String update(@RequestParam(value="site")
String site,
@RequestParam(value="id")
String id,
@RequestParam(value="stripRoot")
boolean ignoreRootInFieldNames,
@RequestBody
String xml)
throws SearchException
SearchException@RequestMapping(value="/delete",
method=POST)
@ResponseBody
public String delete(@RequestParam(value="site")
String site,
@RequestParam(value="id")
String id)
throws SearchException
SearchException@RequestMapping(value="/commit",
method=POST)
@ResponseBody
public String commit()
throws SearchException
SearchException@ExceptionHandler(value=java.lang.Exception.class) public void handleException(Exception e, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Writer responseWriter) throws IOException
IOException@RequestMapping(value="/update-document",
method=POST)
@ResponseBody
public String updateDocument(@RequestPart(value="site")
String site,
@RequestPart(value="id")
String id,
@RequestPart(value="document")
org.springframework.web.multipart.MultipartFile document,
@RequestPart(value="descriptor",required=false)
org.springframework.web.multipart.MultipartFile descriptor)
throws SearchException
SearchExceptionCopyright © 2013 CrafterCMS. All Rights Reserved.