Package betsy.bpmn.cli

Source Code of betsy.bpmn.cli.BPMNProcessParser

package betsy.bpmn.cli;

import betsy.bpmn.model.BPMNProcess;
import configuration.bpmn.BPMNProcessRepository;

import java.util.List;

public class BPMNProcessParser {
    public BPMNProcessParser(String[] args) {
        this.args = args;
    }

    public List<BPMNProcess> parse() {
        BPMNProcessRepository repository = new BPMNProcessRepository();
        if (args.length <= 1) {
            return repository.getByName("ALL");
        } else {
            return repository.getByNames(args[1].split(","));
        }

    }

    public String[] getArgs() {
        return args;
    }

    private final String[] args;
}
TOP

Related Classes of betsy.bpmn.cli.BPMNProcessParser

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.