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 Details

    • SubscriptionXStreamAliasConverter

      public SubscriptionXStreamAliasConverter()
  • Method Details

    • getXStreamXmlFromSubscriptionProductData

      @Nonnull public 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 String xml)
      Convert xml string to instance of ProductData.
      Parameters:
      xml - xml string
      Returns:
      unmarshalled object of null if xml is empty
      Throws:
      com.thoughtworks.xstream.converters.ConversionException - if class is unavailable
      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:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException