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

com.codetaco.funnel.AppContext Maven / Gradle / Ivy

There is a newer version: 3.0.5
Show newest version
package com.codetaco.funnel;

import java.io.File;
import java.io.IOException;
import java.text.ParseException;

import com.codetaco.argument.CmdLine;
import com.codetaco.argument.annotation.Arg;
import com.codetaco.argument.input.NamespaceParser;

/**
 * 

* AppContext class. *

* * @author Chris DeGreef [email protected] */ public class AppContext { @Arg(caseSensitive = true, defaultValues = "UNKNOWN") public String version; @Arg(multimin = 1) public String[] specPath; @Arg(longName = "log4j", caseSensitive = true) public String log4jConfigFileName; /** *

* Constructor for AppContext. *

*/ public AppContext() { super(); } /** *

* Constructor for AppContext. *

* * @param workingDirectory a {@link java.lang.String} object. * @throws java.io.IOException if any. * @throws java.text.ParseException if any. */ public AppContext(final String workingDirectory) throws IOException, ParseException { final String configFileName = System.getProperty("funnel.config", workingDirectory + "/src/test/resources/funnel.cfg"); new CmdLine().parse(NamespaceParser.getInstance(new File(configFileName)), this); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy