|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wildfly.extras.creaper.commands.foundation.online.CliFile
public final class CliFile
Apply a list of CLI operations (a CLI script) read from a file. The file is treated as UTF-8 text. If you already
have the script text as a String, use the CliScript command.
See the documentation of CliScript for more information about special handling of certain operations.
| Field Summary |
|---|
| Fields inherited from interface org.wildfly.extras.creaper.core.online.OnlineCommand |
|---|
NOOP |
| Constructor Summary | |
|---|---|
CliFile(Class clazz)
Apply a CLI script from the classpath. |
|
CliFile(Class resourceLoader,
String path)
Apply a CLI script from the classpath. |
|
CliFile(File file)
Apply a CLI script from the filesystem ( file). |
|
| Method Summary | |
|---|---|
void |
apply(OnlineCommandContext ctx)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CliFile(File file)
file).
file - an existing file on the filesystem
IllegalArgumentException - if file is null or doesn't existpublic CliFile(Class clazz)
clazz and have the .cli extension. On the classpath, the script file must live along
the class file.
clazz - the class that will be used for loading the script and also for discovering its name
IllegalArgumentException - if the clazz is null
public CliFile(Class resourceLoader,
String path)
path. The resource
will be loaded by the resourceLoader class (Class.getResourceAsStream(String)).
resourceLoader - class that will be used to load the script from classpathpath - path to the script on classpath (absolute or relative to resourceLoader)
IllegalArgumentException - if the resourceLoader or path is null| Method Detail |
|---|
public void apply(OnlineCommandContext ctx)
throws IOException,
CliException,
CommandFailedException
apply in interface OnlineCommandIOException
CliException
CommandFailedExceptionpublic String toString()
toString in interface OnlineCommandtoString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||