public interface DocumentCampaignService
Modifier and Type | Method and Description |
---|---|
Optional<Campaign> |
findActiveCampaign(javax.jcr.Node handle,
String branchId)
|
Optional<Campaign> findActiveCampaign(javax.jcr.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
handle
- the document for which an attempt is made to find the active campaignbranchId
- the branch for which an active campaign is soughtCampaign
or an empty optional in case it is absentCopyright © 2008–2021 Hippo B.V. (http://www.onehippo.com). All rights reserved.