Class ProductConfigurationXmlAdapter

java.lang.Object
jakarta.xml.bind.annotation.adapters.XmlAdapter<String,org.faktorips.runtime.internal.ProductConfiguration>
org.faktorips.runtime.xml.jakarta.ProductConfigurationXmlAdapter
All Implemented Interfaces:
org.faktorips.runtime.xml.IIpsXmlAdapter<String,org.faktorips.runtime.internal.ProductConfiguration>

public class ProductConfigurationXmlAdapter extends jakarta.xml.bind.annotation.adapters.XmlAdapter<String,org.faktorips.runtime.internal.ProductConfiguration> implements org.faktorips.runtime.xml.IIpsXmlAdapter<String,org.faktorips.runtime.internal.ProductConfiguration>
Custom JAXB marshalling/unmarshalling for ProductConfiguration instances.

When marshalling/unmarshalling 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(org.faktorips.runtime.IRuntimeRepository repository)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    marshal(org.faktorips.runtime.internal.ProductConfiguration config)
    Returns the ID for the configuring product component or null if it could not be determined.
    org.faktorips.runtime.internal.ProductConfiguration
    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 Details

    • ProductConfigurationXmlAdapter

      public ProductConfigurationXmlAdapter(org.faktorips.runtime.IRuntimeRepository repository)
  • Method Details

    • marshal

      public String marshal(org.faktorips.runtime.internal.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 interface org.faktorips.runtime.xml.IIpsXmlAdapter<String,org.faktorips.runtime.internal.ProductConfiguration>
      Specified by:
      marshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<String,org.faktorips.runtime.internal.ProductConfiguration>
      Throws:
      Exception
    • unmarshal

      public org.faktorips.runtime.internal.ProductConfiguration unmarshal(String id) throws Exception
      Returns the product component for the specified ID.
      Specified by:
      unmarshal in interface org.faktorips.runtime.xml.IIpsXmlAdapter<String,org.faktorips.runtime.internal.ProductConfiguration>
      Specified by:
      unmarshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<String,org.faktorips.runtime.internal.ProductConfiguration>
      Throws:
      Exception