Class DocumentsController

java.lang.Object
com.irurueta.authserver.bff.api.web.documents.DocumentsController
All Implemented Interfaces:
DocumentsApi

@RestController public class DocumentsController extends Object implements DocumentsApi
Lists and deletes the documents of the signed-in user, as the contract apis/bff/rest-server/bff-api-v1.yaml describes them through the generated DocumentsApi. The failures of the use cases are answered by DocumentsExceptionHandler.
  • Field Details

    • listDocumentsUseCase

      private final ListDocumentsUseCase listDocumentsUseCase
      Lists the documents.
    • deleteDocumentUseCase

      private final DeleteDocumentUseCase deleteDocumentUseCase
      Deletes a document.
    • documentDtoMapper

      private final DocumentDtoMapper documentDtoMapper
      Maps the domain documents onto the generated DTO.
  • Constructor Details

    • DocumentsController

      public DocumentsController()
  • Method Details

    • listDocuments

      public org.springframework.http.ResponseEntity<List<DocumentResponse>> listDocuments()
      Lists the documents of the signed-in user.
      Specified by:
      listDocuments in interface DocumentsApi
      Returns:
      the documents.
    • deleteDocument

      public org.springframework.http.ResponseEntity<Void> deleteDocument(String id)
      Deletes a document of the signed-in user.
      Specified by:
      deleteDocument in interface DocumentsApi
      Parameters:
      id - identifier of the document.
      Returns:
      an empty 204.