Package com.compomics.cli.paths
Class PathSettingsCLI
java.lang.Object
com.compomics.cli.paths.PathSettingsCLI
Allows the user to set the path settings in command line.
- Author:
- Marc Vaudel, Harald Barsnes
-
Constructor Summary
ConstructorsConstructorDescriptionPathSettingsCLI(PathSettingsCLIInputBean pathSettingsCLIInputBean) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncall()Sets the path settings and returns null.static String[]extractAndUpdatePathOptions(String[] args) If the arguments contains changes to the paths these arguments will be extracted and the paths updated, before the remaining non-path options are returned for further processing.Returns the path to the jar file.static voidStarts the launcher by calling the launch method.static voidredirectErrorStream(File aLogFolder) Redirects the error stream to the SearchGUI.log of a given folder.voidSets the path settings according to the pathSettingsCLIInputBean.toString()
-
Constructor Details
-
PathSettingsCLI
Constructor.- Parameters:
pathSettingsCLIInputBean- an input bean containing the user parameters
-
-
Method Details
-
call
Sets the path settings and returns null.- Returns:
- null
-
setPathSettings
public void setPathSettings()Sets the path settings according to the pathSettingsCLIInputBean. -
getJarFilePath
Returns the path to the jar file.- Returns:
- the path to the jar file
-
main
Starts the launcher by calling the launch method. Use this as the main class in the jar file.- Parameters:
args- the command line arguments
-
toString
-
extractAndUpdatePathOptions
public static String[] extractAndUpdatePathOptions(String[] args) throws org.apache.commons.cli.ParseException If the arguments contains changes to the paths these arguments will be extracted and the paths updated, before the remaining non-path options are returned for further processing.- Parameters:
args- the command line arguments- Returns:
- a list of all non-path related arguments
- Throws:
org.apache.commons.cli.ParseException- if a ParseException occurs
-
redirectErrorStream
Redirects the error stream to the SearchGUI.log of a given folder.- Parameters:
aLogFolder- the folder where to save the log
-