Class TLcyCompositePropertyConverter

java.lang.Object
com.luciad.lucy.util.properties.codec.TLcyCompositePropertyConverter
All Implemented Interfaces:
ILcyPropertyConverter

public class TLcyCompositePropertyConverter extends Object implements ILcyPropertyConverter

Composite implementation of ILcyPropertyConverter. It has a list of associated ILcyPropertyConverters, which are all used.

  • Constructor Details

    • TLcyCompositePropertyConverter

      public TLcyCompositePropertyConverter()
  • Method Details

    • addPropertyConverter

      public void addPropertyConverter(ILcyPropertyConverter aConverter)
      Adds the given ILcyPropertyConverter to this composite implementation.
      Parameters:
      aConverter - the ILcyPropertyConverter to add. Must not be null.
      Throws:
      IllegalArgumentException - If the specified converter was already added before.
      NullPointerException - If the specified converter was null.
    • removePropertyConverter

      public void removePropertyConverter(ILcyPropertyConverter aConverter)

      Remove the given ILcyPropertyConverter from this composite implementation. If this composite converter did not contain the specified converter, no exception is thrown and nothing else happens.

      Parameters:
      aConverter - the ILcyPropertyConverter to remove.
    • getPropertyConverter

      public ILcyPropertyConverter getPropertyConverter(int aIndex)
      Returns the ILcyPropertyConverter at the given index.
      Parameters:
      aIndex - the index to retrieve the ILcyPropertyConverter for. 0 < aIndex < getPropertyConverterCount()
      Returns:
      the ILcyPropertyConverter at the given index.
    • getPropertyConverterCount

      public int getPropertyConverterCount()
      Returns the amount of associated ILcyPropertyConverters.
      Returns:
      the amount of associated ILcyPropertyConverters.
      See Also:
    • convertBeforeEncode

      public void convertBeforeEncode(ALcyProperties aPropertiesSFCT)

      Modifies the given ALcyProperties so that all Object values are converted to one or more String values.

      This method should remove the original Object that it encodes. Only the String property or properties should remain.

      This implementation performs the conversion by asking all associated ILcyPropertyConverters to perform their conversions.

      Specified by:
      convertBeforeEncode in interface ILcyPropertyConverter
      Parameters:
      aPropertiesSFCT - The ALcyProperties to modify. Never null.
    • convertAfterDecode

      public void convertAfterDecode(ALcyProperties aPropertiesSFCT)

      Modifies the given ALcyProperties so that String properties representing Objects are converted to these Objects.

      This method should remove the String properties from which it constructs the Object. Only the Object property should remain.

      This implementation performs the conversion by asking all associated ILcyPropertyConverters to perform their conversions.

      Specified by:
      convertAfterDecode in interface ILcyPropertyConverter
      Parameters:
      aPropertiesSFCT - The properties to modify.