Class CommentRestController

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

@RestController public class CommentRestController extends Object
Comment Rest API controller.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Authority (role) required in order to be able to invoke greeting API.
    static final String
    Base path for backoffice Public Rest API.
    Users service.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<List<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.user.CommentDto>>>
    saveComment(es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.user.CommentRequestDto requestDto, es.kukenan.smartfi.common.security.WalletAuthentication authentication)
    Save comment for client.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • API_BASE_PATH

      public static final String API_BASE_PATH
      Base path for backoffice Public Rest API.
      See Also:
    • API_AUTHORITIES

      public static final String API_AUTHORITIES
      Authority (role) required in order to be able to invoke greeting API.
      See Also:
    • commentService

      @Autowired private CommentService commentService
      Users service.
  • Constructor Details

    • CommentRestController

      public CommentRestController()
  • Method Details

    • saveComment

      @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\'))") @PostMapping(path="/api/v1/backoffice/comment", produces="application/json", consumes="application/json") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<List<es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.user.CommentDto>>> saveComment(@RequestBody es.kukenan.smartfi.microservice.backoffice.dtos.backoffice.user.CommentRequestDto requestDto, es.kukenan.smartfi.common.security.WalletAuthentication authentication)
      Save comment for client.
      Parameters:
      requestDto - comment object.
      authentication - user credentials.
      Returns:
      Comment created.