@Component public class SlangCli extends Object implements org.springframework.shell.core.CommandMarker
| Constructor and Description |
|---|
SlangCli() |
| Modifier and Type | Method and Description |
|---|---|
String |
compileSource(List<String> directories,
File file,
List<String> classPath) |
List<String> |
getFlowInputs(File file,
List<String> classPath) |
String |
inspectExecutable(File executableFile) |
String |
listSystemProperties(String propertiesFile) |
String |
run(File file,
List<String> classPath,
Map<String,? extends Serializable> inputs,
List<String> inputFiles,
String verbose,
List<String> systemPropertyFiles) |
static String |
setEnvMessage(boolean triggerAsync) |
String |
setEnvVar(boolean switchAsync) |
static String |
triggerAsyncMsg(Long id,
String flowName) |
static String |
triggerSyncMsg(Long id,
String duration) |
String |
version() |
@CliCommand(value="run",
help="triggers a CloudSlang flow")
public String run(@CliOption(key={"","f","file"},mandatory=true,help="Path to filename. e.g. run --f c:/.../your_flow.sl")
File file,
@CliOption(key={"cp","classpath"},mandatory=false,help="Classpath, a directory comma separated list to flow dependencies, by default it will take flow file dir. e.g. run --f c:/.../your_flow.sl --i input1=root,input2=25 --cp c:/.../yaml")
List<String> classPath,
@CliOption(key={"i","inputs"},mandatory=false,help="inputs in a key=value comma separated list. e.g. run --f c:/.../your_flow.sl --i input1=root,input2=25")
Map<String,? extends Serializable> inputs,
@CliOption(key={"if","input-file"},mandatory=false,help="comma separated list of input file locations. e.g. run --f C:/.../your_flow.sl --if C:/.../inputs.yaml")
List<String> inputFiles,
@CliOption(key={"v","verbose"},mandatory=false,help="default, quiet, debug(print each step outputs). e.g. run --f c:/.../your_flow.sl --v quiet",specifiedDefaultValue="debug",unspecifiedDefaultValue="default")
String verbose,
@CliOption(key={"spf","system-property-file"},mandatory=false,help="comma separated list of system property file locations. e.g. run --f c:/.../your_flow.sl --spf c:/.../yaml")
List<String> systemPropertyFiles)
@CliCommand(value="compile",
help="Display compile errors for an executable")
public String compileSource(@CliOption(key={"","d","directory"},mandatory=false,help="Path to directory. e.g. compile --d c:/.../your_directory")
List<String> directories,
@CliOption(key={"","f","file"},mandatory=false,help="Path to filename. e.g. compile --f c:/.../your_flow.sl")
File file,
@CliOption(key={"cp","classpath"},mandatory=false,help="Classpath, a directory comma separated list to flow dependencies, by default it will take flow file dir. e.g. run --f c:/.../your_flow.sl --i input1=root,input2=25 --cp c:/.../yaml")
List<String> classPath)
@CliCommand(value="inspect",
help="Display metadata about an executable")
public String inspectExecutable(@CliOption(key={"","f","file"},mandatory=true,help="Path to filename. e.g. /path/to/file.sl")
File executableFile)
@CliCommand(value="list",
help="List system properties from a properties file")
public String listSystemProperties(@CliOption(key={"","f","file"},mandatory=true,help="Path to filename. e.g. /path/to/file.sl")
String propertiesFile)
@CliCommand(value="env",
help="Set environment var relevant to the CLI")
public String setEnvVar(@CliOption(key="setAsync",mandatory=true,help="set the async. e.g. env --setAsync true")
boolean switchAsync)
@CliCommand(value="inputs",
help="Get flow inputs")
public List<String> getFlowInputs(@CliOption(key={"","f","file"},mandatory=true,help="Path to filename. e.g. run --f c:/.../your_flow.sl")
File file,
@CliOption(key={"cp","classpath"},mandatory=false,help="Classpath, a directory comma separated list to flow dependencies, by default it will take flow file dir. e.g. run --f c:/.../your_flow.sl --i input1=root,input2=25 --cp c:/.../yaml")
List<String> classPath)
@CliCommand(value="cslang --version",
help="Prints the CloudSlang version used")
public String version()
public static String setEnvMessage(boolean triggerAsync)
Copyright © 2017. All Rights Reserved.