public class DefaultKeyTool extends org.codehaus.plexus.logging.AbstractLogEnabled implements KeyTool
KeyTool.| Modifier and Type | Field and Description |
|---|---|
protected KeyToolCommandLineBuilder |
builder
Command line builder.
|
protected String |
keyToolFile
The location of the keyTool executable file.
|
| Constructor and Description |
|---|
DefaultKeyTool() |
| Modifier and Type | Method and Description |
|---|---|
protected org.codehaus.plexus.util.cli.Commandline |
createCommandLine(KeyToolRequest request)
Creates the commandline given the request.
|
KeyToolResult |
execute(KeyToolRequest request)
Executes KeyTool tool using the parameters specified by the given invocation request.
|
protected KeyToolResult |
executeCommandLine(org.codehaus.plexus.util.cli.Commandline cli,
KeyToolRequest request)
Launch execution of the given commandline
|
protected String |
findExecutable(String command,
String homeDir,
String[] subDirs)
Finds the specified command in any of the given sub directories of the specified JDK/JRE home directory.
|
protected String |
findKeyToolExecutable()
Finds the keeytool executable location.
|
protected String keyToolFile
protected KeyToolCommandLineBuilder builder
public KeyToolResult execute(KeyToolRequest request) throws KeyToolException
execute in interface KeyToolrequest - The invocation request to execute, must not be null.null.KeyToolException - if something fails while init the commandprotected org.codehaus.plexus.util.cli.Commandline createCommandLine(KeyToolRequest request) throws KeyToolException
request - keytool requestKeyToolException - if could not find the keytool commandprotected KeyToolResult executeCommandLine(org.codehaus.plexus.util.cli.Commandline cli, KeyToolRequest request)
cli - the commandline client ready to be executedrequest - the incoming keytool requestprotected String findKeyToolExecutable() throws IOException
IOException - if could not find the executableprotected String findExecutable(String command, String homeDir, String[] subDirs)
command - The command to find, must not be null.homeDir - The home directory to search in, may be null.subDirs - The sub directories of the home directory to search in, must not be null.null otherwise.Copyright © 2012-2013 Codehaus. All Rights Reserved.