public class LdapDirectorySettingsImpl extends java.lang.Object implements LdapDirectorySettings
LdapConstants.Auth, LdapConstants.Encryption, LdapConstants.Scope
LDAP_CONNECT_TIMEOUT, LDAP_READ_TIMEOUT
Constructor and Description |
---|
LdapDirectorySettingsImpl()
Simple constructor for this class,
sets default values,
note that you won't be able to create an LdapDirectory with these
defaults (empty name, empty hostname forbidden by LdapDirectory)
|
LdapDirectorySettingsImpl(LdapDirectorySettingsImpl settings)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
LdapDirectorySettings |
clone()
Clone this object.
|
boolean |
equals(LdapDirectorySettings other)
Checks if both LdapDirectorySettings instance have the same content
|
LdapConstants.Auth |
getAuth()
simple getter for auth
|
java.lang.String |
getBaseDN()
simple getter for baseDN
|
java.lang.String |
getBindDN()
simple getter for bindDN
|
java.lang.String |
getCustomQuery()
Gets the user-defined LDAP query.
|
LdapConstants.Encryption |
getEncryption()
simple getter for encryption
|
java.lang.String |
getGlobalPhonePrefix()
Returns the global prefix to be used when calling phones from this ldap
source.
|
java.util.List<java.lang.String> |
getHomePhoneSearchFields()
Returns home phone fields that we will lookup.
|
java.lang.String |
getHostname()
simple getter for hostname
|
java.util.List<java.lang.String> |
getMailSearchFields()
Returns mail fields that we will lookup.
|
java.lang.String |
getMailSuffix()
Returns mail suffix.
|
java.util.List<java.lang.String> |
getMobilePhoneSearchFields()
Returns mobile phone fields that we will lookup.
|
java.lang.String |
getName()
simple getter for name
|
java.lang.String |
getPassword()
simple getter for password
|
int |
getPort()
simple getter for port
|
java.lang.String |
getQueryMode()
Gets the mode how the LDAP query is constructed.
|
LdapConstants.Scope |
getScope()
Returns the search scope: one level under the base distinguished name
or all the subtree.
|
java.lang.String |
getUserName()
Returns the user name associated with the corresponding ldap directory.
|
java.util.List<java.lang.String> |
getWorkPhoneSearchFields()
Returns work phone fields that we will lookup.
|
int |
hashCode()
Returns the hash code for this instance.
|
boolean |
isEnabled()
Simple getter for enabled.
|
boolean |
isMangleQuery()
Gets whether the query term gets mangled with wildcards.
|
boolean |
isPhotoInline()
Gets whether photos are retrieved along with the other attributes.
|
static java.util.List<java.lang.String> |
mergeString(java.lang.String attrs)
Merge String elements separated by space into a List.
|
static java.lang.String |
mergeStrings(java.util.List<java.lang.String> lst)
Merge String elements from a list to a single String separated by space.
|
void |
persistentLoad(java.lang.String name)
Loads the settings with the given name from the config files
into the LdapDirectorySetting.
|
void |
persistentRemove()
Removes settings with this name from the configuration files
(package private)
|
void |
persistentSave()
Saves these settings through the configuration service
|
void |
setAuth(LdapConstants.Auth auth)
simple setter for auth
|
void |
setBaseDN(java.lang.String baseDN)
simple setter for baseDN
|
void |
setBindDN(java.lang.String bindDN)
simple setter for bindDN
|
void |
setCustomQuery(java.lang.String query)
Sets the user-defined LDAP query.
|
void |
setEnabled(boolean enabled)
simple setter for enabled.
|
void |
setEncryption(LdapConstants.Encryption encryption)
simple setter for encryption
|
void |
setGlobalPhonePrefix(java.lang.String prefix)
Sets the global prefix to be used when calling phones from this ldap
source.
|
void |
setHomePhoneSearchFields(java.util.List<java.lang.String> list)
Set home phone fields that we will lookup.
|
void |
setHostname(java.lang.String hostname)
simple setter for hostname
|
void |
setMailSearchFields(java.util.List<java.lang.String> list)
Set mail fields that we will lookup.
|
void |
setMailSuffix(java.lang.String suffix)
Set mail suffix.
|
void |
setMangleQuery(boolean mangle)
Sets whether the query term gets mangled with wildcards.
|
void |
setMobilePhoneSearchFields(java.util.List<java.lang.String> list)
Set mobile phone fields that we will lookup.
|
void |
setName(java.lang.String name)
simple setter for name
|
void |
setPassword(java.lang.String password)
simple setter for password
|
void |
setPhotoInline(boolean inline)
Sets whether photos are retrieved along with the other attributes.
|
void |
setPort(int port)
simple setter for port
|
void |
setQueryMode(java.lang.String queryMode)
Sets the mode how the LDAP query is constructed.
|
void |
setScope(LdapConstants.Scope scope)
Sets the search scope: one level under the base distinguished name
or all the subtree.
|
void |
setWorkPhoneSearchFields(java.util.List<java.lang.String> list)
Set work phone fields that we will lookup.
|
java.lang.String |
toString()
meant for debugging
|
public LdapDirectorySettingsImpl()
public LdapDirectorySettingsImpl(LdapDirectorySettingsImpl settings)
settings
- existing settingspublic java.lang.String getName()
getName
in interface LdapDirectorySettings
public void setName(java.lang.String name)
setName
in interface LdapDirectorySettings
name
- the name propertypublic boolean isEnabled()
isEnabled
in interface LdapDirectorySettings
LdapDirectorySettings.isEnabled()
public void setEnabled(boolean enabled)
setEnabled
in interface LdapDirectorySettings
enabled
- whether the server is marked as enabledLdapDirectorySettings.setEnabled(boolean)
public java.lang.String getHostname()
getHostname
in interface LdapDirectorySettings
public void setHostname(java.lang.String hostname)
setHostname
in interface LdapDirectorySettings
hostname
- the hostname propertypublic LdapConstants.Encryption getEncryption()
getEncryption
in interface LdapDirectorySettings
LdapConstants.Encryption
public void setEncryption(LdapConstants.Encryption encryption)
setEncryption
in interface LdapDirectorySettings
encryption
- the encryption propertyLdapConstants.Encryption
public int getPort()
getPort
in interface LdapDirectorySettings
public void setPort(int port)
setPort
in interface LdapDirectorySettings
port
- the port propertypublic LdapConstants.Auth getAuth()
getAuth
in interface LdapDirectorySettings
LdapConstants.Auth
public void setAuth(LdapConstants.Auth auth)
setAuth
in interface LdapDirectorySettings
auth
- the auth propertyLdapConstants.Auth
public java.lang.String getBindDN()
getBindDN
in interface LdapDirectorySettings
public java.lang.String getUserName()
public void setBindDN(java.lang.String bindDN)
setBindDN
in interface LdapDirectorySettings
bindDN
- the bindDN propertypublic java.lang.String getPassword()
getPassword
in interface LdapDirectorySettings
public void setPassword(java.lang.String password)
setPassword
in interface LdapDirectorySettings
password
- the password propertypublic java.lang.String getBaseDN()
getBaseDN
in interface LdapDirectorySettings
public void setBaseDN(java.lang.String baseDN)
setBaseDN
in interface LdapDirectorySettings
baseDN
- the baseDN propertypublic LdapConstants.Scope getScope()
getScope
in interface LdapDirectorySettings
LdapConstants.Scope
,
LdapDirectorySettings.getScope()
public void setScope(LdapConstants.Scope scope)
setScope
in interface LdapDirectorySettings
scope
- the new search scopeLdapConstants.Scope
,
LdapDirectorySettings.setScope(net.java.sip.communicator.service.ldap.LdapConstants.Scope)
public java.lang.String getGlobalPhonePrefix()
getGlobalPhonePrefix
in interface LdapDirectorySettings
public void setGlobalPhonePrefix(java.lang.String prefix)
setGlobalPhonePrefix
in interface LdapDirectorySettings
prefix
- the global prefix to be used when calling phones from this
ldap sourcepublic boolean equals(LdapDirectorySettings other)
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.util.List<java.lang.String> getMailSearchFields()
getMailSearchFields
in interface LdapDirectorySettings
public void setMailSearchFields(java.util.List<java.lang.String> list)
setMailSearchFields
in interface LdapDirectorySettings
list
- of mail fields that we will lookuppublic java.lang.String getMailSuffix()
getMailSuffix
in interface LdapDirectorySettings
public void setMailSuffix(java.lang.String suffix)
setMailSuffix
in interface LdapDirectorySettings
suffix
- mail suffixpublic java.lang.String getQueryMode()
getQueryMode
in interface LdapDirectorySettings
public void setQueryMode(java.lang.String queryMode)
setQueryMode
in interface LdapDirectorySettings
queryMode
- the mode how the LDAP query is constructed.public java.lang.String getCustomQuery()
getCustomQuery
in interface LdapDirectorySettings
public void setCustomQuery(java.lang.String query)
setCustomQuery
in interface LdapDirectorySettings
query
- the user-defined LDAP query.public boolean isMangleQuery()
isMangleQuery
in interface LdapDirectorySettings
public void setMangleQuery(boolean mangle)
setMangleQuery
in interface LdapDirectorySettings
mangle
- whether the query term gets mangled with wildcards.public boolean isPhotoInline()
isPhotoInline
in interface LdapDirectorySettings
public void setPhotoInline(boolean inline)
setPhotoInline
in interface LdapDirectorySettings
inline
- whether photos are retrieved along with the other
attributes.public java.util.List<java.lang.String> getWorkPhoneSearchFields()
getWorkPhoneSearchFields
in interface LdapDirectorySettings
public void setWorkPhoneSearchFields(java.util.List<java.lang.String> list)
setWorkPhoneSearchFields
in interface LdapDirectorySettings
list
- of work phone fields that we will lookuppublic java.util.List<java.lang.String> getMobilePhoneSearchFields()
getMobilePhoneSearchFields
in interface LdapDirectorySettings
public void setMobilePhoneSearchFields(java.util.List<java.lang.String> list)
setMobilePhoneSearchFields
in interface LdapDirectorySettings
list
- of mobile phone fields that we will lookuppublic java.util.List<java.lang.String> getHomePhoneSearchFields()
getHomePhoneSearchFields
in interface LdapDirectorySettings
public void setHomePhoneSearchFields(java.util.List<java.lang.String> list)
setHomePhoneSearchFields
in interface LdapDirectorySettings
list
- of home phone fields that we will lookuppublic static java.lang.String mergeStrings(java.util.List<java.lang.String> lst)
lst
- list of Stringspublic static java.util.List<java.lang.String> mergeString(java.lang.String attrs)
attrs
- Stringpublic void persistentSave()
persistentSave
in interface LdapDirectorySettings
LdapDirectorySettings.persistentSave()
public void persistentLoad(java.lang.String name)
persistentLoad
in interface LdapDirectorySettings
name
- name of the settingsLdapDirectorySettings.persistentLoad(java.lang.String)
public void persistentRemove()
persistentRemove
in interface LdapDirectorySettings
LdapDirectorySettings.persistentRemove()
public java.lang.String toString()
toString
in class java.lang.Object
public LdapDirectorySettings clone()
LdapDirectorySettings
clone
in interface LdapDirectorySettings
clone
in class java.lang.Object
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.