Meladバジル
私はこのコードを持っています
service.confirm(identity, id)
.map(confirmationResponse -> InternalToExternalResponse.mapToExternal(confirmationResponse))
.map(externalResponse->uriBuilder.buildAuthorizeUri(externalResponse))
.lift(auditOperatorFactory.logRequestURI(identity, AuditCategory.BOOKKEEP));
今、私は拡張する必要がありますuriBuilder.buildAuthorizeUri(externalResponse)
取るためにconfirmationResponse
2番目のパラメータとして
私は使用することができますconfirmationResponse
第二ラムダ式内の最初のラムダ式から?最終的なコードは次のようにする必要があります
service.confirm(identity, id)
.map(confirmationResponse -> InternalToExternalResponse.mapToExternal(confirmationResponse))
.map(externalResponse-**>uriBuilder.buildAuthorizeUri(externalResponse,confirmationResponse ))**
.lift(auditOperatorFactory.logRequestURI(identity, AuditCategory.BOOKKEEP));
人々Ahmeti:
あなたは渡すことができconfirmationResponse
、この1の結果として、次のラムダに。あなたは両方を必要とするので、あなたはどちらかのカスタムオブジェクトまたは使用作成することができPair
、このように:
service.confirm(identity, id)
.map(confirmationResponse -> new Pair<ConfirmationResponse, ExternalResponse>(confirmationResponse, InternalToExternalResponse.mapToExternal(confirmationResponse)))
.map(result ->u riBuilder.buildAuthorizeUri(result.second, result.first ))
.lift(auditOperatorFactory.logRequestURI(identity, AuditCategory.BOOKKEEP));