Interface DocumentCampaignService


public interface DocumentCampaignService
  • Method Details

    • findActiveCampaign

      Optional<Campaign> findActiveCampaign(Node handle, String branchId)

      Given the handle and the branchId returns a Campaign if the version for the Campaign is active. The implementation of this service decides based on which criteria there is an active campaign or not for the handle document. A typical heuristic would be to find a campaign version which has a from-to date which matches the current server time. If multiple campaign version match, a heuristic can be to return the campaign with the most recent start date. In general an implementation also requires that the possibly used version matches the branchId

      Parameters:
      handle - the document for which an attempt is made to find the active campaign
      branchId - the branch for which an active campaign is sought
      Returns:
      an optional containing the active Campaign or an empty optional in case it is absent