public class CLIUtil extends Object
| Constructor and Description |
|---|
CLIUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
displayClosestMatch(String commandName,
String[] commands,
String msg,
Logger logger)
Display the commands from the list that are the closest match
to the specified command.
|
static String[] |
getAllCommands(CLIContainer container,
ProgramOptions po,
Environment env)
Return all commands, local and remote.
|
static String[] |
getLocalCommands(CLIContainer container)
Get all the known local commands.
|
static String[] |
getRemoteCommands(CLIContainer container,
ProgramOptions po,
Environment env)
Get the list of commands from the remote server.
|
static Map<String,String> |
readPasswordFileOptions(String passwordFileName,
boolean withPrefix)
Read passwords from the password file and save them in a java.util.Map.
|
static void |
writeCommandToDebugLog(String cname,
Environment env,
String[] args,
int exit)
Log the command, for debugging.
|
public static Map<String,String> readPasswordFileOptions(String passwordFileName, boolean withPrefix) throws org.glassfish.api.admin.CommandException
passwordFileName - password file namewithPrefix - decides whether prefix should be taken into accountorg.glassfish.api.admin.CommandExceptionpublic static void displayClosestMatch(String commandName, String[] commands, String msg, Logger logger) throws org.glassfish.api.admin.InvalidCommandException
org.glassfish.api.admin.InvalidCommandExceptionpublic static String[] getAllCommands(CLIContainer container, ProgramOptions po, Environment env)
public static String[] getLocalCommands(CLIContainer container)
public static String[] getRemoteCommands(CLIContainer container, ProgramOptions po, Environment env) throws org.glassfish.api.admin.CommandException, org.glassfish.api.admin.CommandValidationException
org.glassfish.api.admin.CommandExceptionorg.glassfish.api.admin.CommandValidationExceptionpublic static void writeCommandToDebugLog(String cname, Environment env, String[] args, int exit)
Copyright © 2017–2019 Eclipse Foundation. All rights reserved.