eu.europa.esig.dss.asic.ASiCWithCAdESSignatureParameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dss-asic-cades Show documentation
Show all versions of dss-asic-cades Show documentation
DSS ASiC with CAdES contains the code for the creation and validation of ASiC containers with CAdES signature(s).
package eu.europa.esig.dss.asic;
import eu.europa.esig.dss.SignatureForm;
import eu.europa.esig.dss.SignatureLevel;
import eu.europa.esig.dss.cades.CAdESSignatureParameters;
public class ASiCWithCAdESSignatureParameters extends CAdESSignatureParameters {
private static final long serialVersionUID = -830012801924753709L;
/**
* The object representing the parameters related to ASiC from of the signature.
*/
private ASiCParameters aSiCParams = new ASiCParameters();
public ASiCParameters aSiC() {
return aSiCParams;
}
@Override
public void setSignatureLevel(SignatureLevel signatureLevel) {
if (signatureLevel == null || SignatureForm.CAdES != signatureLevel.getSignatureForm()) {
throw new IllegalArgumentException("Only CAdES form is allowed !");
}
super.setSignatureLevel(signatureLevel);
}
}