Skip to content

Commit

Permalink
Added status dates
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Apr 10, 2024
1 parent 4115790 commit 5f749af
Show file tree
Hide file tree
Showing 12 changed files with 136 additions and 15 deletions.
6 changes: 5 additions & 1 deletion phive-rules-peppol-legacy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@
<groupId>com.helger.schematron</groupId>
<artifactId>ph-schematron-pure</artifactId>
</dependency>

<dependency>
<groupId>com.helger.phive.rules</groupId>
<artifactId>phive-rules-peppol</artifactId>
</dependency>

<dependency>
<groupId>com.helger.peppol</groupId>
<artifactId>peppol-testfiles</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,24 @@

import java.time.LocalDate;
import java.time.Month;
import java.time.OffsetDateTime;

import javax.annotation.Nonnull;
import javax.annotation.concurrent.Immutable;

import com.helger.commons.ValueEnforcer;
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.datetime.PDTFactory;
import com.helger.commons.io.resource.ClassPathResource;
import com.helger.commons.io.resource.IReadableResource;
import com.helger.commons.version.Version;
import com.helger.diver.api.version.VESID;
import com.helger.phive.api.executorset.IValidationExecutorSetRegistry;
import com.helger.phive.api.executorset.ValidationExecutorSet;
import com.helger.phive.api.executorset.status.EValidationExecutorStatusType;
import com.helger.phive.api.executorset.status.IValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatusHistoryItem;
import com.helger.phive.xml.schematron.ValidationExecutorSchematron;
import com.helger.phive.xml.source.IValidationSourceXML;
import com.helger.phive.xml.xsd.ValidationExecutorXSD;
Expand All @@ -52,6 +56,7 @@ public final class PeppolValidation3_10_0
public static final Version PEPPOL_VALIDATION_ARTEFACT_VERSION = new Version (3, 10, 0);
public static final String VERSION_STR = PEPPOL_VALIDATION_ARTEFACT_VERSION.getAsString (true);
public static final LocalDate VALID_PER = PDTFactory.createLocalDate (2020, Month.MAY, 15);
public static final OffsetDateTime VALID_PER_UTC = PDTFactory.createOffsetDateTimeUTC (VALID_PER);

