Interface ContributionVisibility

    • Method Detail

      • getSpecificPeriod

        Optional<Period> getSpecificPeriod()
        Gets the period of visibility which has been specifically set.
        Returns:
        an optional Period, filled if a period has been specifically set. If no specific period has been set, otherwise if it is default visibility period of the contribution that is taken, then returns nothing (empty optional).
      • getPeriod

        Period getPeriod()
        Gets the actual period of visibility of a contribution.

        If no specific period is set, by default the period taken into account is the never ending duration starting at the date of the last contribution update.

        If a period has been specifically set, so getSpecificPeriod() returns a not empty result, then the period is taken into account.
        If the last update date of the Contribution is greater than the begin date of the specific period, then the start date of returned period is overridden with the last update date of Contribution.

        Returns:
        a period instance.
      • isActive

        default boolean isActive()
        Indicates if the visibility is active at OffsetDateTime.now().
        Returns:
        true if active, false otherwise
      • willBeActive

        default boolean willBeActive()
        Indicates if the visibility will be active after OffsetDateTime.now().
        Returns:
        true if it will be active, false otherwise
      • hasBeenActive

        default boolean hasBeenActive()
        Indicates if the visibility has been active before OffsetDateTime.now().
        Returns:
        true if it has been active, false otherwise