Class XmlXStreamMarshallerFactory

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
    Direct Known Subclasses:
    JsonXStreamMarshallerFactory

    public class XmlXStreamMarshallerFactory
    extends java.lang.Object
    implements org.springframework.beans.factory.FactoryBean, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
    Factory for creating a XStreamMarshaller with given XStream, registered available TypeAliasMapping and TypeConverterMapping instances as customization of the XStreamMarshaller .
    • Constructor Detail

      • XmlXStreamMarshallerFactory

        public XmlXStreamMarshallerFactory()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception
      • getObject

        public java.lang.Object getObject()
                                   throws java.lang.Exception
        Specified by:
        getObject in interface org.springframework.beans.factory.FactoryBean
        Throws:
        java.lang.Exception
      • getObjectInternal

        protected org.springframework.oxm.xstream.XStreamMarshaller getObjectInternal()
      • configureXmlMarshaller

        protected void configureXmlMarshaller​(org.springframework.oxm.xstream.XStreamMarshaller marshaller)
      • setImplicitCollections

        protected void setImplicitCollections​(org.springframework.oxm.xstream.XStreamMarshaller marshaller,
                                              java.util.Collection<ImplicitCollection> values)
      • getXStream

        protected com.thoughtworks.xstream.XStream getXStream()
      • createMarshaller

        protected org.springframework.oxm.xstream.XStreamMarshaller createMarshaller()
      • setXStream

        public void setXStream​(com.thoughtworks.xstream.XStream xStream)
      • setOmitted

        protected void setOmitted​(org.springframework.oxm.xstream.XStreamMarshaller marshaller,
                                  java.util.Collection<AttributeOmitMapping> omitters)
      • setConverters

        protected void setConverters​(org.springframework.oxm.xstream.XStreamMarshaller marshaller,
                                     java.util.Collection<TypeConverterMapping> typeConvereters)
      • setAliases

        protected void setAliases​(org.springframework.oxm.xstream.XStreamMarshaller marshaller,
                                  java.util.Collection<TypeAliasMapping> aliases)
      • setAttributeOmitInternal

        protected void setAttributeOmitInternal​(org.springframework.oxm.xstream.XStreamMarshaller marshaller,
                                                AttributeOmitMapping singleOmit)
      • setAttributeConverterInternal

        protected void setAttributeConverterInternal​(org.springframework.oxm.xstream.XStreamMarshaller marshaller,
                                                     AttributeConverterMapping converterMapping)
      • setTypeConverterInternal

        protected void setTypeConverterInternal​(org.springframework.oxm.xstream.XStreamMarshaller marshaller,
                                                TypeConverterMapping converterMapping)
      • setTypeAliasInternal

        protected void setTypeAliasInternal​(org.springframework.oxm.xstream.XStreamMarshaller marshaller,
                                            TypeAliasMapping alias)
      • setAttributeAliasInternal

        protected void setAttributeAliasInternal​(org.springframework.oxm.xstream.XStreamMarshaller marshaller,
                                                 TypeAliasMapping alias)
        aliases property moving also from element to attribute
      • setFieldAliasInternal

        protected void setFieldAliasInternal​(org.springframework.oxm.xstream.XStreamMarshaller marshaller,
                                             TypeAliasMapping alias)
        aliases property leaving it as element
      • getObjectType

        public java.lang.Class getObjectType()
        Specified by:
        getObjectType in interface org.springframework.beans.factory.FactoryBean
      • isSingleton

        public boolean isSingleton()
        Specified by:
        isSingleton in interface org.springframework.beans.factory.FactoryBean
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext ctx)
                                   throws org.springframework.beans.BeansException
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • getExcludeClasses

        public java.util.List<java.lang.Class<?>> getExcludeClasses()
      • setExcludeClasses

        public void setExcludeClasses​(java.util.List<java.lang.Class<?>> excludeClasses)