All Downloads are FREE. Search and download functionalities are using the official Maven repository.

poussecafe.doc.model.processstepdoc.StepMethodSignatureData Maven / Gradle / Ivy

There is a newer version: 0.29.0
Show newest version
package poussecafe.doc.model.processstepdoc;

import java.io.Serializable;
import java.util.Optional;
import poussecafe.doc.model.domainprocessdoc.ComponentMethodName;

@SuppressWarnings("serial")
public class StepMethodSignatureData implements Serializable {

    public static StepMethodSignatureData adapt(StepMethodSignature signature) {
        StepMethodSignatureData data = new StepMethodSignatureData();
        data.componentName = signature.componentMethodName().componentName();
        data.methodName = signature.componentMethodName().methodName();
        data.eventName = signature.consumedEventName().orElse(null);
        return data;
    }

    private String componentName;

    private String methodName;

    private String eventName;

    public StepMethodSignature adapt() {
        return new StepMethodSignature.Builder()
                .componentMethodName(new ComponentMethodName.Builder()
                        .componentName(componentName)
                        .methodName(methodName)
                        .build())
                .consumedMessageName(Optional.ofNullable(eventName))
                .build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy