Package org.codehaus.mojo.keytool
Class DefaultKeyToolCommandLineBuilder
- java.lang.Object
-
- org.codehaus.mojo.keytool.AbstractKeyToolCommandLineBuilder
-
- org.codehaus.mojo.keytool.DefaultKeyToolCommandLineBuilder
-
- All Implemented Interfaces:
KeyToolCommandLineBuilder
@Component(role=KeyToolCommandLineBuilder.class, hint="default") public class DefaultKeyToolCommandLineBuilder extends AbstractKeyToolCommandLineBuilder
To build the command line for a givenKeyToolRequest.- Since:
- 1.1
- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Set<java.lang.Class<? extends KeyToolRequest>>unsupportedRequestTypesUnsupported request types.-
Fields inherited from interface org.codehaus.mojo.keytool.KeyToolCommandLineBuilder
ROLE
-
-
Constructor Summary
Constructors Constructor Description DefaultKeyToolCommandLineBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.maven.shared.utils.cli.Commandlinebuild(KeyToolRequest request)Build the commandline given the incoming keytool request.protected voidbuild(KeyToolChangeAliasRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolChangeKeyPasswordRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolChangeStorePasswordRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolDeleteRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolExportCertificateRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolGenerateCertificateRequestRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolGenerateCertificateRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolGenerateKeyPairRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolGenerateSecretKeyRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolImportCertificateRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolImportKeystoreRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolListRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolPrintCertificateRequestRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolPrintCertificateRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.protected voidbuild(KeyToolPrintCRLFileRequest request, org.apache.maven.shared.utils.cli.Commandline cli)Fill the commandline client for the givenrequest.<R extends KeyToolRequest>
booleansupportRequestType(java.lang.Class<R> requestType)Test if given request type is supported by the underlined keytool implementation.-
Methods inherited from class org.codehaus.mojo.keytool.AbstractKeyToolCommandLineBuilder
addArg, addArg, addArgIfNotEmpty, addArgIfNotEmpty, addArgIfTrue, addKeytoolCommandAndDefaultoptions, buildWithKeyStoreAndAliasParameters, buildWithKeyStoreParameters, checkRequiredState, checkSupportedRequest, getKeyToolFile, getLogger, setKeyToolFile, setLogger
-
-
-
-
Field Detail
-
unsupportedRequestTypes
final java.util.Set<java.lang.Class<? extends KeyToolRequest>> unsupportedRequestTypes
Unsupported request types.- Since:
- 1.3
-
-
Method Detail
-
supportRequestType
public <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 aUnsupportedKeyToolRequestExceptionin methodKeyToolCommandLineBuilder.build(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.
-
build
public 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
-
build
protected void build(KeyToolChangeAliasRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolChangeKeyPasswordRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolChangeStorePasswordRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolDeleteRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolExportCertificateRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolGenerateCertificateRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolGenerateCertificateRequestRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolGenerateKeyPairRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolGenerateSecretKeyRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolImportCertificateRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolImportKeystoreRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolListRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolPrintCertificateRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolPrintCertificateRequestRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
build
protected void build(KeyToolPrintCRLFileRequest request, org.apache.maven.shared.utils.cli.Commandline cli)
Fill the commandline client for the givenrequest.- Parameters:
request- the keytool request to consumecli- the commandline client to prepare
-
-