Package org.hippoecm.hst.campaign
Interface DocumentCampaignService
-
public interface DocumentCampaignService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<Campaign>
findActiveCampaign(Node handle, String branchId)
-
-
-
Method Detail
-
findActiveCampaign
Optional<Campaign> findActiveCampaign(Node handle, String branchId)
Given the
handle
and thebranchId
returns aCampaign
if the version for theCampaign
is active. The implementation of this service decides based on which criteria there is an active campaign or not for thehandle
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 thebranchId
- Parameters:
handle
- the document for which an attempt is made to find the active campaignbranchId
- 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
-
-