Class DataSourceBaseResolver
java.lang.Object
org.apache.commons.mail2.jakarta.resolver.DataSourceBaseResolver
- All Implemented Interfaces:
DataSourceResolver
- Direct Known Subclasses:
DataSourceClassPathResolver
,DataSourceCompositeResolver
,DataSourceFileResolver
,DataSourcePathResolver
,DataSourceUrlResolver
Abstract class for resolvers.
- Since:
- 1.3
-
Constructor Summary
ConstructorDescriptionConstructs a new instance.DataSourceBaseResolver
(boolean lenient) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Tests whether the argument is a content id.protected boolean
Tests whether this a file URL.protected boolean
Tests whether this a HTTP or HTTPS URL.boolean
Tests whether to ignore resources not found or throw an exception.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.commons.mail2.jakarta.DataSourceResolver
resolve, resolve
-
Constructor Details
-
DataSourceBaseResolver
public DataSourceBaseResolver()Constructs a new instance. -
DataSourceBaseResolver
Constructs a new instance.- Parameters:
lenient
- shall we ignore resources not found or throw an exception?
-
-
Method Details
-
isCid
Tests whether the argument is a content id.- Parameters:
resourceLocation
- the resource location to test.- Returns:
- true if it is a CID.
-
isFileUrl
Tests whether this a file URL.- Parameters:
urlString
- the URL string.- Returns:
- true if it is a file URL.
-
isHttpUrl
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
Tests whether to ignore resources not found or throw an exception.- Returns:
- the lenient flag.
-