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, FilenameAdherenceCheck, 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, RevocationAfterCertificateIssuanceCheck, RevocationCertHashMatchCheck, RevocationCertHashPresenceCheck, RevocationDataAcceptableCheck, RevocationDataAvailableCheck, RevocationDataKnownCheck, RevocationDateAfterBestSignatureTimeCheck, RevocationFreshnessCheckerResultCheck, RevocationHasInformationAboutCertificateCheck, RevocationInfoAccessPresentCheck, RevocationIssuedBeforeControlTimeCheck, RevocationIssuerKnownCheck, RevocationIssuerTrustedCheck, RevocationIssuerValidAtProductionTimeCheck, RevocationIssuerValidityRangeCheck, RevocationResponderIdMatchCheck, SelfIssuedOCSPCheck, SerialNumberCheck, ServiceConsistencyCheck, SignatureAcceptanceValidationResultCheck, SignatureAcceptanceValidationResultCheck, SignatureIntactCheck, SignatureNotAmbiguousCheck, SignaturePolicyHashValidCheck, SignaturePolicyIdentifiedCheck, SignaturePolicyStoreCheck, SignaturePolicyZeroHashCheck, SignedFilesPresentCheck, SignerInformationStoreCheck, SignerLocationCheck, SigningCertificateAttributePresentCheck, SigningCertificateNotRevokedCheck, SigningCertificateRecognitionCheck, SigningCertificateRefDigestAlgorithmCheck, SigningCertificateReferencesValidityCheck, SigningTimeAttributePresentCheck, SigningTimeCheck, StructuralValidationCheck, SuccessfulValidationTimeSlidingFoundCheck, SunsetDateCheck, ThisUpdatePresenceCheck, TimestampCoherenceOrderCheck, TimestampDelayCheck, TimestampGenerationTimeNotAfterCertificateExpirationCheck, TimestampGenerationTimeNotAfterCryptographicConstraintsExpirationCheck, TimestampGenerationTimeNotAfterRevocationTimeCheck, TimestampMessageImprintCheck, TimestampValidationCheck, TLFreshnessCheck, TLMRACheck, TLNotExpiredCheck, TLStructureCheck, 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 LevelRule 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

    Fields
    Modifier and Type
    Field
    Description
    protected final eu.europa.esig.dss.i18n.I18nProvider
    i18nProvider
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ChainItem(eu.europa.esig.dss.i18n.I18nProvider i18nProvider, T result, eu.europa.esig.dss.model.policy.LevelRule constraint)
    Common constructor
    protected
    ChainItem(eu.europa.esig.dss.i18n.I18nProvider i18nProvider, T result, eu.europa.esig.dss.model.policy.LevelRule constraint, String bbbId)
    Specific constructor for Basic Building Blocks validation
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    Builds an additional information
    protected eu.europa.esig.dss.detailedreport.jaxb.XmlMessage
    Builds a constraint message
    protected eu.europa.esig.dss.detailedreport.jaxb.XmlMessage
    Builds an error message
    protected eu.europa.esig.dss.detailedreport.jaxb.XmlMessage
    buildXmlMessage(eu.europa.esig.dss.i18n.MessageTag messageTag, Object... args)
    Builds the XmlMessage
    void
    This method allows to execute the chain of responsibility.
    protected eu.europa.esig.dss.i18n.MessageTag
    Gets an additional information
    protected eu.europa.esig.dss.detailedreport.jaxb.XmlBlockType
    Returns the validating block type (used for validation result of RAC, RFC, etc.)
    protected eu.europa.esig.dss.i18n.MessageTag
    Returns an i18n key String of an error message to get
    protected abstract eu.europa.esig.dss.enumerations.Indication
    Gets an Indication in case of failure
    protected abstract eu.europa.esig.dss.enumerations.SubIndication
    Gets a SubIndication in case of failure
    protected eu.europa.esig.dss.enumerations.Level
    Returns an execution Level of the chain item
    protected eu.europa.esig.dss.i18n.MessageTag
    Returns an i18n key String of a message to get
    protected List<eu.europa.esig.dss.detailedreport.jaxb.XmlMessage>
    Return a list of previous errors occurred in the chain
    protected eu.europa.esig.dss.enumerations.Indication
    Gets an Indication if the check succeeds
    protected eu.europa.esig.dss.enumerations.SubIndication
    Gets a SubIndication if the check succeeds
    protected boolean
    isIndeterminateConclusion(eu.europa.esig.dss.detailedreport.jaxb.XmlConclusion conclusion)
    Checks if the conclusion is indeterminate
    protected boolean
    isInvalidConclusion(eu.europa.esig.dss.detailedreport.jaxb.XmlConclusion conclusion)
    Checks if the conclusion is invalid
    protected boolean
    isValid(eu.europa.esig.dss.detailedreport.jaxb.XmlConstraintsConclusion constraintConclusion)
    Checks if the conclusion is valid
    protected boolean
    isValidConclusion(eu.europa.esig.dss.detailedreport.jaxb.XmlConclusion conclusion)
    Checks if the conclusion is valid
    protected abstract boolean
    Performs the check
    setNextItem(ChainItem<T> nextItem)
    This method allows to build the chain of responsibility

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • i18nProvider

      protected final eu.europa.esig.dss.i18n.I18nProvider i18nProvider
      i18nProvider
  • Constructor Details

    • ChainItem

      protected ChainItem(eu.europa.esig.dss.i18n.I18nProvider i18nProvider, T result, eu.europa.esig.dss.model.policy.LevelRule constraint)
      Common constructor
      Parameters:
      i18nProvider - the I18nProvider internationalization provider
      result - the Chain object parent of this object
      constraint - the LevelRule to follow to execute this ChainItem
    • ChainItem

      protected ChainItem(eu.europa.esig.dss.i18n.I18nProvider i18nProvider, T result, eu.europa.esig.dss.model.policy.LevelRule constraint, String bbbId)
      Specific constructor for Basic Building Blocks validation
      Parameters:
      i18nProvider - the I18nProvider internationalization provider
      result - the Chain object parent of this object
      constraint - the LevelRule to follow to execute this ChainItem
      bbbId - the XmlBasicBuildingBlocks's id
  • Method Details

    • setNextItem

      public ChainItem<T> setNextItem(ChainItem<T> nextItem)
      This method allows to build the chain of responsibility
      Parameters:
      nextItem - the next ChainItem to call if this one succeed
      Returns:
      the next item
    • execute

      public void execute()
      This method allows to execute the chain of responsibility. It will run all the chain until the first Level.FAIL and 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.enumerations.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:
      MessageTag key
    • getErrorMessageTag

      protected eu.europa.esig.dss.i18n.MessageTag getErrorMessageTag()
      Returns an i18n key String of an error message to get
      Returns:
      MessageTag key
    • getPreviousErrors

      protected List<eu.europa.esig.dss.detailedreport.jaxb.XmlMessage> 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

      protected String buildAdditionalInfo()
      Builds an additional information
      Returns:
      String
    • 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 the XmlMessage
      Parameters:
      messageTag - MessageTag
      args - 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