Пример #1
0
 @RequestMapping(value = "/{fortressCode:.*}/rebuild", method = RequestMethod.POST)
 @ResponseStatus(value = HttpStatus.ACCEPTED)
 public AdminResponse rebuildSearch(
     @PathVariable("fortressCode") String fortressCode, HttpServletRequest request)
     throws FlockException {
   Company company = CompanyResolver.resolveCompany(request);
   logger.info(
       "Reindex command received for "
           + fortressCode
           + " from ["
           + securityHelper.getLoggedInUser()
           + "]");
   String message = mediationFacade.reindex(company, fortressCode);
   return new AdminResponse(message);
 }
Пример #2
0
  @RequestMapping(value = "/{fortressName:.*}/{docType}/validate", method = RequestMethod.POST)
  @ResponseStatus(value = HttpStatus.ACCEPTED)
  public AdminResponse validateFromSearch(
      @PathVariable("fortressName") String fortressName,
      @PathVariable("docType") String docType,
      HttpServletRequest request)
      throws FlockException {
    Company company = CompanyResolver.resolveCompany(request);

    logger.info(
        "Validate command received for "
            + fortressName
            + " & docType "
            + docType
            + " from ["
            + securityHelper.getLoggedInUser()
            + "]");
    String message = mediationFacade.validateFromSearch(company, fortressName, docType);

    return new AdminResponse(message);
  }