Skip to content

Commit

Permalink
refactor: extract dsp transfer process validation lib
Browse files Browse the repository at this point in the history
  • Loading branch information
wolf4ood committed Oct 14, 2024
1 parent 457691e commit bd6d393
Show file tree
Hide file tree
Showing 34 changed files with 161 additions and 120 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@
*/
public interface DspTransferProcessPropertyAndTypeNames {

String DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE = DSPACE_SCHEMA + "TransferRequestMessage";
String DSPACE_TYPE_TRANSFER_START_MESSAGE = DSPACE_SCHEMA + "TransferStartMessage";
String DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE = DSPACE_SCHEMA + "TransferCompletionMessage";
String DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_TERM = DSPACE_SCHEMA + "TransferRequestMessage";
String DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_IRI = DSPACE_SCHEMA + DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_TERM;
String DSPACE_TYPE_TRANSFER_START_MESSAGE_TERM = "TransferStartMessage";
String DSPACE_TYPE_TRANSFER_START_MESSAGE_IRI = DSPACE_SCHEMA + DSPACE_TYPE_TRANSFER_START_MESSAGE_TERM;
String DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE_TERM = "TransferCompletionMessage";
String DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE_IRI = DSPACE_SCHEMA + DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE_TERM;
String DSPACE_TYPE_TRANSFER_SUSPENSION_MESSAGE = DSPACE_SCHEMA + "TransferSuspensionMessage";
String DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE = DSPACE_SCHEMA + "TransferTerminationMessage";
String DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE_TERM = "TransferTerminationMessage";
String DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE_IRI = DSPACE_SCHEMA + DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE_TERM;
String DSPACE_TYPE_TRANSFER_PROCESS = DSPACE_SCHEMA + "TransferProcess";
String DSPACE_TYPE_TRANSFER_ERROR = DSPACE_SCHEMA + "TransferError";

Expand Down
1 change: 1 addition & 0 deletions data-protocols/dsp/dsp-transfer-process/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ dependencies {
api(project(":data-protocols:dsp:dsp-transfer-process:dsp-transfer-process-http-api"))
api(project(":data-protocols:dsp:dsp-transfer-process:dsp-transfer-process-http-dispatcher"))
api(project(":data-protocols:dsp:dsp-transfer-process:dsp-transfer-process-transform"))
api(project(":data-protocols:dsp:dsp-transfer-process:lib:dsp-transfer-process-validation-lib"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dependencies {

implementation(project(":spi:common:json-ld-spi"))
implementation(project(":core:common:lib:validator-lib"))
implementation(project(":data-protocols:dsp:dsp-transfer-process:lib:dsp-transfer-process-validation-lib"))

implementation(libs.jakarta.rsApi)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import org.eclipse.edc.protocol.dsp.http.spi.message.DspRequestHandler;
import org.eclipse.edc.protocol.dsp.transferprocess.http.api.controller.DspTransferProcessApiController;
import org.eclipse.edc.protocol.dsp.transferprocess.http.api.controller.DspTransferProcessApiController20241;
import org.eclipse.edc.protocol.dsp.transferprocess.http.api.validation.TransferCompletionMessageValidator;
import org.eclipse.edc.protocol.dsp.transferprocess.http.api.validation.TransferRequestMessageValidator;
import org.eclipse.edc.protocol.dsp.transferprocess.http.api.validation.TransferStartMessageValidator;
import org.eclipse.edc.protocol.dsp.transferprocess.http.api.validation.TransferTerminationMessageValidator;
import org.eclipse.edc.protocol.dsp.transferprocess.validation.TransferCompletionMessageValidator;
import org.eclipse.edc.protocol.dsp.transferprocess.validation.TransferRequestMessageValidator;
import org.eclipse.edc.protocol.dsp.transferprocess.validation.TransferStartMessageValidator;
import org.eclipse.edc.protocol.dsp.transferprocess.validation.TransferTerminationMessageValidator;
import org.eclipse.edc.runtime.metamodel.annotation.Extension;
import org.eclipse.edc.runtime.metamodel.annotation.Inject;
import org.eclipse.edc.spi.system.ServiceExtension;
Expand All @@ -31,10 +31,10 @@
import org.eclipse.edc.web.spi.WebService;
import org.eclipse.edc.web.spi.configuration.ApiContext;

import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_START_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_START_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.spi.version.DspVersions.V_08;
import static org.eclipse.edc.protocol.dsp.spi.version.DspVersions.V_2024_1;

Expand All @@ -58,10 +58,10 @@ public class DspTransferProcessApiExtension implements ServiceExtension {

@Override
public void initialize(ServiceExtensionContext context) {
validatorRegistry.register(DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE, TransferRequestMessageValidator.instance());
validatorRegistry.register(DSPACE_TYPE_TRANSFER_START_MESSAGE, TransferStartMessageValidator.instance());
validatorRegistry.register(DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE, TransferCompletionMessageValidator.instance());
validatorRegistry.register(DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE, TransferTerminationMessageValidator.instance());
validatorRegistry.register(DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_IRI, TransferRequestMessageValidator.instance());
validatorRegistry.register(DSPACE_TYPE_TRANSFER_START_MESSAGE_IRI, TransferStartMessageValidator.instance());
validatorRegistry.register(DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE_IRI, TransferCompletionMessageValidator.instance());
validatorRegistry.register(DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE_IRI, TransferTerminationMessageValidator.instance());

webService.registerResource(ApiContext.PROTOCOL, new DspTransferProcessApiController(transferProcessProtocolService, dspRequestHandler));
webService.registerResource(ApiContext.PROTOCOL, new DspTransferProcessApiController20241(transferProcessProtocolService, dspRequestHandler));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@

import static jakarta.ws.rs.core.HttpHeaders.AUTHORIZATION;
import static org.eclipse.edc.protocol.dsp.http.spi.types.HttpMessageProtocol.DATASPACE_PROTOCOL_HTTP;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_START_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_START_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_SUSPENSION_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.transferprocess.http.api.TransferProcessApiPaths.BASE_PATH;
import static org.eclipse.edc.protocol.dsp.transferprocess.http.api.TransferProcessApiPaths.TRANSFER_COMPLETION;
import static org.eclipse.edc.protocol.dsp.transferprocess.http.api.TransferProcessApiPaths.TRANSFER_INITIAL_REQUEST;
Expand Down Expand Up @@ -106,7 +106,7 @@ public Response initiateTransferProcess(JsonObject jsonObject, @HeaderParam(AUTH
var request = PostDspRequest.Builder.newInstance(TransferRequestMessage.class, TransferProcess.class, TransferError.class)
.message(jsonObject)
.token(token)
.expectedMessageType(DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE)
.expectedMessageType(DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_IRI)
.serviceCall(protocolService::notifyRequested)
.errorProvider(TransferError.Builder::newInstance)
.protocol(protocol)
Expand All @@ -128,7 +128,7 @@ public Response initiateTransferProcess(JsonObject jsonObject, @HeaderParam(AUTH
public Response transferProcessStart(@PathParam("id") String id, JsonObject jsonObject, @HeaderParam(AUTHORIZATION) String token) {
var request = PostDspRequest.Builder.newInstance(TransferStartMessage.class, TransferProcess.class, TransferError.class)
.processId(id)
.expectedMessageType(DSPACE_TYPE_TRANSFER_START_MESSAGE)
.expectedMessageType(DSPACE_TYPE_TRANSFER_START_MESSAGE_IRI)
.message(jsonObject)
.token(token)
.serviceCall(protocolService::notifyStarted)
Expand All @@ -152,7 +152,7 @@ public Response transferProcessStart(@PathParam("id") String id, JsonObject json
public Response transferProcessCompletion(@PathParam("id") String id, JsonObject jsonObject, @HeaderParam(AUTHORIZATION) String token) {
var request = PostDspRequest.Builder.newInstance(TransferCompletionMessage.class, TransferProcess.class, TransferError.class)
.processId(id)
.expectedMessageType(DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE)
.expectedMessageType(DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE_IRI)
.message(jsonObject)
.token(token)
.serviceCall(protocolService::notifyCompleted)
Expand All @@ -176,7 +176,7 @@ public Response transferProcessCompletion(@PathParam("id") String id, JsonObject
public Response transferProcessTermination(@PathParam("id") String id, JsonObject jsonObject, @HeaderParam(AUTHORIZATION) String token) {
var request = PostDspRequest.Builder.newInstance(TransferTerminationMessage.class, TransferProcess.class, TransferError.class)
.processId(id)
.expectedMessageType(DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE)
.expectedMessageType(DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE_IRI)
.message(jsonObject)
.token(token)
.serviceCall(protocolService::notifyTerminated)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_START_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_START_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE_IRI;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
Expand All @@ -44,10 +44,10 @@ void setUp(ServiceExtensionContext context) {
void shouldRegisterMessageValidators(DspTransferProcessApiExtension extension, ServiceExtensionContext context) {
extension.initialize(context);

verify(validatorRegistry).register(eq(DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE), any());
verify(validatorRegistry).register(eq(DSPACE_TYPE_TRANSFER_START_MESSAGE), any());
verify(validatorRegistry).register(eq(DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE), any());
verify(validatorRegistry).register(eq(DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE), any());
verify(validatorRegistry).register(eq(DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_IRI), any());
verify(validatorRegistry).register(eq(DSPACE_TYPE_TRANSFER_START_MESSAGE_IRI), any());
verify(validatorRegistry).register(eq(DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE_IRI), any());
verify(validatorRegistry).register(eq(DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE_IRI), any());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON_TYPE;
import static org.assertj.core.api.Assertions.assertThat;
import static org.eclipse.edc.jsonld.spi.JsonLdKeywords.TYPE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_START_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_START_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_SUSPENSION_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE_IRI;
import static org.eclipse.edc.protocol.dsp.transferprocess.http.api.TransferProcessApiPaths.BASE_PATH;
import static org.eclipse.edc.protocol.dsp.transferprocess.http.api.TransferProcessApiPaths.TRANSFER_COMPLETION;
import static org.eclipse.edc.protocol.dsp.transferprocess.http.api.TransferProcessApiPaths.TRANSFER_INITIAL_REQUEST;
Expand Down Expand Up @@ -95,7 +95,7 @@ void initiateTransferProcess_shouldCreateResource() {

var result = baseRequest()
.contentType(MediaType.APPLICATION_JSON)
.body(Json.createObjectBuilder().add(TYPE, DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE).build())
.body(Json.createObjectBuilder().add(TYPE, DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_IRI).build())
.post(BASE_PATH + TRANSFER_INITIAL_REQUEST)
.then()
.statusCode(200)
Expand All @@ -110,7 +110,7 @@ void initiateTransferProcess_shouldCreateResource() {
assertThat(request.getInputClass()).isEqualTo(TransferRequestMessage.class);
assertThat(request.getResultClass()).isEqualTo(TransferProcess.class);
assertThat(request.getMessage()).isNotNull();
assertThat(request.getExpectedMessageType()).isEqualTo(DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE);
assertThat(request.getExpectedMessageType()).isEqualTo(DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_IRI);
}

/**
Expand Down Expand Up @@ -163,19 +163,19 @@ public Stream<? extends Arguments> provideArguments(ExtensionContext context) {
Arguments.of(
BASE_PATH + PROCESS_ID + TRANSFER_START,
TransferStartMessage.class,
DSPACE_TYPE_TRANSFER_START_MESSAGE),
DSPACE_TYPE_TRANSFER_START_MESSAGE_IRI),
Arguments.of(
BASE_PATH + PROCESS_ID + TRANSFER_COMPLETION,
TransferCompletionMessage.class,
DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE),
DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE_IRI),
Arguments.of(
BASE_PATH + PROCESS_ID + TRANSFER_SUSPENSION,
TransferSuspensionMessage.class,
DSPACE_TYPE_TRANSFER_SUSPENSION_MESSAGE),
Arguments.of(
BASE_PATH + PROCESS_ID + TRANSFER_TERMINATION,
TransferTerminationMessage.class,
DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE)
DSPACE_TYPE_TRANSFER_TERMINATION_MESSAGE_IRI)
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import static org.eclipse.edc.jsonld.spi.JsonLdKeywords.TYPE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspPropertyAndTypeNames.DSPACE_PROPERTY_CONSUMER_PID;
import static org.eclipse.edc.protocol.dsp.spi.type.DspPropertyAndTypeNames.DSPACE_PROPERTY_PROVIDER_PID;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE_IRI;


public class JsonObjectFromTransferCompletionMessageTransformer extends AbstractJsonLdTransformer<TransferCompletionMessage, JsonObject> {
Expand All @@ -42,7 +42,7 @@ public JsonObjectFromTransferCompletionMessageTransformer(JsonBuilderFactory jso
public @Nullable JsonObject transform(@NotNull TransferCompletionMessage transferCompletionMessage, @NotNull TransformerContext context) {
return jsonBuilderFactory.createObjectBuilder()
.add(ID, transferCompletionMessage.getId())
.add(TYPE, DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE)
.add(TYPE, DSPACE_TYPE_TRANSFER_COMPLETION_MESSAGE_IRI)
.add(DSPACE_PROPERTY_CONSUMER_PID, transferCompletionMessage.getConsumerPid())
.add(DSPACE_PROPERTY_PROVIDER_PID, transferCompletionMessage.getProviderPid())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import static org.eclipse.edc.protocol.dsp.spi.type.DspPropertyAndTypeNames.DSPACE_PROPERTY_CONSUMER_PID;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_PROPERTY_CONTRACT_AGREEMENT_ID;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_PROPERTY_DATA_ADDRESS;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE;
import static org.eclipse.edc.protocol.dsp.spi.type.DspTransferProcessPropertyAndTypeNames.DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_IRI;


public class JsonObjectFromTransferRequestMessageTransformer extends AbstractJsonLdTransformer<TransferRequestMessage, JsonObject> {
Expand All @@ -50,7 +50,7 @@ public JsonObjectFromTransferRequestMessageTransformer(JsonBuilderFactory jsonBu

var builder = jsonBuilderFactory.createObjectBuilder()
.add(ID, transferRequestMessage.getId())
.add(TYPE, DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE)
.add(TYPE, DSPACE_TYPE_TRANSFER_REQUEST_MESSAGE_IRI)
.add(DSPACE_PROPERTY_CONTRACT_AGREEMENT_ID, transferRequestMessage.getContractId())
.add(DCT_FORMAT_ATTRIBUTE, format)
.add(DSPACE_PROPERTY_CALLBACK_ADDRESS_IRI, transferRequestMessage.getCallbackAddress())
Expand Down
Loading

0 comments on commit bd6d393

Please sign in to comment.