org.apache.commons.mail

## Interface DataSourceResolver

- All Known Implementing Classes:
    DataSourceBaseResolver, DataSourceClassPathResolver, DataSourceCompositeResolver, DataSourceFileResolver, DataSourceUrlResolver

      public interface DataSourceResolver

  Creates a `DataSource` based on an URL.
  Since:
    1.3

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `DataSource` | `resolve(String resourceLocation)` Resolves the given resource location to a `DataSource`.
    `DataSource` | `resolve(String resourceLocation, boolean isLenient)` Resolves the given resource location to a `DataSource`.

- - ### Method Detail

    - #### resolve

          DataSource resolve(String resourceLocation)
                      throws IOException

      Resolves the given resource location to a `DataSource`.
      Parameters:
        `resourceLocation` - the location of the resource
      Returns:
        the `DataSource`
      Throws:
        `IOException` - the resource was not found

    - #### resolve

          DataSource resolve(String resourceLocation,
                             boolean isLenient)
                      throws IOException

      Resolves the given resource location to a `DataSource`.
      Parameters:
        `resourceLocation` - the location of the resource
        `isLenient` - shall we ignore resources not found or complain with an exception?
      Returns:
        the data source containing the resource or null if the resource was not found in lenient mode
      Throws:
        `IOException` - resolving the resource failed

Copyright © 2001–2017 The Apache Software Foundation. All rights reserved.