Class DocumentCalls
java.lang.Object
com.irurueta.authserver.serviceclient.infrastructure.resourceserver.DocumentCalls
Lists the documents through a generated client and translates every failure into a
DocumentAccessException, so no HTTP, OAuth2 or JSON type escapes through the ports. Messages and logs never carry
a token.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DocumentMapperMaps the generated model onto the domain. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlist(DocumentsApi documentsApi) Lists the documents the token behind the client may see.
-
Field Details
-
documentMapper
Maps the generated model onto the domain.
-
-
Constructor Details
-
DocumentCalls
public DocumentCalls()
-
-
Method Details
-
list
Lists the documents the token behind the client may see.- Parameters:
documentsApi- the generated client, which sends the access token.- Returns:
- the documents, empty when there are none.
- Throws:
DocumentAccessException- if the token cannot be obtained, the resource server refuses it, cannot be reached or answers something that is not a list of documents.
-