protected boolean isValid(XmlConstraintsConclusion constraintConclusion) { return constraintConclusion != null && isValidConclusion(constraintConclusion.getConclusion()); }
private void addConstraint(XmlConstraint constraint) { result.getConstraint().add(constraint); }
/** * Create an instance of {@link XmlConstraintsConclusion } * */ public XmlConstraintsConclusion createXmlConstraintsConclusion() { return new XmlConstraintsConclusion(); }
protected void collectErrorsWarnsInfos() { XmlConclusion conclusion = result.getConclusion(); List<XmlConstraint> constraints = result.getConstraint(); for (XmlConstraint xmlConstraint : constraints) { XmlName error = xmlConstraint.getError(); if (error != null) { conclusion.getErrors().add(error); } XmlName warning = xmlConstraint.getWarning(); if (warning != null) { conclusion.getWarnings().add(warning); } XmlName info = xmlConstraint.getInfo(); if (info != null) { conclusion.getInfos().add(info); } } }
/** * This method allows to initialize and execute the complete chain until the first failure. * * @return the complete result with constraints and final conclusion for the chain */ public T execute() { initChain(); if (firstItem != null) { firstItem.execute(); } if (result.getConclusion() == null) { XmlConclusion conclusion = new XmlConclusion(); conclusion.setIndication(Indication.PASSED); result.setConclusion(conclusion); } addAdditionalInfo(); return result; }
private void recordCustomSuccessConclusion() { XmlConclusion conclusion = new XmlConclusion(); conclusion.setIndication(getSuccessIndication()); conclusion.setSubIndication(getSuccessSubIndication()); result.setConclusion(conclusion); }
private void updateFinalConclusion(XmlBasicBuildingBlocks result, XmlConstraintsConclusion constraintsAndConclusion) { XmlConclusion finalConclusion = result.getConclusion(); XmlConclusion currentConclusion = constraintsAndConclusion.getConclusion(); List<XmlConstraint> constraints = constraintsAndConclusion.getConstraint(); if (!Indication.PASSED.equals(currentConclusion.getIndication())) { finalConclusion.setIndication(currentConclusion.getIndication()); finalConclusion.setSubIndication(currentConclusion.getSubIndication()); finalConclusion.getErrors().addAll(currentConclusion.getErrors()); } if (Utils.isCollectionNotEmpty(constraints)) { for (XmlConstraint constraint : constraints) { XmlName info = constraint.getInfo(); if (info != null) { finalConclusion.getInfos().add(info); } XmlName warning = constraint.getWarning(); if (warning != null) { finalConclusion.getWarnings().add(warning); } } } }
private void recordConclusion() { XmlConclusion conclusion = new XmlConclusion(); conclusion.setIndication(getFailedIndicationForConclusion()); conclusion.setSubIndication(getFailedSubIndicationForConclusion()); List<XmlName> previousErrors = getPreviousErrors(); if (Utils.isCollectionNotEmpty(previousErrors)) { conclusion.getErrors().addAll(previousErrors); } else { conclusion.getErrors().add(buildXmlName(getErrorMessageTag())); } result.setConclusion(conclusion); }
private boolean isValid(XmlConstraintsConclusion xmlConstraintConclusion) { return xmlConstraintConclusion != null && xmlConstraintConclusion.getConclusion() != null && Indication.PASSED.equals(xmlConstraintConclusion.getConclusion().getIndication()); }
private void collect(MessageType type, Set<String> result, XmlConstraintsConclusion constraintConclusion) { if (constraintConclusion != null && Utils.isCollectionNotEmpty(constraintConclusion.getConstraint())) { for (XmlConstraint constraint : constraintConclusion.getConstraint()) { XmlName message = getMessage(type, constraint); if (message != null) { result.add(message.getValue()); } if (Utils.isStringNotBlank(constraint.getId())) { collect(type, result, getBasicBuildingBlockById(constraint.getId())); } } } }
public Indication getHighestIndication(String signatureId) { return getHighestConclusion(signatureId).getConclusion().getIndication(); }
public SubIndication getHighestSubIndication(String signatureId) { return getHighestConclusion(signatureId).getConclusion().getSubIndication(); }
@Override protected boolean process() { if (longTermValidationResult != null && longTermValidationResult.getConclusion() != null) { ltvIndication = longTermValidationResult.getConclusion().getIndication(); ltvSubIndication = longTermValidationResult.getConclusion().getSubIndication(); ltvErrors = longTermValidationResult.getConclusion().getErrors(); return Indication.PASSED.equals(ltvIndication) || (Indication.INDETERMINATE.equals(ltvIndication) && (SubIndication.REVOKED_NO_POE.equals(ltvSubIndication) || SubIndication.REVOKED_CA_NO_POE.equals(ltvSubIndication) || SubIndication.OUT_OF_BOUNDS_NO_POE.equals(ltvSubIndication) || SubIndication.CRYPTO_CONSTRAINTS_FAILURE_NO_POE.equals(ltvSubIndication))); } return false; }
@Override protected boolean process() { if (basicSignatureValidation != null && basicSignatureValidation.getConclusion() != null) { XmlConclusion basicSignatureConclusion = basicSignatureValidation.getConclusion(); bbbIndication = basicSignatureConclusion.getIndication(); bbbSubIndication = basicSignatureConclusion.getSubIndication(); bbbErrors = basicSignatureConclusion.getErrors(); boolean allowed = Indication.PASSED.equals(bbbIndication) || (Indication.INDETERMINATE.equals(bbbIndication) && (SubIndication.CRYPTO_CONSTRAINTS_FAILURE_NO_POE.equals(bbbSubIndication) || SubIndication.REVOKED_NO_POE.equals(bbbSubIndication) || SubIndication.OUT_OF_BOUNDS_NO_POE.equals(bbbSubIndication))); return allowed; } return false; }
XmlConclusion bsConclusion = basicSignatureValidation.getConclusion(); if (Indication.INDETERMINATE.equals(bsConclusion.getIndication()) && SubIndication.REVOKED_NO_POE.equals(bsConclusion.getSubIndication())) { item = item.setNextItem(revocationDateAfterBestSignatureDate(bestSignatureTime));