java.lang.Object
com.irurueta.authserver.serviceclient.infrastructure.resourceserver.DocumentMapper

@Component public class DocumentMapper extends Object
Maps the documents the resource server answers onto the domain.
  • Constructor Details

    • DocumentMapper

      public DocumentMapper()
  • Method Details

    • toDomain

      public Document toDomain(DocumentResponse response)
      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.