Package org.ldaptive.url
Class AbstractUrlFormatter
- java.lang.Object
-
- org.ldaptive.url.AbstractUrlFormatter
-
- All Implemented Interfaces:
UrlFormatter
- Direct Known Subclasses:
MinimalUrlFormatter
public abstract class AbstractUrlFormatter extends Object implements UrlFormatter
Base implementation for LDAP URL formatters.
-
-
Constructor Summary
Constructors Constructor Description AbstractUrlFormatter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
format(Url url)
Returns a string representation of the supplied LDAP URL.protected abstract String
formatAttribute(String attrName)
Formats the supplied attribute name.protected abstract String
formatBaseDn(String baseDn, Dn parsedBaseDn)
Formats the supplied baseDN.protected abstract String
formatFilter(String filter, Filter parsedFilter)
Formats the supplied filter string.protected abstract String
formatHostname(String hostname)
Formats the supplied hostname.protected abstract String
formatScheme(String scheme)
Formats the supplied scheme.
-
-
-
Method Detail
-
format
public String format(Url url)
Description copied from interface:UrlFormatter
Returns a string representation of the supplied LDAP URL.- Specified by:
format
in interfaceUrlFormatter
- Parameters:
url
- to format- Returns:
- formatted LDAP URL
-
formatScheme
protected abstract String formatScheme(String scheme)
Formats the supplied scheme.- Parameters:
scheme
- to format- Returns:
- formatted scheme
-
formatHostname
protected abstract String formatHostname(String hostname)
Formats the supplied hostname.- Parameters:
hostname
- to format- Returns:
- formatted hostname
-
formatBaseDn
protected abstract String formatBaseDn(String baseDn, Dn parsedBaseDn)
Formats the supplied baseDN.- Parameters:
baseDn
- to formatparsedBaseDn
- to supplement formatting options- Returns:
- formatted baseDN
-
formatAttribute
protected abstract String formatAttribute(String attrName)
Formats the supplied attribute name.- Parameters:
attrName
- to format- Returns:
- formatted attribute name
-
-