public interface PromotionManager
Modifier and Type | Method and Description |
---|---|
Voucher |
findVoucher(SlingHttpServletRequest request,
java.lang.String code)
Find a
Voucher by voucher code. |
java.util.List<Promotion> |
getAvailablePromotions(ResourceResolver resourceResolver)
Get the list of available promotions.
|
PromotionHandler |
getHandler(java.lang.String promotionType)
Find a registered handler for the particular promotion type.
|
java.util.Map<java.lang.String,java.lang.String> |
getPromotionsMap(SlingHttpServletRequest request)
Get a map of promotion paths to their firing segments.
|
AbstractJcrVoucher |
getVoucher(SlingHttpServletRequest request,
java.lang.String code)
Deprecated.
since 6.0; use
findVoucher(org.apache.sling.api.SlingHttpServletRequest, java.lang.String) instead |
java.util.Map<java.lang.String,java.lang.String> getPromotionsMap(SlingHttpServletRequest request)
request
- The request being processed.Map<String, String>
mapping each promotion's path to its
list of segments as a coma-separated String
. Promotions are excluded
when either not valid, i.e. not within their on/offTimes, or not visible to
the user represented by the request.java.util.List<Promotion> getAvailablePromotions(ResourceResolver resourceResolver)
resourceResolver
- a Sling ResourceResolver instanceList<Promotion>
containing the promotions.@Deprecated AbstractJcrVoucher getVoucher(SlingHttpServletRequest request, java.lang.String code)
findVoucher(org.apache.sling.api.SlingHttpServletRequest, java.lang.String)
insteadAbstractJcrVoucher
by voucher code.request
- The request being processed.code
- The voucher code to search for.Voucher findVoucher(SlingHttpServletRequest request, java.lang.String code)
Voucher
by voucher code.request
- The request being processed.code
- The voucher code to search for.PromotionHandler getHandler(java.lang.String promotionType)
promotionType
- "Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"