org.faktorips.runtime.jaxb
Class ProductConfigurationXmlAdapter

java.lang.Object
  extended by javax.xml.bind.annotation.adapters.XmlAdapter<String,ProductConfiguration>
      extended by org.faktorips.runtime.jaxb.ProductConfigurationXmlAdapter

public class ProductConfigurationXmlAdapter
extends XmlAdapter<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 Summary
ProductConfigurationXmlAdapter(IRuntimeRepository repository)
           
 
Method Summary
 String marshal(ProductConfiguration config)
          Returns the ID for the configuring product component or null if it could not be determined.
 ProductConfiguration unmarshal(String id)
          Returns the product component for the specified ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProductConfigurationXmlAdapter

public ProductConfigurationXmlAdapter(IRuntimeRepository repository)
Method Detail

marshal

public String marshal(ProductConfiguration config)
               throws 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 XmlAdapter<String,ProductConfiguration>
Throws:
Exception

unmarshal

public ProductConfiguration unmarshal(String id)
                               throws Exception
Returns the product component for the specified ID.

Specified by:
unmarshal in class XmlAdapter<String,ProductConfiguration>
Throws:
Exception


Copyright © 2015. All rights reserved.