@ProviderType
public interface OrderHistoryTraitDataProvider
OrderHistoryTraitDataProvider
is a service interface for services which process the order history to
extract relevant data and provide it for a given order history trait.
The provided data is placed in the orderhistory context store where the related order history trait can access it
for evaluation.
Implementations of this service should follow certain rules (see getTraitData(PlacedOrderResult)
)
to ensure that the data can be rendered in a human readable manner in the client context by the provided
orderhistory context store renderer.
A trait can access in the client context the data returned by getTraitData(PlacedOrderResult)
using its
jsObject parameter with the following value: clientcontext.orderhistory.traits.identifier.data, where
identifier is the string returned by getIdentifier()
.Modifier and Type | Method and Description |
---|---|
java.lang.String |
getIdentifier()
Returns the string identifier of the trait for which this service is providing data.
|
java.lang.String |
getName()
Returns a human readable name of the related trait.
|
java.lang.Object |
getTraitData(PlacedOrderResult result)
Extracts data from order history relevant to the trait.
|
java.lang.String getIdentifier()
java.lang.String getName()
java.lang.Object getTraitData(PlacedOrderResult result) throws CommerceException
Object
, Collection<Object>
and
Map<String, Object>
where Object
should be a String
or other data type which
represents an atomic value having concise string representation provided by toString()
.
These return values are supported by the client context render.result
- the order historyCommerceException
Copyright © 2010 - 2020 Adobe. All Rights Reserved