Class DocumentsController
java.lang.Object
com.irurueta.authserver.bff.api.web.documents.DocumentsController
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final DeleteDocumentUseCaseDeletes a document.private final DocumentDtoMapperMaps the domain documents onto the generated DTO.private final ListDocumentsUseCaseLists the documents.Fields inherited from interface com.irurueta.authserver.bff.api.web.v1.generated.api.DocumentsApi
PATH_DELETE_DOCUMENT, PATH_LIST_DOCUMENTS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> deleteDocument(String id) Deletes a document of the signed-in user.org.springframework.http.ResponseEntity<List<DocumentResponse>> Lists the documents of the signed-in user.
-
Field Details
-
listDocumentsUseCase
Lists the documents. -
deleteDocumentUseCase
Deletes a document. -
documentDtoMapper
Maps the domain documents onto the generated DTO.
-
-
Constructor Details
-
DocumentsController
public DocumentsController()
-
-
Method Details
-
listDocuments
Lists the documents of the signed-in user.- Specified by:
listDocumentsin interfaceDocumentsApi- Returns:
- the documents.
-
deleteDocument
Deletes a document of the signed-in user.- Specified by:
deleteDocumentin interfaceDocumentsApi- Parameters:
id- identifier of the document.- Returns:
- an empty
204.
-