// Standard
private static final String GROUP_ID = "eu.peppol.bis3";
Expand Down Expand Up @@ -176,7 +181,14 @@ private static ValidationExecutorSchematron _createXSLT (@Nonnull final IReadabl
@Nonnull
private static IValidationExecutorSetStatus _createStatus (final boolean bIsDeprecated)
{
return ValidationExecutorSetStatus.createDeprecatedNow (bIsDeprecated);
return new ValidationExecutorSetStatus (PDTFactory.getCurrentOffsetDateTime (),
bIsDeprecated ? EValidationExecutorStatusType.DEPRECATED
: EValidationExecutorStatusType.VALID,
VALID_PER_UTC,
PeppolValidation3_10_1.VALID_PER_UTC,
(String) null,
(VESID) null,
(ICommonsList <ValidationExecutorSetStatusHistoryItem>) null);
}

public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidationSourceXML> aRegistry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,24 @@

import java.time.LocalDate;
import java.time.Month;
import java.time.OffsetDateTime;

import javax.annotation.Nonnull;
import javax.annotation.concurrent.Immutable;

import com.helger.commons.ValueEnforcer;
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.datetime.PDTFactory;
import com.helger.commons.io.resource.ClassPathResource;
import com.helger.commons.io.resource.IReadableResource;
import com.helger.commons.version.Version;
import com.helger.diver.api.version.VESID;
import com.helger.phive.api.executorset.IValidationExecutorSetRegistry;
import com.helger.phive.api.executorset.ValidationExecutorSet;
import com.helger.phive.api.executorset.status.EValidationExecutorStatusType;
import com.helger.phive.api.executorset.status.IValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatusHistoryItem;
import com.helger.phive.xml.schematron.ValidationExecutorSchematron;
import com.helger.phive.xml.source.IValidationSourceXML;
import com.helger.phive.xml.xsd.ValidationExecutorXSD;
Expand All @@ -52,6 +56,7 @@ public final class PeppolValidation3_10_1
public static final Version PEPPOL_VALIDATION_ARTEFACT_VERSION = new Version (3, 10, 1);
public static final String VERSION_STR = PEPPOL_VALIDATION_ARTEFACT_VERSION.getAsString (true);
public static final LocalDate VALID_PER = PDTFactory.createLocalDate (2020, Month.JUNE, 30);
public static final OffsetDateTime VALID_PER_UTC = PDTFactory.createOffsetDateTimeUTC (VALID_PER);

// Standard
private static final String GROUP_ID = "eu.peppol.bis3";
Expand Down Expand Up @@ -122,7 +127,14 @@ private static ValidationExecutorSchematron _createXSLT (@Nonnull final IReadabl
@Nonnull
private static IValidationExecutorSetStatus _createStatus (final boolean bIsDeprecated)
{
return ValidationExecutorSetStatus.createDeprecatedNow (bIsDeprecated);
return new ValidationExecutorSetStatus (PDTFactory.getCurrentOffsetDateTime (),
bIsDeprecated ? EValidationExecutorStatusType.DEPRECATED
: EValidationExecutorStatusType.VALID,
VALID_PER_UTC,
PeppolValidation3_11_0.VALID_PER_UTC,
(String) null,
(VESID) null,
(ICommonsList <ValidationExecutorSetStatusHistoryItem>) null);
}

public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidationSourceXML> aRegistry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,24 @@

import java.time.LocalDate;
import java.time.Month;
import java.time.OffsetDateTime;

import javax.annotation.Nonnull;
import javax.annotation.concurrent.Immutable;

import com.helger.commons.ValueEnforcer;
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.datetime.PDTFactory;
import com.helger.commons.io.resource.ClassPathResource;
import com.helger.commons.io.resource.IReadableResource;
import com.helger.commons.version.Version;
import com.helger.diver.api.version.VESID;
import com.helger.phive.api.executorset.IValidationExecutorSetRegistry;
import com.helger.phive.api.executorset.ValidationExecutorSet;
import com.helger.phive.api.executorset.status.EValidationExecutorStatusType;
import com.helger.phive.api.executorset.status.IValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatusHistoryItem;
import com.helger.phive.xml.schematron.ValidationExecutorSchematron;
import com.helger.phive.xml.source.IValidationSourceXML;
import com.helger.phive.xml.xsd.ValidationExecutorXSD;
Expand All @@ -54,6 +58,7 @@ public final class PeppolValidation3_11_0
public static final Version PEPPOL_VALIDATION_ARTEFACT_VERSION = new Version (3, 11, 0);
public static final String VERSION_STR = PEPPOL_VALIDATION_ARTEFACT_VERSION.getAsString (true);
public static final LocalDate VALID_PER = PDTFactory.createLocalDate (2020, Month.NOVEMBER, 16);
public static final OffsetDateTime VALID_PER_UTC = PDTFactory.createOffsetDateTimeUTC (VALID_PER);

// Standard
private static final String GROUP_ID = "eu.peppol.bis3";
Expand Down Expand Up @@ -124,7 +129,14 @@ private static ValidationExecutorSchematron _createXSLT (@Nonnull final IReadabl
@Nonnull
private static IValidationExecutorSetStatus _createStatus (final boolean bIsDeprecated)
{
return ValidationExecutorSetStatus.createDeprecatedNow (bIsDeprecated);
return new ValidationExecutorSetStatus (PDTFactory.getCurrentOffsetDateTime (),
bIsDeprecated ? EValidationExecutorStatusType.DEPRECATED
: EValidationExecutorStatusType.VALID,
VALID_PER_UTC,
PeppolValidation3_11_1.VALID_PER_UTC,
(String) null,
(VESID) null,
(ICommonsList <ValidationExecutorSetStatusHistoryItem>) null);
}

public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidationSourceXML> aRegistry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,24 @@

import java.time.LocalDate;
import java.time.Month;
import java.time.OffsetDateTime;

import javax.annotation.Nonnull;
import javax.annotation.concurrent.Immutable;

import com.helger.commons.ValueEnforcer;
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.datetime.PDTFactory;
import com.helger.commons.io.resource.ClassPathResource;
import com.helger.commons.io.resource.IReadableResource;
import com.helger.commons.version.Version;
import com.helger.diver.api.version.VESID;
import com.helger.phive.api.executorset.IValidationExecutorSetRegistry;
import com.helger.phive.api.executorset.ValidationExecutorSet;
import com.helger.phive.api.executorset.status.EValidationExecutorStatusType;
import com.helger.phive.api.executorset.status.IValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatusHistoryItem;
import com.helger.phive.xml.schematron.ValidationExecutorSchematron;
import com.helger.phive.xml.source.IValidationSourceXML;
import com.helger.phive.xml.xsd.ValidationExecutorXSD;
Expand All @@ -53,6 +57,7 @@ public final class PeppolValidation3_11_1
public static final Version PEPPOL_VALIDATION_ARTEFACT_VERSION = new Version (3, 11, 1);
public static final String VERSION_STR = PEPPOL_VALIDATION_ARTEFACT_VERSION.getAsString (true);
public static final LocalDate VALID_PER = PDTFactory.createLocalDate (2020, Month.NOVEMBER, 16);
public static final OffsetDateTime VALID_PER_UTC = PDTFactory.createOffsetDateTimeUTC (VALID_PER);

// Standard
private static final String GROUP_ID = "eu.peppol.bis3";
Expand Down Expand Up @@ -123,7 +128,14 @@ private static ValidationExecutorSchematron _createXSLT (@Nonnull final IReadabl
@Nonnull
private static IValidationExecutorSetStatus _createStatus (final boolean bIsDeprecated)
{
return ValidationExecutorSetStatus.createDeprecatedNow (bIsDeprecated);
return new ValidationExecutorSetStatus (PDTFactory.getCurrentOffsetDateTime (),
bIsDeprecated ? EValidationExecutorStatusType.DEPRECATED
: EValidationExecutorStatusType.VALID,
VALID_PER_UTC,
PeppolValidation3_12_0.VALID_PER_UTC,
(String) null,
(VESID) null,
(ICommonsList <ValidationExecutorSetStatusHistoryItem>) null);
}

public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidationSourceXML> aRegistry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,24 @@

import java.time.LocalDate;
import java.time.Month;
import java.time.OffsetDateTime;

import javax.annotation.Nonnull;
import javax.annotation.concurrent.Immutable;

import com.helger.commons.ValueEnforcer;
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.datetime.PDTFactory;
import com.helger.commons.io.resource.ClassPathResource;
import com.helger.commons.io.resource.IReadableResource;
import com.helger.commons.version.Version;
import com.helger.diver.api.version.VESID;
import com.helger.phive.api.executorset.IValidationExecutorSetRegistry;
import com.helger.phive.api.executorset.ValidationExecutorSet;
import com.helger.phive.api.executorset.status.EValidationExecutorStatusType;
import com.helger.phive.api.executorset.status.IValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatusHistoryItem;
import com.helger.phive.xml.schematron.ValidationExecutorSchematron;
import com.helger.phive.xml.source.IValidationSourceXML;
import com.helger.phive.xml.xsd.ValidationExecutorXSD;
Expand All @@ -53,6 +57,7 @@ public final class PeppolValidation3_12_0
public static final Version PEPPOL_VALIDATION_ARTEFACT_VERSION = new Version (3, 12, 0);
public static final String VERSION_STR = PEPPOL_VALIDATION_ARTEFACT_VERSION.getAsString (true);
public static final LocalDate VALID_PER = PDTFactory.createLocalDate (2021, Month.MAY, 17);
public static final OffsetDateTime VALID_PER_UTC = PDTFactory.createOffsetDateTimeUTC (VALID_PER);

// Standard
private static final String GROUP_ID = "eu.peppol.bis3";
Expand Down Expand Up @@ -123,7 +128,14 @@ private static ValidationExecutorSchematron _createXSLT (@Nonnull final IReadabl
@Nonnull
private static IValidationExecutorSetStatus _createStatus (final boolean bIsDeprecated)
{
return ValidationExecutorSetStatus.createDeprecatedNow (bIsDeprecated);
return new ValidationExecutorSetStatus (PDTFactory.getCurrentOffsetDateTime (),
bIsDeprecated ? EValidationExecutorStatusType.DEPRECATED
: EValidationExecutorStatusType.VALID,
VALID_PER_UTC,
PeppolValidation3_13_0.VALID_PER_UTC,
(String) null,
(VESID) null,
(ICommonsList <ValidationExecutorSetStatusHistoryItem>) null);
}

public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidationSourceXML> aRegistry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,24 @@

import java.time.LocalDate;
import java.time.Month;
import java.time.OffsetDateTime;

import javax.annotation.Nonnull;
import javax.annotation.concurrent.Immutable;

import com.helger.commons.ValueEnforcer;
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.datetime.PDTFactory;
import com.helger.commons.io.resource.ClassPathResource;
import com.helger.commons.io.resource.IReadableResource;
import com.helger.commons.version.Version;
import com.helger.diver.api.version.VESID;
import com.helger.phive.api.executorset.IValidationExecutorSetRegistry;
import com.helger.phive.api.executorset.ValidationExecutorSet;
import com.helger.phive.api.executorset.status.EValidationExecutorStatusType;
import com.helger.phive.api.executorset.status.IValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatusHistoryItem;
import com.helger.phive.xml.schematron.ValidationExecutorSchematron;
import com.helger.phive.xml.source.IValidationSourceXML;
import com.helger.phive.xml.xsd.ValidationExecutorXSD;
Expand All @@ -53,6 +57,7 @@ public final class PeppolValidation3_13_0
public static final Version PEPPOL_VALIDATION_ARTEFACT_VERSION = new Version (3, 13, 0);
public static final String VERSION_STR = PEPPOL_VALIDATION_ARTEFACT_VERSION.getAsString (true);
public static final LocalDate VALID_PER = PDTFactory.createLocalDate (2021, Month.NOVEMBER, 15);
public static final OffsetDateTime VALID_PER_UTC = PDTFactory.createOffsetDateTimeUTC (VALID_PER);

// Standard
private static final String GROUP_ID = "eu.peppol.bis3";
Expand Down Expand Up @@ -123,7 +128,14 @@ private static ValidationExecutorSchematron _createXSLT (@Nonnull final IReadabl
@Nonnull
private static IValidationExecutorSetStatus _createStatus (final boolean bIsDeprecated)
{
return ValidationExecutorSetStatus.createDeprecatedNow (bIsDeprecated);
return new ValidationExecutorSetStatus (PDTFactory.getCurrentOffsetDateTime (),
bIsDeprecated ? EValidationExecutorStatusType.DEPRECATED
: EValidationExecutorStatusType.VALID,
VALID_PER_UTC,
PeppolValidation3_14_0.VALID_PER_UTC,
(String) null,
(VESID) null,
(ICommonsList <ValidationExecutorSetStatusHistoryItem>) null);
}

public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidationSourceXML> aRegistry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,26 @@

import java.time.LocalDate;
import java.time.Month;
import java.time.OffsetDateTime;

import javax.annotation.Nonnull;
import javax.annotation.concurrent.Immutable;

import com.helger.cii.d16b.CCIID16B;
import com.helger.cii.d16b.CIID16BNamespaceContext;
import com.helger.commons.ValueEnforcer;
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.datetime.PDTFactory;
import com.helger.commons.io.resource.ClassPathResource;
import com.helger.commons.io.resource.IReadableResource;
import com.helger.commons.version.Version;
import com.helger.diver.api.version.VESID;
import com.helger.phive.api.executorset.IValidationExecutorSetRegistry;
import com.helger.phive.api.executorset.ValidationExecutorSet;
import com.helger.phive.api.executorset.status.EValidationExecutorStatusType;
import com.helger.phive.api.executorset.status.IValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatus;
import com.helger.phive.api.executorset.status.ValidationExecutorSetStatusHistoryItem;
import com.helger.phive.xml.schematron.ValidationExecutorSchematron;
import com.helger.phive.xml.source.IValidationSourceXML;
import com.helger.phive.xml.xsd.ValidationExecutorXSD;
Expand All @@ -55,6 +59,7 @@ public final class PeppolValidation3_14_0
public static final Version PEPPOL_VALIDATION_ARTEFACT_VERSION = new Version (3, 14, 0);
public static final String VERSION_STR = PEPPOL_VALIDATION_ARTEFACT_VERSION.getAsString (true);
public static final LocalDate VALID_PER = PDTFactory.createLocalDate (2022, Month.MAY, 30);
public static final OffsetDateTime VALID_PER_UTC = PDTFactory.createOffsetDateTimeUTC (VALID_PER);

// Standard
private static final String GROUP_ID = "eu.peppol.bis3";
Expand Down Expand Up @@ -139,7 +144,14 @@ private static ValidationExecutorSchematron _createXsltUBL (@Nonnull final IRead
@Nonnull
private static IValidationExecutorSetStatus _createStatus (final boolean bIsDeprecated)
{
return ValidationExecutorSetStatus.createDeprecatedNow (bIsDeprecated);
return new ValidationExecutorSetStatus (PDTFactory.getCurrentOffsetDateTime (),
bIsDeprecated ? EValidationExecutorStatusType.DEPRECATED
: EValidationExecutorStatusType.VALID,
VALID_PER_UTC,
PeppolValidation3_15_0.VALID_PER_UTC,
(String) null,
(VESID) null,
(ICommonsList <ValidationExecutorSetStatusHistoryItem>) null);
}

public static void init (@Nonnull final IValidationExecutorSetRegistry <IValidationSourceXML> aRegistry)
Expand Down
Loading

0 comments on commit 5f749af

Please sign in to comment.