JcrVoucherImpl
instead.@Deprecated public class AbstractJcrVoucher extends SlingAdaptable implements Voucher
Modifier and Type | Field and Description |
---|---|
static long |
VOUCHER_DEFAULT_PRIORITY
Deprecated.
|
static java.lang.String |
VOUCHER_RESOURCE_TYPE
Deprecated.
|
Constructor and Description |
---|
AbstractJcrVoucher(Resource resource)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
<AdapterType> |
adaptTo(java.lang.Class<AdapterType> type)
Deprecated.
Calls into the registered
AdapterManager to adapt this object to
the desired type . |
java.lang.String |
getCode()
Deprecated.
Get the voucher code.
|
ValueMap |
getConfig()
Deprecated.
Return a map of implementation-specific configuration properties.
|
java.lang.String |
getDescription()
Deprecated.
The voucher description, visible only to authors.
|
java.lang.String |
getInvalidMessage(SlingHttpServletRequest request)
Deprecated.
Return a shopper-visible message detailing why the voucher is invalid.
|
java.lang.String |
getMessage()
Deprecated.
A description visible to shoppers.
|
java.lang.String |
getMessage(SlingHttpServletRequest request)
Deprecated.
Return a shopper-visible message detailing the current status.
|
java.lang.String |
getPath()
Deprecated.
Get the path.
|
long |
getPriority()
Deprecated.
If the voucher is part of a campaign, return the campaign's priority.
|
Promotion |
getPromotion()
Deprecated.
The promotion associated with the voucher.
|
java.lang.String |
getTitle()
Deprecated.
The voucher title, visible only to authors.
|
boolean |
isValid(SlingHttpServletRequest request)
Deprecated.
Valid if the parent campaign's onTime has been reached and the offTime hasn't,
or if the times are not specified.
|
setAdapterManager, unsetAdapterManager
public static final java.lang.String VOUCHER_RESOURCE_TYPE
public static final long VOUCHER_DEFAULT_PRIORITY
public AbstractJcrVoucher(Resource resource) throws CommerceException
CommerceException
public java.lang.String getCode()
Voucher
public java.lang.String getPath()
public java.lang.String getTitle()
public java.lang.String getDescription()
getDescription
in interface Voucher
public java.lang.String getMessage()
public long getPriority()
getPriority
in interface Voucher
public boolean isValid(SlingHttpServletRequest request)
public java.lang.String getInvalidMessage(SlingHttpServletRequest request)
getInvalidMessage
in interface Voucher
request
- The request representing the current sessionpublic Promotion getPromotion()
public <AdapterType> AdapterType adaptTo(java.lang.Class<AdapterType> type)
AdapterManager
to adapt this object to
the desired type
.
This method implements a cache of adapters to improve performance. That is repeated calls to this method with the same class will result in the same object to be returned.
adaptTo
in interface Adaptable
adaptTo
in class SlingAdaptable
AdapterType
- The generic type to which this resource is adapted
totype
- The Class object of the target type, such as
javax.jcr.Node.class
or
java.io.File.class
null
if the resource cannot
adapt to the requested typepublic java.lang.String getMessage(SlingHttpServletRequest request)
Voucher
getMessage
in interface Voucher
request
- The request representing the current sessionCopyright © 2010 - 2020 Adobe. All Rights Reserved