org.faktorips.runtime.jaxb
Class ProductConfigurationXmlAdapter
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<String,ProductConfiguration>
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProductConfigurationXmlAdapter
public ProductConfigurationXmlAdapter(IRuntimeRepository repository)
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.