Class AuditLogController
java.lang.Object
es.kukenan.smartfi.microservice.backoffice.controller.AuditLogController
AuditLog Rest API controller.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAuthority (role) required in order to be able to invoke greeting API.static final StringBase path for backoffice Rest API.static final StringAuditLog path.private AuditServiceAudit service.static final StringAuditLog path.static final StringBase path for backoffice Rest API. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Object>listAuditLogs(Integer pageNumber, Integer pageSize, String sortedBy) List AuditLogs - Service.org.springframework.http.ResponseEntity<Object>saveAuditLog(es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.audit.AuditLogDto auditLogDto, javax.servlet.http.HttpServletRequest request) Save AuditLog.
-
Field Details
-
PAPI_BASE_PATH
Base path for backoffice Rest API.- See Also:
-
API_BASE_PATH
Base path for backoffice Rest API.- See Also:
-
AUDITLOG_PATH
AuditLog path.- See Also:
-
LIST_AUDITLOG_PATH
AuditLog path.- See Also:
-
auditService
Audit service. -
API_AUTHORITIES
Authority (role) required in order to be able to invoke greeting API.- See Also:
-
-
Constructor Details
-
AuditLogController
public AuditLogController()
-
-
Method Details
-
saveAuditLog
@PostMapping(path="/papi/v1/backoffice/auditlog", consumes="application/json") public org.springframework.http.ResponseEntity<Object> saveAuditLog(@RequestBody es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.audit.AuditLogDto auditLogDto, javax.servlet.http.HttpServletRequest request) Save AuditLog.- Parameters:
auditLogDto- AuditLog to save.request- http request.- Returns:
- No Content ok response.
-
listAuditLogs
@GetMapping(path="/api/v1/backoffice/auditlog", produces="application/json") @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_CONSULTANT\') and hasRole(\'ROLE_LEVEL_USER_CONSULTANT\')) or (hasRole(\'ROLE_ACCESS_COMPANY\') and hasRole(\'ROLE_LEVEL_USER_COMPANY\'))") public org.springframework.http.ResponseEntity<Object> listAuditLogs(@RequestParam(name="pageNumber",required=false,defaultValue="0") Integer pageNumber, @RequestParam(name="pageSize",required=false,defaultValue="20") Integer pageSize, @RequestParam(name="sortedBy",required=false,defaultValue="") String sortedBy) List AuditLogs - Service.- Parameters:
pageNumber- page number.pageSize- page size.sortedBy- page sorted by value.- Returns:
- AuditLogs List.
-