Class DocumentMapper
java.lang.Object
com.irurueta.authserver.bff.infrastructure.resourceserver.DocumentMapper
Maps the model of the generated resource-server client onto the domain, so the generated types never leave this
adapter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontoDomain(DocumentResponse response) Maps a document answered by the resource server.
-
Constructor Details
-
DocumentMapper
public DocumentMapper()
-
-
Method Details
-
toDomain
Maps a document answered by the resource server.- Parameters:
response- the document as the generated client reads it.- Returns:
- the domain document.
- Throws:
IllegalArgumentException- if the resource server answered a document that breaks the domain invariants.
-