Package org.codehaus.mojo.keytool
Interface KeyToolCommandLineBuilder
-
- All Known Implementing Classes:
AbstractKeyToolCommandLineBuilder
,DefaultKeyToolCommandLineBuilder
public interface KeyToolCommandLineBuilder
To build the command line for a givenKeyToolRequest
.- Since:
- 1.1
- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ROLE
Plexus role name.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.maven.shared.utils.cli.Commandline
build(KeyToolRequest request)
Build the commandline given the incoming keytool request.void
checkRequiredState()
Checks that builder is ready to produce commandline from incoming request.void
checkSupportedRequest(KeyToolRequest request)
Checks that builder can build the given type of request.void
setKeyToolFile(java.lang.String keyToolFile)
Sets the keytool executable location.void
setLogger(org.codehaus.plexus.logging.Logger logger)
Sets the logger used by the builder.<R extends KeyToolRequest>
booleansupportRequestType(java.lang.Class<R> requestType)
Test if given request type is supported by the underlined keytool implementation.
-
-
-
Method Detail
-
supportRequestType
<R extends KeyToolRequest> boolean supportRequestType(java.lang.Class<R> requestType)
Test if given request type is supported by the underlined keytool implementation. Note: a request of a none supported type will then thrown aUnsupportedKeyToolRequestException
in methodbuild(KeyToolRequest)
- Type Parameters:
R
- type of request to test- Parameters:
requestType
- type of request to test- Returns:
true
if can create a such request type,false
otherwise.- Since:
- 1.3
-
build
org.apache.maven.shared.utils.cli.Commandline build(KeyToolRequest request) throws CommandLineConfigurationException, UnsupportedKeyToolRequestException
Build the commandline given the incoming keytool request.- Parameters:
request
- keytool request- Returns:
- the prepared commandline client ready to be executed
- Throws:
CommandLineConfigurationException
- if could not find keytool executableUnsupportedKeyToolRequestException
-
setLogger
void setLogger(org.codehaus.plexus.logging.Logger logger)
Sets the logger used by the builder.- Parameters:
logger
- logger to use in this builder
-
setKeyToolFile
void setKeyToolFile(java.lang.String keyToolFile)
Sets the keytool executable location.- Parameters:
keyToolFile
- keytool executable location to use in this builder
-
checkRequiredState
void checkRequiredState()
Checks that builder is ready to produce commandline from incoming request. Says a logger is set and a keytool executable location is setted.
-
checkSupportedRequest
void checkSupportedRequest(KeyToolRequest request) throws UnsupportedKeyToolRequestException
Checks that builder can build the given type of request.- Parameters:
request
- request to test- Throws:
UnsupportedKeyToolRequestException
- Since:
- 1.3
-
-