Class DefaultXmlDelegate

java.lang.Object
com.aquima.interactions.profile.xml.DefaultXmlDelegate
All Implemented Interfaces:
IXmlDelegate

public class DefaultXmlDelegate extends Object implements IXmlDelegate
Default implementation of the xml delegate interface.
Since:
5.0
Author:
O. Kerpershoek
  • Constructor Details

    • DefaultXmlDelegate

      public DefaultXmlDelegate()
  • Method Details

    • includeEntity

      public boolean includeEntity(IEntityDefinition definition)
      Description copied from interface: IXmlDelegate
      This method should return a boolean indicating if entities of the specified type should be processes by the XML converter. When this method returns false, all entity instances of this type will be excluded from the resulting XML and instances of this type will not be read into the profile.
      Specified by:
      includeEntity in interface IXmlDelegate
      Parameters:
      definition - The entity type that should be included.
      Returns:
      boolean indicating if entities of the specified type should be processes by the XML converter.
    • includeInstance

      public boolean includeInstance(IEntityInstance instance)
      Description copied from interface: IXmlDelegate
      This method should return a boolean indicating whether the instance should be processed by the XML converter.
      Specified by:
      includeInstance in interface IXmlDelegate
      Parameters:
      instance - The instance for which should be determined if it should be processed.
      Returns:
      boolean indicating whether the instance should be processed by the XML converter.
    • includeAttribute

      public boolean includeAttribute(IAttributeValue attributeValue)
      Description copied from interface: IXmlDelegate
      This method returns a boolean indicating whether the attribute should be processed by the XML converter.
      Specified by:
      includeAttribute in interface IXmlDelegate
      Parameters:
      attributeValue - The attribute value for which should be determined if it should be processed.
      Returns:
      boolean indicating whether the attribute should be processed by the XML converter.
    • valueToXml

      public String valueToXml(IPrimitiveValue attributeValue)
      Description copied from interface: IXmlDelegate
      This method should convert the primitive value to a string value representation.
      Specified by:
      valueToXml in interface IXmlDelegate
      Parameters:
      attributeValue - The primitive value for which the string representation is requested.
      Returns:
      String value representation of the specified primitive value.
    • xmlToValue

      public IPrimitiveValue xmlToValue(DataType type, String stringValue)
      Description copied from interface: IXmlDelegate
      This method should convert a string value to the specified data type.
      Specified by:
      xmlToValue in interface IXmlDelegate
      Parameters:
      type - The type to which the string value should be converted.
      stringValue - The value that should be converted.
      Returns:
      The primitive value for the specified string representation.
    • onException

      public void onException(AppException error)
      Description copied from interface: IXmlDelegate
      This method may be implemented to add custom error handling. The implementation may re-throw the error if needed, or choose to ignore the error. When an error is re-thrown, the XML converter will stop processing and fail with the specified error.
      Specified by:
      onException in interface IXmlDelegate
      Parameters:
      error - The error that occurred during XML conversion.