Package org.codehaus.mojo.keytool
Interface KeyToolCommandLineBuilder
-
- All Known Implementing Classes:
AbstractKeyToolCommandLineBuilder
public interface KeyToolCommandLineBuilderTo build the command line for a givenKeyToolRequest.- Since:
- 1.1
- Author:
- tchemit
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.maven.shared.utils.cli.Commandlinebuild(KeyToolRequest request)Build the commandline given the incoming keytool request.voidcheckRequiredState()Checks that builder is ready to produce commandline from incoming request.voidcheckSupportedRequest(KeyToolRequest request)Checks that builder can build the given type of request.voidsetKeyToolFile(String keyToolFile)Sets the keytool executable location.voidsetLogger(org.codehaus.plexus.logging.Logger logger)Sets the logger used by the builder.<R extends KeyToolRequest>
booleansupportRequestType(Class<R> requestType)Test if given request type is supported by the underlined keytool implementation.
-
-
-
Field Detail
-
ROLE
static final String ROLE
Plexus role name.
-
-
Method Detail
-
supportRequestType
<R extends KeyToolRequest> boolean supportRequestType(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 aUnsupportedKeyToolRequestExceptionin methodbuild(KeyToolRequest)- Type Parameters:
R- type of request to test- Parameters:
requestType- type of request to test- Returns:
trueif can create a such request type,falseotherwise.- 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- if any.
-
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(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- if any.- Since:
- 1.3
-
-