org.nasdanika.cli.ContextCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cli Show documentation
Show all versions of cli Show documentation
Extensible Command Line Interface
package org.nasdanika.cli;
import org.nasdanika.common.Context;
import org.nasdanika.common.ProgressMonitor;
import picocli.CommandLine.Mixin;
/**
* Base class for commands which build {@link Context} from command line options.
* @author Pavel
*
*/
public abstract class ContextCommand extends CommandBase {
@Mixin
ContextMixIn contextMixIn;
/**
* Creates and configures context by adding mounts, contexts and calling context builders.
* @param progressMonitor
* @return
* @throws Exception
*/
protected Context createContext(ProgressMonitor progressMonitor) throws Exception {
return contextMixIn.createContext(progressMonitor);
}
}