Package org.nuxeo.ecm.directory.ldap
Class LDAPServerDescriptor
java.lang.Object
org.nuxeo.ecm.directory.ldap.LDAPServerDescriptor
- All Implemented Interfaces:
Descriptor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceCommon internal interface for Ldap entriesprotected static classServer URL implementation ofLDAPServerDescriptor.LdapEntryprotected final classDomain implementation ofLDAPServerDescriptor.LdapEntryusing DNS SRV record -
Field Summary
FieldsModifier and TypeFieldDescriptionintprotected booleanprotected static final Stringprotected LinkedHashSet<LDAPServerDescriptor.LdapEntry> protected static final Stringbooleanprotected intintprotected final DNSServiceResolverprotected booleanbooleanFields inherited from interface org.nuxeo.runtime.model.Descriptor
UNIQUE_DESCRIPTOR_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringConvert domain from the ldap form dc=nuxeo,dc=org to the DNS domain name form nuxeo.orgdiscoverLdapServers(String domain, boolean useSsl, String srvPrefix) Retrieve server URLs from DNS SRV recordintgetId()The descriptor id, descriptors with same id are merged.getName()intintprotected DNSServiceResolverbooleanbooleanbooleanvoidvoidsetBindPassword(String bindPassword) voidsetConnectionTimeout(int connectionTimeout) voidsetLdapUrls(LDAPUrlDescriptor[] ldapUrls) booleanuseSsl()Whether this server descriptor defines a secure ldap connectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.model.Descriptor
doesRemove, merge
-
Field Details
-
LDAPS_SCHEME
- See Also:
-
LDAP_SCHEME
- See Also:
-
name
-
ldapUrls
-
bindDn
-
connectionTimeout
public int connectionTimeout -
poolingEnabled
public boolean poolingEnabled -
verifyServerCert
public boolean verifyServerCert -
retries
public int retries- Since:
- 5.7
-
poolingTimeout
protected int poolingTimeout- Since:
- 10.2
-
ldapEntries
-
isDynamicServerList
protected boolean isDynamicServerList -
useSsl
protected boolean useSsl -
srvResolver
-
bindPassword
-
-
Constructor Details
-
LDAPServerDescriptor
public LDAPServerDescriptor()
-
-
Method Details
-
isDynamicServerList
public boolean isDynamicServerList() -
getId
Description copied from interface:DescriptorThe descriptor id, descriptors with same id are merged.To forbid multiple descriptors use UNIQUE_DESCRIPTOR_ID.
To forbid merge use a unique value, non-overriden
toString()for exemple.- Specified by:
getIdin interfaceDescriptor
-
getName
-
setBindDn
-
getBindDn
-
setBindPassword
-
getBindPassword
-
getLdapUrls
-
setLdapUrls
-
useSsl
public boolean useSsl()Whether this server descriptor defines a secure ldap connection -
discoverLdapServers
protected List<String> discoverLdapServers(String domain, boolean useSsl, String srvPrefix) throws NamingException Retrieve server URLs from DNS SRV record- Parameters:
domain- The domain to queryuseSsl- Whether the connection to this domain should be secure- Returns:
- List of servers or empty list
- Throws:
NamingException- if DNS lookup fails
-
convertDNtoFQDN
Convert domain from the ldap form dc=nuxeo,dc=org to the DNS domain name form nuxeo.org- Parameters:
dn- base DN of the domain- Returns:
- the FQDN or null is DN is not matching the expected structure
-
isPoolingEnabled
public boolean isPoolingEnabled() -
isVerifyServerCert
public boolean isVerifyServerCert() -
getConnectionTimeout
public int getConnectionTimeout() -
getPoolingTimeout
public int getPoolingTimeout()- Since:
- 10.2
-
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout) -
getSRVResolver
-
getRetries
public int getRetries()- Since:
- 5.7
-