Package org.faktorips.runtime.jaxb
Class ProductConfigurationXmlAdapter
- java.lang.Object
-
- javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,ProductConfiguration>
-
- org.faktorips.runtime.jaxb.ProductConfigurationXmlAdapter
-
public class ProductConfigurationXmlAdapter extends javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,ProductConfiguration>
Custom JAXB marshaling/unmarshaling forProductConfigurationinstances.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
Constructors Constructor Description ProductConfigurationXmlAdapter(IRuntimeRepository repository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringmarshal(ProductConfiguration config)Returns the ID for the configuring product component ornullif it could not be determined.ProductConfigurationunmarshal(java.lang.String id)Returns the product component for the specified 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 ornullif it could not be determined. Cannot return an ID if either the givenProductConfigurationisnullor if it does not contain aIProductComponentinstance.- Specified by:
marshalin classjavax.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:
unmarshalin classjavax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,ProductConfiguration>- Throws:
java.lang.Exception
-
-