Class ConciliationController

java.lang.Object
es.kukenan.smartfi.microservice.backoffice.controller.ConciliationController

@RestController public class ConciliationController extends Object
Controller to reply Core Conciliation endpoints definition.
  • Field Details

    • API_PATH

      public static final String API_PATH
      REST API Backoffice Conciliation base path.
      See Also:
    • API_CONCILIATION_COMPANY_PATH

      public static final String API_CONCILIATION_COMPANY_PATH
      Conciliation company path.
      See Also:
    • API_CONCILIATION_COMPANY_FILE_PATH

      public static final String API_CONCILIATION_COMPANY_FILE_PATH
      Conciliation company file path.
      See Also:
    • API_CONCILIATION_LIST_PATH

      public static final String API_CONCILIATION_LIST_PATH
      REST API Conciliation list path.
      See Also:
    • API_CONCILIATION_CARDS_PATH

      public static final String API_CONCILIATION_CARDS_PATH
      REST API Conciliation cards path.
      See Also:
    • conciliationService

      @Autowired private ConciliationService conciliationService
      Company service.
    • jwtService

      @Autowired private es.kukenan.smartfi.common.service.jwt.JwtServiceImpl jwtService
      JWT service for create a bearer to call products.
    • contextManager

      @Autowired private es.kukenan.smartfi.common.context.RequestContextManager contextManager
      Request context manager.
    • API_BACKOFFICE_AUTHORITIES

      public static final String API_BACKOFFICE_AUTHORITIES
      Authority (role) required in order to be able to invoke change application status.
      See Also:
  • Constructor Details

    • ConciliationController

      public ConciliationController()
  • Method Details

    • generateConciliationFile

      @PreAuthorize("(hasRole(\'ROLE_ACCESS_ADMIN\') and hasRole(\'ROLE_LEVEL_BACKOFFICE_ADMIN\')) or (hasRole(\'ROLE_ACCESS_MODERATOR\') and hasRole(\'ROLE_LEVEL_USER_MODERATOR\')) or (hasRole(\'ROLE_ACCESS_COMPANY\') and hasRole(\'ROLE_LEVEL_USER_COMPANY\'))") @GetMapping(path="/api/v1/backoffice/conciliation/{companyId}") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Company>> generateConciliationFile(@PathVariable("companyId") Integer companyId, es.kukenan.smartfi.common.security.WalletAuthentication authentication)
      Generate Conciliation file.
      Parameters:
      companyId - company identifier.
      authentication - user credentials.
      Returns:
      Company detail.
    • getConciliationFile

      @PreAuthorize("(hasRole(\'ROLE_ACCESS_ADMIN\') and hasRole(\'ROLE_LEVEL_BACKOFFICE_ADMIN\')) or (hasRole(\'ROLE_ACCESS_MODERATOR\') and hasRole(\'ROLE_LEVEL_USER_MODERATOR\')) or (hasRole(\'ROLE_ACCESS_COMPANY\') and hasRole(\'ROLE_LEVEL_USER_COMPANY\'))") @GetMapping(path="/api/v1/backoffice/conciliation/{companyId}/{fileId}") public void getConciliationFile(@PathVariable("companyId") Integer companyId, @PathVariable("fileId") String fileId, javax.servlet.http.HttpServletResponse response, es.kukenan.smartfi.common.security.WalletAuthentication authentication) throws IOException
      Get Conciliation file.
      Parameters:
      companyId - company identifier.
      fileId - file identifier.
      response - response.
      authentication - user credentials.
      Throws:
      IOException - file to write response.
    • getConciliationFiles

      @PreAuthorize("(hasRole(\'ROLE_ACCESS_ADMIN\') and hasRole(\'ROLE_LEVEL_BACKOFFICE_ADMIN\')) or (hasRole(\'ROLE_ACCESS_MODERATOR\') and hasRole(\'ROLE_LEVEL_USER_MODERATOR\')) or (hasRole(\'ROLE_ACCESS_COMPANY\') and hasRole(\'ROLE_LEVEL_USER_COMPANY\'))") @GetMapping(path="/api/v1/backoffice/conciliation/{companyId}/list", produces="application/json") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.common.api.dtos.ResultsPageDto<es.kukenan.smartfi.microservice.backoffice.dtos.core.conciliation.ConciliationFileDto>>> getConciliationFiles(@PathVariable("companyId") Integer companyId, @RequestParam(name="pageNumber",required=false) Integer pageNumber, @RequestParam(name="pageSize",required=false) Integer pageSize, @RequestParam(name="sortedBy",required=false) String sortedBy, @RequestParam(name="conciliationStatus",required=false) Integer conciliationStatus, es.kukenan.smartfi.common.security.WalletAuthentication authentication)
      Retrieve Conciliation files list.
      Parameters:
      companyId - company identifier.
      pageNumber - number of page to get.
      pageSize - size of list to return.
      sortedBy - sort param.
      conciliationStatus - conciliation status.
      authentication - user credentials.
      Returns:
      the Conciliation files.
    • getConciliationFilesCards

      @PreAuthorize("(hasRole(\'ROLE_ACCESS_ADMIN\') and hasRole(\'ROLE_LEVEL_BACKOFFICE_ADMIN\')) or (hasRole(\'ROLE_ACCESS_MODERATOR\') and hasRole(\'ROLE_LEVEL_USER_MODERATOR\')) or (hasRole(\'ROLE_ACCESS_COMPANY\') and hasRole(\'ROLE_LEVEL_USER_COMPANY\'))") @GetMapping(path="/api/v1/backoffice/conciliation/{companyId}/cards", produces="application/json") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<List<es.kukenan.smartfi.microservice.backoffice.dtos.core.conciliation.ConciliationFileCardsDto>>> getConciliationFilesCards(@PathVariable("companyId") Integer companyId, es.kukenan.smartfi.common.security.WalletAuthentication authentication)
      Retrieve Conciliation files cards.
      Parameters:
      companyId - company identifier.
      authentication - user credentials.
      Returns:
      the Conciliation files.