org.codehaus.mojo.webstart.sign
Class DefaultSignConfig

java.lang.Object
  extended by org.codehaus.mojo.webstart.sign.DefaultSignConfig
All Implemented Interfaces:
SignConfig

public class DefaultSignConfig
extends Object
implements SignConfig

Default implementation of the SignConfig.

Since:
1.0-beta-3
Author:
tchemit

Constructor Summary
DefaultSignConfig()
           
 
Method Summary
 org.codehaus.mojo.keytool.requests.KeyToolGenerateKeyPairRequest createKeyGenRequest(File keystoreFile)
          Creates a keytool request to do a key store generation operation.
 org.apache.maven.shared.jarsigner.JarSignerRequest createSignRequest(File jarToSign, File signedJar)
          Creates a jarsigner request to do a sign operation.
 org.apache.maven.shared.jarsigner.JarSignerVerifyRequest createVerifyRequest(File jarFile, boolean certs)
          Creates a jarsigner request to do a verify operation.
 String getAlias()
           
 String getDname()
           
 String getDnameC()
           
 String getDnameCn()
           
 String getDnameL()
           
 String getDnameO()
           
 String getDnameOu()
           
 String getDnameSt()
           
 String getKeyalg()
           
 String getKeypass()
           
 String getKeysize()
           
 String getKeystore()
           
 String getMaxMemory()
           
 String getSigalg()
           
 String getSigfile()
           
 String getStorepass()
           
 String getStoretype()
           
 String getValidity()
           
 boolean getVerify()
           
 void init(File workDirectory, boolean verbose, SignTool signTool)
          Called before any Jars get signed or verified.
 boolean isVerbose()
          Gets the verbose state of the configuration.
 void setAlias(String alias)
           
 void setDnameC(String dnameC)
           
 void setDnameCn(String dnameCn)
           
 void setDnameL(String dnameL)
           
 void setDnameO(String dnameO)
           
 void setDnameOu(String dnameOu)
           
 void setDnameSt(String dnameSt)
           
 void setKeyalg(String keyalg)
           
 void setKeypass(String keypass)
           
 void setKeysize(String keysize)
           
 void setKeystore(String keystore)
           
 void setKeystoreConfig(KeystoreConfig keystoreConfig)
           
 void setMaxMemory(String maxMemory)
           
 void setSigalg(String sigalg)
           
 void setSigfile(String sigfile)
           
 void setStorepass(String storepass)
           
 void setStoretype(String storetype)
           
 void setValidity(String validity)
           
 void setVerbose(boolean verbose)
           
 void setVerify(boolean verify)
           
 void setWorkDirectory(File workDirectory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSignConfig

public DefaultSignConfig()
Method Detail

init

public void init(File workDirectory,
                 boolean verbose,
                 SignTool signTool)
          throws org.apache.maven.plugin.MojoExecutionException
Description copied from interface: SignConfig
Called before any Jars get signed or verified.

This method allows you to create any keys or perform any initialisation that the method of signature that you're implementing requires.

Specified by:
init in interface SignConfig
Parameters:
workDirectory - working directory
verbose - verbose flag coming from the mojo configuration
signTool - the sign tool used eventually to create or delete key store
Throws:
org.apache.maven.plugin.MojoExecutionException - if something wrong occurs while init (mainly when preparing keys)

createSignRequest

public org.apache.maven.shared.jarsigner.JarSignerRequest createSignRequest(File jarToSign,
                                                                            File signedJar)
Description copied from interface: SignConfig
Creates a jarsigner request to do a sign operation.

Specified by:
createSignRequest in interface SignConfig
Parameters:
jarToSign - the location of the jar to sign
signedJar - the optional location of the signed jar to produce (if not set, will use the original location)
Returns:
the jarsigner request

createVerifyRequest

public org.apache.maven.shared.jarsigner.JarSignerVerifyRequest createVerifyRequest(File jarFile,
                                                                                    boolean certs)
Description copied from interface: SignConfig
Creates a jarsigner request to do a verify operation.

Specified by:
createVerifyRequest in interface SignConfig
Parameters:
jarFile - the location of the jar to sign
certs - flag to show certificats details
Returns:
the jarsigner request

createKeyGenRequest

public org.codehaus.mojo.keytool.requests.KeyToolGenerateKeyPairRequest createKeyGenRequest(File keystoreFile)
Description copied from interface: SignConfig
Creates a keytool request to do a key store generation operation.

Specified by:
createKeyGenRequest in interface SignConfig
Parameters:
keystoreFile - the location of the key store file to generate
Returns:
the keytool request

isVerbose

public boolean isVerbose()
Description copied from interface: SignConfig
Gets the verbose state of the configuration.

Specified by:
isVerbose in interface SignConfig
Returns:
true if configuration state is on, false otherwise.

setWorkDirectory

public void setWorkDirectory(File workDirectory)

setVerbose

public void setVerbose(boolean verbose)

setMaxMemory

public void setMaxMemory(String maxMemory)
Specified by:
setMaxMemory in interface SignConfig

setKeystoreConfig

public void setKeystoreConfig(KeystoreConfig keystoreConfig)
Specified by:
setKeystoreConfig in interface SignConfig

setKeystore

public void setKeystore(String keystore)
Specified by:
setKeystore in interface SignConfig

setKeyalg

public void setKeyalg(String keyalg)
Specified by:
setKeyalg in interface SignConfig

setKeysize

public void setKeysize(String keysize)
Specified by:
setKeysize in interface SignConfig

setSigalg

public void setSigalg(String sigalg)
Specified by:
setSigalg in interface SignConfig

setSigfile

public void setSigfile(String sigfile)
Specified by:
setSigfile in interface SignConfig

setStoretype

public void setStoretype(String storetype)
Specified by:
setStoretype in interface SignConfig

setStorepass

public void setStorepass(String storepass)
Specified by:
setStorepass in interface SignConfig

setKeypass

public void setKeypass(String keypass)
Specified by:
setKeypass in interface SignConfig

setValidity

public void setValidity(String validity)
Specified by:
setValidity in interface SignConfig

setDnameCn

public void setDnameCn(String dnameCn)
Specified by:
setDnameCn in interface SignConfig

setDnameOu

public void setDnameOu(String dnameOu)
Specified by:
setDnameOu in interface SignConfig

setDnameL

public void setDnameL(String dnameL)
Specified by:
setDnameL in interface SignConfig

setDnameSt

public void setDnameSt(String dnameSt)
Specified by:
setDnameSt in interface SignConfig

setDnameO

public void setDnameO(String dnameO)
Specified by:
setDnameO in interface SignConfig

setDnameC

public void setDnameC(String dnameC)
Specified by:
setDnameC in interface SignConfig

setAlias

public void setAlias(String alias)
Specified by:
setAlias in interface SignConfig

setVerify

public void setVerify(boolean verify)
Specified by:
setVerify in interface SignConfig

getKeystore

public String getKeystore()

getKeyalg

public String getKeyalg()

getKeysize

public String getKeysize()

getSigalg

public String getSigalg()

getSigfile

public String getSigfile()

getStoretype

public String getStoretype()

getStorepass

public String getStorepass()

getKeypass

public String getKeypass()

getValidity

public String getValidity()

getDnameCn

public String getDnameCn()

getDnameOu

public String getDnameOu()

getDnameL

public String getDnameL()

getDnameSt

public String getDnameSt()

getDnameO

public String getDnameO()

getDnameC

public String getDnameC()

getAlias

public String getAlias()

getVerify

public boolean getVerify()

getMaxMemory

public String getMaxMemory()

getDname

public String getDname()


Copyright © 2005-2012 Codehaus. All Rights Reserved.