Class ProductConfigurationXmlAdapter


  • public class ProductConfigurationXmlAdapter
    extends javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​ProductConfiguration>
    Custom JAXB marshaling/unmarshaling for ProductConfiguration instances.

    When marshaling/unmarshaling a configurable policy component (and thus a ProductConfiguration), the respective product component is preserved in XML by the means of the product component ID.

    • Constructor Detail

      • ProductConfigurationXmlAdapter

        public ProductConfigurationXmlAdapter​(IRuntimeRepository repository)
    • Method Detail

      • marshal

        public java.lang.String marshal​(ProductConfiguration config)
                                 throws java.lang.Exception
        Returns the ID for the configuring product component or null if it could not be determined. Cannot return an ID if either the given ProductConfiguration is null or if it does not contain a IProductComponent instance.
        Specified by:
        marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​ProductConfiguration>
        Throws:
        java.lang.Exception
      • unmarshal

        public ProductConfiguration unmarshal​(java.lang.String id)
                                       throws java.lang.Exception
        Returns the product component for the specified ID.
        Specified by:
        unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​ProductConfiguration>
        Throws:
        java.lang.Exception