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

example.ExampleWorkflowInput Maven / Gradle / Ivy

There is a newer version: 5.2
Show newest version
package example;

import com.bazaarvoice.sswf.InputParser;

public class ExampleWorkflowInput {
    /**
     * Realistically, you'd use Jackson or something for the implementation.
     */
    public static final class Parser implements InputParser {
        @Override public String serialize(final ExampleWorkflowInput exampleWorkflowInput) {
            return "name:" + exampleWorkflowInput.getName();
        }

        @Override public ExampleWorkflowInput deserialize(final String inputString) {
            return new ExampleWorkflowInput(inputString.split(":")[1]);
        }
    }

    final private String name;

    public ExampleWorkflowInput(final String name) {this.name = name;}

    public String getName() {
        return name;
    }

    public String toString() {return "ExampleWorkflowInput{name: [" + name + "]}";}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy