Esempio n. 1
0
  @RequestMapping(value = "/{fortressName:.*}", method = RequestMethod.DELETE)
  @ResponseStatus(value = HttpStatus.ACCEPTED)
  public AdminResponse purgeFortress(
      @PathVariable("fortressName") String fortressCode, HttpServletRequest request)
      throws FlockException {
    Company company = CompanyResolver.resolveCompany(request);

    mediationFacade.purge(company, fortressCode);
    return new AdminResponse("Purging " + fortressCode + "... This may take a while");
  }
Esempio n. 2
0
 @RequestMapping(value = "/{code:.*}/{docType}", method = RequestMethod.DELETE)
 public AdminResponse deleteDocType(
     @PathVariable("code") String fortressCode,
     @PathVariable("docType") String docType,
     HttpServletRequest request)
     throws FlockException {
   Company company = CompanyResolver.resolveCompany(request);
   mediationFacade.purge(company, fortressCode, docType);
   return new AdminResponse("Purging " + fortressCode + "... This may take a while");
 }
Esempio n. 3
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);
 }
Esempio n. 4
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);
  }