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

de.xam.featdoc.mermaid.sequence.SequenceStep Maven / Gradle / Ivy

Go to download

FeatDoc - Feature Documentation as Code. Model an IT landscape with a Java DSL and generate various output formats from it. Including Markdown with Mermaid diagrams.

There is a newer version: 1.0.15
Show newest version
package de.xam.featdoc.mermaid.sequence;

/**
 * @param from
 * @param arrow
 * @param lifetimeEvent
 * @param to
 * @param message
 * @param comment       to be rendered in the source code of the diagram as comment
 */
public record SequenceStep(String from, Arrow arrow, LifetimeEvent lifetimeEvent, String to, String message,
                           String comment) {

    public enum LifetimeEvent {
        Activate("+"), None(""), Deactivate("-");

        public final String mermaid;

        LifetimeEvent(String mermaid) {
            this.mermaid = mermaid;
        }
    }


    public String mermaid() {
        return from + arrow.mermaid + lifetimeEvent.mermaid + to + ": " + message;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy