public class LdapDataConnectorFactoryBean extends BaseDataConnectorFactoryBean
LdapDataConnector
beans.Constructor and Description |
---|
LdapDataConnectorFactoryBean() |
Modifier and Type | Method and Description |
---|---|
protected Object |
createInstance() |
protected SSLContext |
createSSLContext()
Creates an SSLContext if either trust or key material was set.
|
LdapDataConnector.AUTHENTICATION_TYPE |
getAuthenticationType()
Gets the authentication type used when connecting to the directory.
|
String |
getBaseDN()
Gets the base search DN.
|
long |
getCacheElementTimeToLive()
Gets the time to live, in milliseconds, for cache elements.
|
net.sf.ehcache.CacheManager |
getCacheManager()
Gets the manager for the results cache.
|
org.opensaml.xml.security.x509.X509Credential |
getConnectionCredential()
Gets the client authentication material used when connecting to the LDAP via SSL or TLS.
|
edu.vt.middleware.ldap.handler.ConnectionHandler.ConnectionStrategy |
getConnectionStrategy()
Gets the LDAP connection strategy.
|
String |
getFilterTemplate()
Gets the LDAP query filter template.
|
Map<String,String> |
getLdapProperties()
Gets the LDAP connection provider specific properties.
|
String |
getLdapUrl()
Gets the LDAP server's URL.
|
int |
getMaximumCachedElements()
Gets the maximum number of elements that will be cached.
|
int |
getMaxResultSize()
Gets the maximum number of results to return from a query.
|
Class<?> |
getObjectType() |
LdapPoolStrategy |
getPoolStrategy()
Gets the ldap pool strategy.
|
edu.vt.middleware.ldap.pool.LdapValidator |
getPoolValidator()
Gets the pool validator.
|
String |
getPrincipal()
Gets the principal DN used to bind to the directory.
|
String |
getPrincipalCredential()
Gets the credential of the principal DN used to bind to the directory.
|
List<String> |
getReturnAttributes()
Gets the attributes to return from a query.
|
edu.vt.middleware.ldap.LdapConfig.SearchScope |
getSearchScope()
Gets the search scope of a query.
|
int |
getSearchTimeLimit()
Gets the maximum amount of time, in milliseconds, to wait for a search to complete.
|
TemplateEngine |
getTemplateEngine()
Gets the template engine used to construct query filters.
|
org.opensaml.xml.security.x509.X509Credential |
getTrustCredential()
Gets the trust material used when connecting to the LDAP via SSL or TLS.
|
boolean |
getUseStartTLS()
Gets whether to use StartTLS when connecting to the LDAP.
|
boolean |
isLowercaseAttributeNames()
Gets whether LDAP attribute names used as Shibboleth attribute IDs will be lowercased.
|
boolean |
isMergeResults()
Gets whether to merge multiple results into a single result.
|
boolean |
isNoResultsIsError()
Gets whether a query that returns no results is an error condition.
|
void |
setAuthenticationType(LdapDataConnector.AUTHENTICATION_TYPE type)
Sets the authentication type used when connecting to the directory.
|
void |
setBaseDN(String dn)
Sets the base search DN.
|
void |
setCacheElementTimeToLive(long ttl)
Sets the time to live, in milliseconds, for cache elements.
|
void |
setCacheManager(net.sf.ehcache.CacheManager manager)
Sets the manager for the results cache.
|
void |
setConnectionCredential(org.opensaml.xml.security.x509.X509Credential credential)
Sets the client authentication material used when connecting to the LDAP via SSL or TLS.
|
void |
setConnectionStrategy(edu.vt.middleware.ldap.handler.ConnectionHandler.ConnectionStrategy strategy)
Sets the LDAP connection strategy.
|
void |
setFilterTemplate(String template)
Sets the LDAP query filter template.
|
void |
setLdapProperties(Map<String,String> properties)
Sets the LDAP connection provider specific properties.
|
void |
setLdapUrl(String url)
Sets the LDAP server's URL.
|
void |
setLowercaseAttributeNames(boolean lowercase)
Sets whether LDAP attribute names used as Shibboleth attribute IDs will be lowercased.
|
void |
setMaximumCachedElements(int max)
Sets the maximum number of elements that will be cached.
|
void |
setMaxResultSize(int max)
Sets the maximum number of results to return from a query.
|
void |
setMergeResults(boolean merge)
Sets whether to merge multiple results into a single result.
|
void |
setNoResultsIsError(boolean isError)
Sets whether a query that returns no results is an error condition.
|
void |
setPoolStrategy(LdapPoolStrategy strategy)
Sets the ldap pool strategy.
|
void |
setPoolValidator(edu.vt.middleware.ldap.pool.LdapValidator validator)
Sets the validator used to validate pool connections.
|
void |
setPrincipal(String principalName)
Sets the principal DN used to bind to the directory.
|
void |
setPrincipalCredential(String credential)
Sets the credential of the principal DN used to bind to the directory.
|
void |
setReturnAttributes(List<String> attributes)
Sets the attributes to return from a query.
|
void |
setSearchScope(edu.vt.middleware.ldap.LdapConfig.SearchScope scope)
Sets the search scope of a query.
|
void |
setSearchTimeLimit(int timeLimit)
Sets the maximum amount of time, in milliseconds, to wait for a search to complete.
|
void |
setTemplateEngine(TemplateEngine engine)
Sets the template engine used to construct query filters.
|
void |
setTrustCredential(org.opensaml.xml.security.x509.X509Credential credential)
Sets the trust material used when connecting to the LDAP via SSL or TLS.
|
protected void |
setupPoolStrategy()
Initializes the LDAP factory and validator for the selected pool strategy,
and initializes the pool.
|
void |
setUseStartTLS(boolean startTLS)
Sets whether to use StartTLS when connecting to the LDAP.
|
getFailoverDataConnectorId, populateDataConnector, setFailoverDataConnectorIds
getDependencyIds, getPluginId, setDependencyIds, setPluginId
protected Object createInstance() throws Exception
createInstance
in class org.springframework.beans.factory.config.AbstractFactoryBean
Exception
protected void setupPoolStrategy() throws Exception
Exception
- thrown if the pool cannot be initializedprotected SSLContext createSSLContext() throws Exception
Exception
- thrown if the SSLContext can not be created and initializedpublic LdapDataConnector.AUTHENTICATION_TYPE getAuthenticationType()
public String getBaseDN()
public long getCacheElementTimeToLive()
public net.sf.ehcache.CacheManager getCacheManager()
public org.opensaml.xml.security.x509.X509Credential getConnectionCredential()
public String getFilterTemplate()
public Map<String,String> getLdapProperties()
public String getLdapUrl()
public edu.vt.middleware.ldap.handler.ConnectionHandler.ConnectionStrategy getConnectionStrategy()
public int getMaximumCachedElements()
public int getMaxResultSize()
public Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean
getObjectType
in class org.springframework.beans.factory.config.AbstractFactoryBean
public LdapPoolStrategy getPoolStrategy()
public edu.vt.middleware.ldap.pool.LdapValidator getPoolValidator()
public String getPrincipal()
public String getPrincipalCredential()
public List<String> getReturnAttributes()
public edu.vt.middleware.ldap.LdapConfig.SearchScope getSearchScope()
public int getSearchTimeLimit()
public TemplateEngine getTemplateEngine()
public org.opensaml.xml.security.x509.X509Credential getTrustCredential()
public boolean getUseStartTLS()
public boolean isLowercaseAttributeNames()
public boolean isMergeResults()
public boolean isNoResultsIsError()
public void setAuthenticationType(LdapDataConnector.AUTHENTICATION_TYPE type)
type
- authentication type used when connecting to the directorypublic void setBaseDN(String dn)
dn
- the base search DNpublic void setCacheElementTimeToLive(long ttl)
ttl
- time to live, in milliseconds, for cache elementspublic void setCacheManager(net.sf.ehcache.CacheManager manager)
manager
- manager for the results cachepublic void setConnectionCredential(org.opensaml.xml.security.x509.X509Credential credential)
credential
- client authentication material used when connecting to the LDAP via SSL or TLSpublic void setFilterTemplate(String template)
template
- LDAP query filter templatepublic void setLdapProperties(Map<String,String> properties)
properties
- LDAP connection provider specific propertiespublic void setLdapUrl(String url)
url
- LDAP server's URLpublic void setConnectionStrategy(edu.vt.middleware.ldap.handler.ConnectionHandler.ConnectionStrategy strategy)
strategy
- connection strategypublic void setLowercaseAttributeNames(boolean lowercase)
lowercase
- whether LDAP attribute names used as Shibboleth attribute IDs will be lowercasedpublic void setMaximumCachedElements(int max)
max
- maximum number of elements that will be cachedpublic void setMaxResultSize(int max)
max
- maximum number of results to return from a querypublic void setMergeResults(boolean merge)
merge
- whether to merge multiple results into a single resultpublic void setNoResultsIsError(boolean isError)
isError
- whether a query that returns no results is an error conditionpublic void setPoolStrategy(LdapPoolStrategy strategy)
strategy
- to use for poolingpublic void setPoolValidator(edu.vt.middleware.ldap.pool.LdapValidator validator)
validator
- validator used to validate pool connectionspublic void setPrincipal(String principalName)
principalName
- principal DN used to bind to the directorypublic void setPrincipalCredential(String credential)
credential
- credential of the principal DN used to bind to the directorypublic void setReturnAttributes(List<String> attributes)
attributes
- attributes to return from a querypublic void setSearchScope(edu.vt.middleware.ldap.LdapConfig.SearchScope scope)
scope
- search scope of a querypublic void setSearchTimeLimit(int timeLimit)
timeLimit
- maximum amount of time, in milliseconds, to wait for a search to completepublic void setTemplateEngine(TemplateEngine engine)
engine
- template engine used to construct query filterspublic void setTrustCredential(org.opensaml.xml.security.x509.X509Credential credential)
credential
- trust material used when connecting to the LDAP via SSL or TLSpublic void setUseStartTLS(boolean startTLS)
startTLS
- whether to use StartTLS when connecting to the LDAPCopyright © 1999–2014. All rights reserved.