From da84f40deb73404d0216fccd5437dcd8166295f7 Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Tue, 19 Mar 2024 18:58:19 +0100 Subject: [PATCH] Cleansing --- .../helger/phive/ves/engine/load/LoadedVES.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/phive-ves-engine/src/main/java/com/helger/phive/ves/engine/load/LoadedVES.java b/phive-ves-engine/src/main/java/com/helger/phive/ves/engine/load/LoadedVES.java index 78d183a6..43086174 100644 --- a/phive-ves-engine/src/main/java/com/helger/phive/ves/engine/load/LoadedVES.java +++ b/phive-ves-engine/src/main/java/com/helger/phive/ves/engine/load/LoadedVES.java @@ -425,7 +425,7 @@ private ICommonsList > _getValidationExe } @Nonnull - private EValidationExecutorStatusType _getRecursiveExecutorStatusType () + public EValidationExecutorStatusType getExecutorStatusType () { // Local status first, because in case of failure, this is a quicker break final EValidationExecutorStatusType ret = m_aStatus.getDateTimeValidityNow (); @@ -440,7 +440,7 @@ private EValidationExecutorStatusType _getRecursiveExecutorStatusType () return EValidationExecutorStatusType.VALID; // Requirement present - return _getLoadedVESRequiresNotNull ()._getRecursiveExecutorStatusType (); + return _getLoadedVESRequiresNotNull ().getExecutorStatusType (); } public void applyValidation (@Nonnull final IValidationSource aValidationSource, @@ -452,15 +452,19 @@ public void applyValidation (@Nonnull final IValidationSource aValidationSource, ValueEnforcer.notNull (aLocale, "Locale"); if (!hasExecutor ()) - throw new VESLoadingException ("The loaded VES has no Executor Set and can therefore not be used for validating objects"); - - final EValidationExecutorStatusType eStatusType = _getRecursiveExecutorStatusType (); - final ICommonsList > aExecutors = _getValidationExecutorsRecursive (); + throw new VESLoadingException ("The loaded VES has no Executor and can therefore not be used for validating objects"); + // Create status + final EValidationExecutorStatusType eStatusType = getExecutorStatusType (); final ValidationExecutorSetStatus aVESStatus = new ValidationExecutorSetStatus (eStatusType, m_aStatus.getValidFromOffset (), m_aStatus.getValidToOffset (), m_aStatus.getReplacementVESID ()); + + // Build executors + final ICommonsList > aExecutors = _getValidationExecutorsRecursive (); + + // Assemble VES final IValidationExecutorSet aVES = ValidationExecutorSet.create (m_aHeader.getVESID (), m_aHeader.getName (), aVESStatus,