Module jpms_dss_validation
Class ChainItem<T extends eu.europa.esig.dss.detailedreport.jaxb.XmlConstraintsConclusion>
java.lang.Object
eu.europa.esig.dss.validation.process.ChainItem<T>
- Type Parameters:
T- implementation of the block's conclusion
- Direct Known Subclasses:
AbstractCertificateCheckItem,AbstractCryptographicCheck,AbstractCryptographicCheckerResultCheck,AbstractMultiValuesCheckItem,AbstractPastTokenValidationCheck,AbstractPdfLockDictionaryCheck,AbstractRevocationFreshCheck,AbstractSignedAndTimestampedFilesCoveredCheck,AbstractTimeStampPresentCheck,AbstractTimeStampTypeCheck,AbstractTrustedListCheck,AbstractValueCheckItem,AcceptableBasicSignatureValidationCheck,AcceptableBasicTimestampValidationCheck,AcceptableBuildingBlockConclusionCheck,AcceptableRevocationDataAvailableCheck,AcceptableTrustedListPresenceCheck,AdESAcceptableCheck,AllCertificatesInPathReferencedCheck,AllFilesSignedCheck,AnnotationChangesCheck,AtLeastOneReferenceDataObjectFoundCheck,AuthorityInfoAccessPresentCheck,BasicConstraintsCACheck,BasicConstraintsMaxPathLengthCheck,BasicTimestampValidationCheck,BasicValidationProcessCheck,BestSignatureTimeAfterCertificateIssuanceAndBeforeCertificateExpirationCheck,BestSignatureTimeBeforeCertificateExpirationCheck,BestSignatureTimeBeforeSuspensionTimeCheck,BestSignatureTimeNotBeforeCertificateIssuanceCheck,ByteRangeAllDocumentCheck,ByteRangeCheck,ByteRangeCollisionCheck,CAdESV3HashIndexCheck,CaQcCheck,CertificateIssuedByConsistentByQCTrustServiceCheck,CertificateIssuedByConsistentByQSCDTrustServiceCheck,CertificateIssuedToLegalPersonCheck,CertificateIssuedToNaturalPersonCheck,CertificateIssuerNameCheck,CertificateKnownToBeNotRevokedCheck,CertificateMinQcEuRetentionPeriodCheck,CertificateMinQcTransactionLimitCheck,CertificateNameConstraintsCheck,CertificateNotOnHoldCheck,CertificateNotRevokedCheck,CertificateNotSelfSignedCheck,CertificatePolicyQualifiedIdsCheck,CertificatePolicySupportedByQSCDIdsCheck,CertificatePolicyTreeCheck,CertificateQcComplianceCheck,CertificateQcSSCDCheck,CertificateRevocationSelectorResultCheck,CertificateSelfSignedCheck,CertificateSignatureValidCheck,CertificateTypeAtSigningTimeCheck,CertificateTypeCheck,CertificateTypeCoverageCheck,CertificateValidationBeforeSunsetDateCheck,CertificateValidityRangeCheck,CheckSubXCVResult,CommitmentTypeIndicationsCheck,ContentTimestampBasicValidationCheck,ContentTimeStampCheck,ContentTimestampsCheck,ControlTimeCheck,CounterSignatureCheck,CryptographicVerificationResultCheck,CurrentTimeIndicationCheck,DigestValueMatchCheck,DigestValuePresentCheck,DocMDPCheck,EllipticCurveKeySizeCheck,EvidenceRecordHashTreeRenewalTimestampCheck,EvidenceRecordSignedFilesCoveredCheck,EvidenceRecordValidationCheck,FormatCheckingResultCheck,FormFillChangesCheck,FullScopeCheck,GrantedStatusAtTimeCheck,GrantedStatusCheck,IdentificationOfSigningCertificateResultCheck,IsAbleToSelectOneTrustService,IsNoQualificationConflictDetectedCheck,IssuerSerialMatchCheck,KeyIdentifierMatchCheck,KeyIdentifierPresentCheck,LongTermAvailabilityAndIntegrityValidationMaterialCheck,LongTermValidationCheck,ManifestEntryExistenceCheck,ManifestEntryGroupCheck,ManifestFilePresentCheck,MessageDigestOrSignedPropertiesCheck,MessageImprintDigestAlgorithmValidationCheck,MimeTypeFilePresentCheck,MRACertificateEquivalenceApplied,NextUpdateCheck,NoRevAvailCheck,OtherTrustAnchorExistsCheck,PastCertificateValidationAcceptableCheck,PastRevocationDataValidationConclusiveCheck,PastValidationAcceptableRevocationDataAvailable,PDFAComplianceCheck,PdfAnnotationOverlapCheck,PdfPageDifferenceCheck,PdfSignatureDictionaryCheck,PdfVisualDifferenceCheck,POEExistsAtOrBeforeControlTimeCheck,POEExistsCheck,POEExistsWithinCertificateValidityRangeCheck,POENotAfterCARevocationTimeCheck,ProspectiveCertificateChainAtValidationTimeCheck,ProspectiveCertificateChainCheck,ProspectiveCertificateChainCheck,PseudoUsageCheck,QSCDCertificateAtSigningTimeCheck,QSCDCheck,QTSTCheck,QualifiedCertificateAtCertificateIssuanceCheck,QualifiedCertificateAtSigningTimeCheck,QualifiedCheck,ReferenceDataExistenceCheck,ReferenceDataGroupCheck,ReferenceDataIntactCheck,ReferenceDataNameMatchCheck,ReferencesNotAmbiguousCheck,RelatedToMraEnactedTrustServiceCheck,RevocationAcceptanceCheckerResultCheck,RevocationCertHashMatchCheck,RevocationCertHashPresenceCheck,RevocationConsistentCheck,RevocationDataAcceptableCheck,RevocationDataAvailableCheck,RevocationDataKnownCheck,RevocationDateAfterBestSignatureTimeCheck,RevocationFreshnessCheckerResultCheck,RevocationInfoAccessPresentCheck,RevocationIssuedBeforeControlTimeCheck,RevocationIssuerTrustedCheck,RevocationIssuerValidityRangeCheck,RevocationResponderIdMatchCheck,SelfIssuedOCSPCheck,SerialNumberCheck,ServiceConsistencyCheck,SignatureAcceptanceValidationResultCheck,SignatureAcceptanceValidationResultCheck,SignatureIntactCheck,SignatureNotAmbiguousCheck,SignaturePolicyHashValidCheck,SignaturePolicyIdentifiedCheck,SignaturePolicyStoreCheck,SignaturePolicyZeroHashCheck,SignedFilesPresentCheck,SignerInformationStoreCheck,SignerLocationCheck,SigningCertificateAttributePresentCheck,SigningCertificateNotRevokedCheck,SigningCertificateRecognitionCheck,SigningCertificateReferencesValidityCheck,SigningTimeAttributePresentCheck,SigningTimeCheck,StructuralValidationCheck,SuccessfulValidationTimeSlidingFoundCheck,SunsetDateCheck,TimestampCoherenceOrderCheck,TimestampDelayCheck,TimestampGenerationTimeNotAfterCertificateExpirationCheck,TimestampGenerationTimeNotAfterCryptographicConstraintsExpirationCheck,TimestampGenerationTimeNotAfterRevocationTimeCheck,TimestampMessageImprintCheck,TimestampValidationCheck,TLFreshnessCheck,TLMRACheck,TLNotExpiredCheck,TLWellSignedCheck,TrustedCertificateMatchTrustServiceCheck,TrustedListReachedForCertificateChainCheck,TrustServiceAtTimeCheck,TrustServicesByCertificateTypeCheck,TSAGeneralNameFieldPresentCheck,TSAGeneralNameOrderMatchCheck,TSAGeneralNameValueMatchCheck,UndefinedChangesCheck,UnicitySigningCertificateAttributeCheck,ValidationContextInitializationResultCheck,ValidationTimeAtCertificateValidityRangeCheck,ValidationTimeSlidingCheck,ValidCAQCCheck,X509CertificateValidationResultCheck,ZipCommentPresentCheck
public abstract class ChainItem<T extends eu.europa.esig.dss.detailedreport.jaxb.XmlConstraintsConclusion>
extends Object
This class is an item of the
Chain class.
That follows the design pattern "chain of responsibility".
Depending on 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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final eu.europa.esig.dss.i18n.I18nProvideri18nProvider -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedChainItem(eu.europa.esig.dss.i18n.I18nProvider i18nProvider, T result, eu.europa.esig.dss.policy.jaxb.LevelConstraint constraint) Common constructorprotectedChainItem(eu.europa.esig.dss.i18n.I18nProvider i18nProvider, T result, eu.europa.esig.dss.policy.jaxb.LevelConstraint constraint, String bbbId) Specific constructor for Basic Building Blocks validation -
Method Summary
Modifier and TypeMethodDescriptionprotected StringBuilds an additional informationprotected eu.europa.esig.dss.detailedreport.jaxb.XmlMessageBuilds a constraint messageprotected eu.europa.esig.dss.detailedreport.jaxb.XmlMessageBuilds an error messageprotected eu.europa.esig.dss.detailedreport.jaxb.XmlMessagebuildXmlMessage(eu.europa.esig.dss.i18n.MessageTag messageTag, Object... args) Builds theXmlMessagevoidexecute()This method allows to execute the chain of responsibility.protected eu.europa.esig.dss.i18n.MessageTagGets an additional informationprotected eu.europa.esig.dss.detailedreport.jaxb.XmlBlockTypeReturns the validating block type (used for validation result of RAC, RFC, etc.)protected eu.europa.esig.dss.i18n.MessageTagReturns an i18n key String of an error message to getprotected abstract eu.europa.esig.dss.enumerations.IndicationGets an Indication in case of failureprotected abstract eu.europa.esig.dss.enumerations.SubIndicationGets a SubIndication in case of failureprotected eu.europa.esig.dss.policy.jaxb.LevelgetLevel()Returns an execution Level of the chain itemprotected eu.europa.esig.dss.i18n.MessageTagReturns an i18n key String of a message to getprotected List<eu.europa.esig.dss.detailedreport.jaxb.XmlMessage> Return a list of previous errors occurred in the chainprotected eu.europa.esig.dss.enumerations.IndicationGets an Indication if the check succeedsprotected eu.europa.esig.dss.enumerations.SubIndicationGets a SubIndication if the check succeedsprotected booleanisIndeterminateConclusion(eu.europa.esig.dss.detailedreport.jaxb.XmlConclusion conclusion) Checks if the conclusion is indeterminateprotected booleanisInvalidConclusion(eu.europa.esig.dss.detailedreport.jaxb.XmlConclusion conclusion) Checks if the conclusion is invalidprotected booleanisValid(eu.europa.esig.dss.detailedreport.jaxb.XmlConstraintsConclusion constraintConclusion) Checks if the conclusion is validprotected booleanisValidConclusion(eu.europa.esig.dss.detailedreport.jaxb.XmlConclusion conclusion) Checks if the conclusion is validprotected abstract booleanprocess()Performs the checksetNextItem(ChainItem<T> nextItem) This method allows to build the chain of responsibility
-
Field Details
-
i18nProvider
protected final eu.europa.esig.dss.i18n.I18nProvider i18nProvideri18nProvider
-
-
Constructor Details
-
ChainItem
protected ChainItem(eu.europa.esig.dss.i18n.I18nProvider i18nProvider, T result, eu.europa.esig.dss.policy.jaxb.LevelConstraint constraint) Common constructor- Parameters:
i18nProvider- theI18nProviderinternationalization providerresult- theChainobject parent of this objectconstraint- theLevelConstraintto follow to execute this ChainItem
-
ChainItem
protected ChainItem(eu.europa.esig.dss.i18n.I18nProvider i18nProvider, T result, eu.europa.esig.dss.policy.jaxb.LevelConstraint constraint, String bbbId) 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
-
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
-
getLevel
protected eu.europa.esig.dss.policy.jaxb.Level getLevel()Returns an execution Level of the chain item- Returns:
Level
-
getMessageTag
protected eu.europa.esig.dss.i18n.MessageTag getMessageTag()Returns an i18n key String of a message to get- Returns:
MessageTagkey
-
getErrorMessageTag
protected eu.europa.esig.dss.i18n.MessageTag 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
XmlMessages
-
getFailedIndicationForConclusion
protected abstract eu.europa.esig.dss.enumerations.Indication getFailedIndicationForConclusion()Gets an Indication in case of failure- Returns:
Indication
-
getFailedSubIndicationForConclusion
protected abstract eu.europa.esig.dss.enumerations.SubIndication getFailedSubIndicationForConclusion()Gets a SubIndication in case of failure- Returns:
SubIndication
-
buildErrorMessage
protected eu.europa.esig.dss.detailedreport.jaxb.XmlMessage buildErrorMessage()Builds an error message- Returns:
XmlMessage
-
buildConstraintMessage
protected eu.europa.esig.dss.detailedreport.jaxb.XmlMessage buildConstraintMessage()Builds a constraint message- Returns:
XmlMessage
-
getBlockType
protected eu.europa.esig.dss.detailedreport.jaxb.XmlBlockType getBlockType()Returns the validating block type (used for validation result of RAC, RFC, etc.)- Returns:
XmlBlockType
-
buildAdditionalInfo
-
getAdditionalInfo
protected eu.europa.esig.dss.i18n.MessageTag getAdditionalInfo()Gets an additional information- Returns:
MessageTag
-
buildXmlMessage
protected eu.europa.esig.dss.detailedreport.jaxb.XmlMessage buildXmlMessage(eu.europa.esig.dss.i18n.MessageTag messageTag, Object... args) Builds theXmlMessage- Parameters:
messageTag-MessageTagargs- arguments- Returns:
XmlMessage
-
getSuccessIndication
protected eu.europa.esig.dss.enumerations.Indication getSuccessIndication()Gets an Indication if the check succeeds- Returns:
Indication
-
getSuccessSubIndication
protected eu.europa.esig.dss.enumerations.SubIndication getSuccessSubIndication()Gets a SubIndication if the check succeeds- Returns:
SubIndication
-
isValid
protected boolean isValid(eu.europa.esig.dss.detailedreport.jaxb.XmlConstraintsConclusion constraintConclusion) Checks if the conclusion is valid- Parameters:
constraintConclusion-XmlConstraintsConclusion- Returns:
- TRUE if the conclusion has a passed status, FALSE otherwise
-
isValidConclusion
protected boolean isValidConclusion(eu.europa.esig.dss.detailedreport.jaxb.XmlConclusion conclusion) Checks if the conclusion is valid- Parameters:
conclusion-XmlConclusion- Returns:
- TRUE if the conclusion has a PASSED indication, FALSE otherwise
-
isInvalidConclusion
protected boolean isInvalidConclusion(eu.europa.esig.dss.detailedreport.jaxb.XmlConclusion conclusion) Checks if the conclusion is invalid- Parameters:
conclusion-XmlConclusion- Returns:
- TRUE if the conclusion has a FAILED indication, FALSE otherwise
-
isIndeterminateConclusion
protected boolean isIndeterminateConclusion(eu.europa.esig.dss.detailedreport.jaxb.XmlConclusion conclusion) Checks if the conclusion is indeterminate- Parameters:
conclusion-XmlConclusion- Returns:
- TRUE if the conclusion has a INDETERMINATE indication, FALSE otherwise
-