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

org.nasdanika.cli.ContextCommand Maven / Gradle / Ivy

There is a newer version: 2024.9.0
Show newest version
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);
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy