Class SubscriptionXStreamAliasConverter
java.lang.Object
de.hybris.platform.subscriptionfacades.converters.SubscriptionXStreamAliasConverter
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class SubscriptionXStreamAliasConverter
extends Object
implements org.springframework.context.ApplicationContextAware
XStream helper for subscriptions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConvert xml string to instance ofProductData.com.thoughtworks.xstream.XStreamgetXStreamXmlFromSubscriptionProductData(ProductData productData) Convert product dto to xml string.voidsetApplicationContext(org.springframework.context.ApplicationContext context)
-
Constructor Details
-
SubscriptionXStreamAliasConverter
public SubscriptionXStreamAliasConverter()
-
-
Method Details
-
getXStreamXmlFromSubscriptionProductData
Convert product dto to xml string.- Parameters:
productData- DTO. can be null (empty XML will be returned)- Returns:
- xml representation of the object
-
getSubscriptionProductDataFromXml
Convert xml string to instance ofProductData.- Parameters:
xml- xml string- Returns:
- unmarshalled object of null if xml is empty
- Throws:
com.thoughtworks.xstream.converters.ConversionException- if class is unavailableClassCastException- is the XML contains another type of object
-
getXstream
@Nonnull public com.thoughtworks.xstream.XStream getXstream() -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-