public void setCurrentTime(final Date currentTime) throws DSSException { if (currentTime == null) { throw new DSSNullException(Date.class, "currentTime"); } this.currentTime = currentTime; }
@Override public String getMessage() { return getLocalizedMessage(); } }
/** * The default constructor for DSSBadPasswordException. * * @param message */ public DSSBadPasswordException(MSG message) { init(message); }
/** * See {@link #currentTime} * * @return */ public void setCurrentTime(final Date currentTime) { if (this.currentTime != null) { throw new DSSException(EXCEPTION_CTVSBIOO); } this.currentTime = currentTime; }
/** * This method allows to define the sequence of the validator related to a document to validate. It's only used with ASiC-E container. * * @param validator {@code SignedDocumentValidator} corresponding to the next signature with in the contained. */ public void setNextValidator(final DocumentValidator validator) { throw new DSSUnsupportedOperationException("This method is not applicable in this context!"); }
/** * @param signatureTsa * @param onlyLastCMSSignature true if only the last signature must be extended, otherwise all signatures are extended */ public CAdESSignatureExtension(final TSPSource signatureTsa, final boolean onlyLastCMSSignature) { this.signatureTsa = signatureTsa; this.onlyLastCMSSignature = onlyLastCMSSignature; if (signatureTsa == null) { throw new DSSConfigurationException(DSSConfigurationException.MSG.CONFIGURE_TSP_SERVER); } }
/** * The default constructor for DSSNotETSICompliantException. * * @param message */ public DSSNotETSICompliantException(final MSG message, final String more) { init(message); this.more = more; }
/** * The default constructor for DSSConfigurationException. */ public DSSConfigurationException(MSG message) { init(message); }
/** * @param key * @param cause */ public DSSEncodingException(MSG key, Throwable cause) { super(cause); init(key); }
/** * This is the default constructor. * * @param x509Certificate encapsulated {@code X509Certificate} */ public ChainCertificate(final X509Certificate x509Certificate) { if (x509Certificate == null) { throw new DSSNullException(X509Certificate.class); } this.x509Certificate = x509Certificate; }
/** * The method {@code matchData} must be invoked previously. * * @return true if the message imprint data is intact, false otherwise */ public Boolean isMessageImprintDataIntact() { if (messageImprintIntact == null) { throw new DSSException("Invoke matchData(byte[] data) method before!"); } return messageImprintIntact; }
/** * The default constructor for DSSNotETSICompliantException. * * @param message */ public DSSNotETSICompliantException(final MSG message) { init(message); }
/** * The default constructor for DSSConfigurationException. */ public DSSConfigurationException(MSG message, Throwable cause) { super(cause); init(message); }
public void setDigestAlgorithm(final DigestAlgorithm digestAlgorithm) { if (digestAlgorithm == null) { throw new DSSNullException(DigestAlgorithm.class); } this.digestAlgorithm = digestAlgorithm; }
/** * @param packaging {@code SignaturePackaging} to be checked * @throws DSSException if the packaging is not supported for this kind of signature */ private void assertSignaturePackaging(final SignaturePackaging packaging) throws DSSException { if (packaging != SignaturePackaging.ENVELOPING && packaging != SignaturePackaging.DETACHED) { throw new DSSException("Unsupported signature packaging: " + packaging); } } }
/** * The default constructor for CriteriaListCondition. * * @param matchingCriteriaIndicator matching criteria indicator: atLeastOne, all, none */ public CriteriaListCondition(final MatchingCriteriaIndicator matchingCriteriaIndicator) { if (matchingCriteriaIndicator == null) { throw new DSSNullException(MatchingCriteriaIndicator.class); } this.matchingCriteriaIndicator = matchingCriteriaIndicator; }
/** * To construct a signature service the <code>CertificateVerifier</code> must be set and cannot be null. * * @param certificateVerifier {@code CertificateVerifier} provides information on the sources to be used in the validation process in the context of a signature. */ protected AbstractSignatureService(final CertificateVerifier certificateVerifier) { if (certificateVerifier == null) { throw new DSSNullException(CertificateVerifier.class); } this.certificateVerifier = certificateVerifier; }
private void ensureNotNull(final CRLValidity crlValidity) { if (crlValidity == null) { throw new DSSNullException(CRLValidity.class); } if (crlValidity.x509CRL == null) { throw new DSSNullException(X509CRL.class); } }
/** * Set the DataLoader to use for querying the OCSP server. * * @param dataLoader the component that allows to retrieve the OCSP response using HTTP. * @throws DSSNullException in the case of {@code null} parameter value */ public void setDataLoader(final DataLoader dataLoader) throws DSSNullException { if (dataLoader == null) { throw new DSSNullException(DataLoader.class); } this.dataLoader = dataLoader; }
/** * Set the DataLoader to use for querying the CRL server * * @param dataLoader the component that allows to retrieve the data using any protocol: HTTP, HTTPS, FTP, LDAP. * @throws DSSNullException in the case of {@code null} parameter value */ public void setDataLoader(final DataLoader dataLoader) throws DSSNullException { if (dataLoader == null) { throw new DSSNullException(DataLoader.class); } this.dataLoader = dataLoader; }