Interface ILcyPropertiesDecoder

All Known Implementing Classes:
TLcyStringPropertiesCodec

public interface ILcyPropertiesDecoder

Creates new or popuplates existing ALcyProperties from files or other data sources.

The supported data sources and type of ALcyProperties instances are defined by the actual implementations of this interface.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canDecodeSource(String aSourceName)
    Checks whether this ILcyPropertiesDecoder can decode the specified data source.
    decode(String aSourceName)
    Decodes the given source name into an ALcyProperties object.
    void
    decodeSFCT(String aSourceName, ALcyProperties aPropsSFCT, boolean aOverwrite)
    Decodes the given source name into a given ALcyProperties object.
  • Method Details

    • canDecodeSource

      boolean canDecodeSource(String aSourceName)

      Checks whether this ILcyPropertiesDecoder can decode the specified data source.

      Often this will only be a simple test, for example checking the file extension of a file.

      Parameters:
      aSourceName - the data source to be verified; typically a file name or a URL.
      Returns:
      true if this decoder can decode the data specified by the source name, false otherwise.
      See Also:
    • decode

      ALcyProperties decode(String aSourceName) throws IOException

      Decodes the given source name into an ALcyProperties object.

      Parameters:
      aSourceName - The source name to decode from. Must not be null.
      Returns:
      The decoded ALcyProperties. Never null.
      Throws:
      IOException - In case of IO failure.
    • decodeSFCT

      void decodeSFCT(String aSourceName, ALcyProperties aPropsSFCT, boolean aOverwrite) throws IOException

      Decodes the given source name into a given ALcyProperties object.

      Parameters:
      aSourceName - The source name to decode from.
      aPropsSFCT - The properties to load into. Must not be null.
      aOverwrite - true to overwrite existing properties if they are also present in the given source. false to leave existing properties unchanged.
      Throws:
      IOException - In case of IO failure.