Class ChainItem<T extends XmlConstraintsConclusion>
java.lang.Object
eu.europa.esig.dss.validation.process.ChainItem<T>
- Direct Known Subclasses:
AbstractBasicBuildingBlocksCheck,AbstractCryptographicCheck,AbstractCryptographicCheckerResultCheck,AbstractMultiValuesCheckItem,AbstractRevocationFreshCheck,AbstractTrustedListCheck,AbstractValueCheckItem,AcceptableBasicSignatureValidationCheck,AcceptableBuildingBlockConclusionCheck,AcceptableRevocationDataAvailableCheck,AcceptableTrustedListPresenceCheck,AdESAcceptableCheck,AllDigestValuesMatchCheck,AllFilesSignedCheck,AuthorityInfoAccessPresentCheck,BestSignatureTimeAfterCertificateIssuanceAndBeforeCertificateExpirationCheck,BestSignatureTimeBeforeCertificateExpirationCheck,BestSignatureTimeNotBeforeCertificateIssuanceCheck,CaQcCheck,CertificateExpirationCheck,CertificateIssuedByConsistentTrustServiceCheck,CertificateIssuedToLegalPersonCheck,CertificateIssuedToNaturalPersonCheck,CertificateNotOnHoldCheck,CertificateNotRevokedCheck,CertificateNotSelfSignedCheck,CertificatePathCheck,CertificateQualifiedCheck,CertificateSelfSignedCheck,CertificateSignatureValidCheck,CertificateSupportedByQSCDCheck,CertificateTypeAtSigningTimeCheck,CertificateTypeCheck,CertificateTypeCoverageCheck,CheckSubXCVResult,CommitmentTypeIndicationsCheck,ContentTimestampCheck,CounterSignatureCheck,CurrentTimeIndicationCheck,DigestValueMatchCheck,DigestValuePresentCheck,FullScopeCheck,GrantedStatusAtProductionTimeCheck,GrantedStatusCheck,IdPkixOcspNoCheck,IsAbleToSelectOneTrustService,IsQualificationConflictDetected,IssuerSerialMatchCheck,LongTermValidationCheck,ManifestEntryExistenceCheck,ManifestFilePresentCheck,MessageDigestOrSignedPropertiesCheck,MimeTypeFilePresentCheck,NextUpdateCheck,PastCertificateValidationAcceptableCheck,PastSignatureValidationCheck,PastTimestampValidation,PdfAnnotationOverlapCheck,PdfPageDifferenceCheck,PdfVisualDifferenceCheck,POEExistsAtOrBeforeControlTimeCheck,POEExistsCheck,ProspectiveCertificateChainCheck,ProspectiveCertificateChainCheck,PseudoUsageCheck,QSCDCertificateAtSigningTimeCheck,QSCDCheck,QTSTCheck,QualifiedCertificateAtCertificateIssuanceCheck,QualifiedCertificateAtSigningTimeCheck,QualifiedCheck,ReferenceDataExistenceCheck,ReferenceDataIntactCheck,ReferencesNotAmbiguousCheck,RevocationAcceptanceCheckerResultCheck,RevocationCertHashMatchCheck,RevocationCertHashPresenceCheck,RevocationConsistentCheck,RevocationDataAvailableCheck,RevocationDataKnownCheck,RevocationDateAfterBestSignatureTimeCheck,RevocationFreshnessCheckerResultCheck,RevocationInfoAccessPresentCheck,SatisfyingRevocationDataExistsCheck,SelfIssuedOCSPCheck,SerialNumberCheck,ServiceConsistencyCheck,SignatureAcceptanceValidationResultCheck,SignatureIntactCheck,SignatureNotAmbiguousCheck,SignaturePolicyHashValidCheck,SignaturePolicyIdentifiedCheck,SignaturePolicyStoreCheck,SignaturePolicyZeroHashCheck,SignedFilesPresentCheck,SignerInformationStoreCheck,SignerLocationCheck,SigningCertificateAttributePresentCheck,SigningCertificateRecognitionCheck,SigningCertificateReferenceCheck,SigningTimeAttributePresentCheck,SigningTimeCheck,StructuralValidationCheck,TimestampCoherenceOrderCheck,TimestampDelayCheck,TLFreshnessCheck,TLNotExpiredCheck,TLVersionCheck,TLWellSignedCheck,TrustedCertificateMatchTrustServiceCheck,TrustedListReachedForCertificateChainCheck,UnicitySigningCertificateAttributeCheck,ValidationTimeSlidingCheck,ZipCommentPresentCheck
public abstract class ChainItem<T extends XmlConstraintsConclusion> extends Object
This class is an item of the
Chain class.
That follows the design pattern "chain of responsibility".
Depending of the Level in LevelConstraint the Chain will continue/stop the current treatment. The
ChainItem is a validation
constraint which allows to collect information, warnings, errors,...- See Also:
Chain
-
Field Summary
Fields Modifier and Type Field Description protected I18nProvideri18nProvideri18nProvider -
Constructor Summary
Constructors Modifier Constructor Description protectedChainItem(I18nProvider i18nProvider, T result, LevelConstraint constraint)Common constructorprotectedChainItem(I18nProvider i18nProvider, T result, LevelConstraint constraint, String bbbId)Specific constructor for Basic Building Blocks validation -
Method Summary
Modifier and Type Method Description protected StringbuildAdditionalInfo()Builds an additional informationprotected XmlNamebuildConstraintMessage()Builds a constraint messageprotected XmlNamebuildErrorMessage()Builds an error messageprotected XmlNamebuildXmlName(MessageTag messageTag, Object... args)Builds theXmlNamevoidexecute()This method allows to execute the chain of responsibility.protected MessageTaggetAdditionalInfo()Gets an additional informationprotected MessageTaggetErrorMessageTag()Returns an i18n key String of an error message to getprotected abstract IndicationgetFailedIndicationForConclusion()Gets an Indication in case of failureprotected abstract SubIndicationgetFailedSubIndicationForConclusion()Gets a SubIndication in case of failureprotected MessageTaggetMessageTag()Returns an i18n key String of a message to getprotected List<XmlName>getPreviousErrors()Return a list of previous errors occurred in the chainprotected IndicationgetSuccessIndication()Gets an Indication if the check succeedsprotected SubIndicationgetSuccessSubIndication()Gets a SubIndication if the check succeedsprotected booleanisIndeterminateConclusion(XmlConclusion conclusion)Checks if the conclusion is indeterminateprotected booleanisInvalidConclusion(XmlConclusion conclusion)Checks if the conclusion is invalidprotected booleanisValid(XmlConstraintsConclusion constraintConclusion)Checks if the conclusion is validprotected booleanisValidConclusion(XmlConclusion conclusion)Checks if the conclusion is validprotected abstract booleanprocess()Performs the checkChainItem<T>setNextItem(ChainItem<T> nextItem)This method allows to build the chain of responsibility
-
Field Details
-
i18nProvider
i18nProvider
-
-
Constructor Details
-
ChainItem
Common constructor- Parameters:
i18nProvider- theI18nProviderinternationalization providerresult- theChainobject parent of this objectconstraint- theLevelConstraintto follow to execute this ChainItem
-
ChainItem
Specific constructor for Basic Building Blocks validation- Parameters:
i18nProvider- theI18nProviderinternationalization providerresult- theChainobject parent of this objectconstraint- theLevelConstraintto follow to execute this ChainItembbbId- theXmlBasicBuildingBlocks's id
-
-
Method Details
-
setNextItem
This method allows to build the chain of responsibility- Parameters:
nextItem- the nextChainItemto call if this one succeed- Returns:
- the current item
-
execute
public void execute()This method allows to execute the chain of responsibility. It will run all the chain until the firstLevel.FAILand not valid process. -
process
protected abstract boolean process()Performs the check- Returns:
- TRUE if the check succeeds, FALSE otherwise
-
getMessageTag
Returns an i18n key String of a message to get- Returns:
MessageTagkey
-
getErrorMessageTag
Returns an i18n key String of an error message to get- Returns:
MessageTagkey
-
getPreviousErrors
Return a list of previous errors occurred in the chain- Returns:
- a list of
XmlNames
-
getFailedIndicationForConclusion
Gets an Indication in case of failure- Returns:
Indication
-
getFailedSubIndicationForConclusion
Gets a SubIndication in case of failure- Returns:
SubIndication
-
buildErrorMessage
Builds an error message- Returns:
XmlName
-
buildConstraintMessage
Builds a constraint message- Returns:
XmlName
-
buildAdditionalInfo
Builds an additional information- Returns:
String
-
getAdditionalInfo
Gets an additional information- Returns:
MessageTag
-
buildXmlName
Builds theXmlName- Parameters:
messageTag-MessageTagargs- arguments- Returns:
XmlName
-
getSuccessIndication
Gets an Indication if the check succeeds- Returns:
Indication
-
getSuccessSubIndication
Gets a SubIndication if the check succeeds- Returns:
SubIndication
-
isValid
Checks if the conclusion is valid- Parameters:
constraintConclusion-XmlConstraintsConclusion- Returns:
- TRUE if the conclusion has a passed status, FALSE otherwise
-
isValidConclusion
Checks if the conclusion is valid- Parameters:
conclusion-XmlConclusion- Returns:
- TRUE if the conclusion has a PASSED indication, FALSE otherwise
-
isInvalidConclusion
Checks if the conclusion is invalid- Parameters:
conclusion-XmlConclusion- Returns:
- TRUE if the conclusion has a FAILED indication, FALSE otherwise
-
isIndeterminateConclusion
Checks if the conclusion is indeterminate- Parameters:
conclusion-XmlConclusion- Returns:
- TRUE if the conclusion has a INDETERMINATE indication, FALSE otherwise
-