Class SubscriptionState.TimeValidity

java.lang.Object
com.evolveum.midpoint.repo.common.subscription.SubscriptionState.TimeValidity
All Implemented Interfaces:
Serializable
Enclosing class:
SubscriptionState

@VisibleForTesting public static class SubscriptionState.TimeValidity extends Object implements Serializable
Representation of the subscription validity interval.
See Also:
  • Constructor Details

  • Method Details

    • determine

      @VisibleForTesting public static SubscriptionState.TimeValidity determine(@NotNull @NotNull SubscriptionId subscriptionId)
    • getMonthsAfter

      @VisibleForTesting public int getMonthsAfter(@NotNull @NotNull LocalDate now)
      How many months passed since the first day after the subscription validity to now. Incomplete months are counted as well. For example, if the subscription ends 05/24, then the first month starts on June 1st, 2024 (inclusive), the second month starts on July 1st, 2024 (inclusive), and so on.
    • daysToGracePeriodGone

      @VisibleForTesting public int daysToGracePeriodGone(@NotNull @NotNull LocalDate now)
    • isActive

      public boolean isActive()
      Is this state generally considered "active"? As for the grace period, note that not all subscriptions have it. For those that do, it is considered still active, although with potential limitations.
    • isInGracePeriod

      public boolean isInGracePeriod()
    • toString

      public String toString()
      Overrides:
      toString in class Object