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 java.lang.Object implements org.springframework.context.ApplicationContextAwareXStreamhelper for subscriptions.
-
-
Constructor Summary
Constructors Constructor Description SubscriptionXStreamAliasConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProductDatagetSubscriptionProductDataFromXml(java.lang.String xml)Convert xml string to instance ofProductData.com.thoughtworks.xstream.XStreamgetXstream()java.lang.StringgetXStreamXmlFromSubscriptionProductData(ProductData productData)Convert product dto to xml string.voidsetApplicationContext(org.springframework.context.ApplicationContext context)
-
-
-
Method Detail
-
getXStreamXmlFromSubscriptionProductData
@Nonnull public java.lang.String getXStreamXmlFromSubscriptionProductData(@Nullable ProductData productData)Convert product dto to xml string.- Parameters:
productData- DTO. can be null (empty XML will be returned)- Returns:
- xml representation of the object
-
getSubscriptionProductDataFromXml
@Nullable public ProductData getSubscriptionProductDataFromXml(@Nullable java.lang.String xml)
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 unavailablejava.lang.ClassCastException- 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
-
-