Class DataSourceBaseResolver

java.lang.Object
org.apache.commons.mail2.javax.resolver.DataSourceBaseResolver
All Implemented Interfaces:
DataSourceResolver
Direct Known Subclasses:
DataSourceClassPathResolver, DataSourceCompositeResolver, DataSourceFileResolver, DataSourcePathResolver, DataSourceUrlResolver

public abstract class DataSourceBaseResolver extends Object implements DataSourceResolver
Abstract class for resolvers.
Since:
1.3
  • Constructor Details

    • DataSourceBaseResolver

      Constructs a new instance.
    • DataSourceBaseResolver

      public DataSourceBaseResolver(boolean lenient)
      Constructs a new instance.
      Parameters:
      lenient - shall we ignore resources not found or throw an exception?
  • Method Details

    • isCid

      protected boolean isCid(String resourceLocation)
      Tests whether the argument is a content id.
      Parameters:
      resourceLocation - the resource location to test.
      Returns:
      true if it is a CID.
    • isFileUrl

      protected boolean isFileUrl(String urlString)
      Tests whether this a file URL.
      Parameters:
      urlString - the URL string.
      Returns:
      true if it is a file URL.
    • isHttpUrl

      protected boolean isHttpUrl(String urlString)
      Tests whether this a HTTP or HTTPS URL.
      Parameters:
      urlString - the URL string to test.
      Returns:
      true if it is a HTTP or HTTPS URL.
    • isLenient

      public boolean isLenient()
      Tests whether to ignore resources not found or throw an exception.
      Returns:
      the lenient flag.