Class JarResigner
- java.lang.Object
-
- org.eclipse.cbi.maven.plugins.jarsigner.JarResigner
-
- All Implemented Interfaces:
JarSigner
- Direct Known Subclasses:
JarResigner.DoNotResign
,JarResigner.OverwriteSignature
,JarResigner.Resign
,JarResigner.ThrowException
public abstract class JarResigner extends java.lang.Object implements JarSigner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
JarResigner.DoNotResign
private static class
JarResigner.OverwriteSignature
private static class
JarResigner.OverwriteSignatureWithSameDigestAlg
private static class
JarResigner.Resign
private static class
JarResigner.ResignWithSameDigestAlg
static class
JarResigner.Strategy
private static class
JarResigner.ThrowException
-
Nested classes/interfaces inherited from interface org.eclipse.cbi.maven.plugins.jarsigner.JarSigner
JarSigner.Options
-
-
Field Summary
Fields Modifier and Type Field Description private JarSigner
delegate
private static java.lang.String
DIGEST_ATTRIBUTE_SUFFIX
private org.apache.maven.plugin.logging.Log
log
-
Constructor Summary
Constructors Constructor Description JarResigner(JarSigner delegate, org.apache.maven.plugin.logging.Log log)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static JarSigner
create(JarResigner.Strategy strategy, JarSigner delegate, org.apache.maven.plugin.logging.Log log)
(package private) JarSigner
delegate()
static JarSigner
doNotResign(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
(package private) static java.util.Set<MessageDigestAlgorithm>
getAllUsedDigestAlgorithm(java.nio.file.Path jar)
(package private) static MessageDigestAlgorithm
getDigestAlgorithmToReuse(java.nio.file.Path jar)
(package private) static boolean
hasManifestDigest(java.util.jar.Attributes entryAttributes)
(package private) static boolean
isAlreadySigned(java.nio.file.Path jar)
private static boolean
isBlockOrSF(java.lang.String entryName)
(package private) org.apache.maven.plugin.logging.Log
log()
static JarSigner
overwrite(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
static JarSigner
overwriteWithSameDigestAlgorithm(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
(package private) abstract int
resign(java.nio.file.Path jar, JarSigner.Options options)
static JarSigner
resign(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
static JarSigner
resignWithSameDigestAlgorithm(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
int
sign(java.nio.file.Path jar, JarSigner.Options options)
Sign the given Jar file.static JarSigner
throwException(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
-
-
Field Detail
-
DIGEST_ATTRIBUTE_SUFFIX
private static final java.lang.String DIGEST_ATTRIBUTE_SUFFIX
- See Also:
- Constant Field Values
-
delegate
private final JarSigner delegate
-
log
private final org.apache.maven.plugin.logging.Log log
-
-
Constructor Detail
-
JarResigner
JarResigner(JarSigner delegate, org.apache.maven.plugin.logging.Log log)
-
-
Method Detail
-
log
final org.apache.maven.plugin.logging.Log log()
-
create
public static JarSigner create(JarResigner.Strategy strategy, JarSigner delegate, org.apache.maven.plugin.logging.Log log)
-
delegate
JarSigner delegate()
-
sign
public int sign(java.nio.file.Path jar, JarSigner.Options options) throws java.io.IOException
Description copied from interface:JarSigner
Sign the given Jar file.
-
resign
abstract int resign(java.nio.file.Path jar, JarSigner.Options options) throws java.io.IOException
- Throws:
java.io.IOException
-
isAlreadySigned
static boolean isAlreadySigned(java.nio.file.Path jar) throws java.io.IOException
- Throws:
java.io.IOException
-
hasManifestDigest
static boolean hasManifestDigest(java.util.jar.Attributes entryAttributes)
-
isBlockOrSF
private static boolean isBlockOrSF(java.lang.String entryName)
-
doNotResign
public static JarSigner doNotResign(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
throwException
public static JarSigner throwException(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
resignWithSameDigestAlgorithm
public static JarSigner resignWithSameDigestAlgorithm(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
resign
public static JarSigner resign(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
overwriteWithSameDigestAlgorithm
public static JarSigner overwriteWithSameDigestAlgorithm(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
overwrite
public static JarSigner overwrite(JarSigner jarSigner, org.apache.maven.plugin.logging.Log log)
-
getAllUsedDigestAlgorithm
static java.util.Set<MessageDigestAlgorithm> getAllUsedDigestAlgorithm(java.nio.file.Path jar) throws java.io.IOException
- Throws:
java.io.IOException
-
getDigestAlgorithmToReuse
static MessageDigestAlgorithm getDigestAlgorithmToReuse(java.nio.file.Path jar) throws java.io.IOException
- Throws:
java.io.IOException
-
-