public class DirContextSource extends Object implements ContextSource, InitializingBean
ContextSource
wrapper for DirContextSource
.
Here is a minimal example how to create a DirContextSource
with the supplied builder:
<beans:bean class="net.sf.michaelo.dirctxsrc.spring.DirContextSource"> <beans:constructor-arg> <beans:array> <beans:value>ldap://hostname</beans:value> </beans:array> </beans:constructor-arg> </beans:bean>
A DirContextSource
object will be initially preconfigured by its builder for you:
org.springframework.ldap.core.support.DefaultDirObjectFactory
.DirContextSource
Constructor and Description |
---|
DirContextSource(String... urls) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
DirContext |
getContext(String principal,
String credentials) |
DirContext |
getReadOnlyContext() |
DirContext |
getReadWriteContext() |
void |
setAdditionalProperties(Map<String,Object> additionalProperties) |
void |
setAuth(DirContextSource.Auth auth) |
void |
setBinaryAttributes(String... binaryAttributes) |
void |
setContextFactory(String contextFactory) |
void |
setDebug(boolean debug) |
void |
setLoginEntryName(String loginEntryName) |
void |
setMutualAuth(boolean mutualAuth) |
void |
setQop(String... qop) |
void |
setReferral(String referral) |
void |
setRetries(int retries) |
void |
setRetryWait(int retryWait) |
public DirContextSource(String... urls)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public DirContext getReadOnlyContext()
getReadOnlyContext
in interface ContextSource
public DirContext getReadWriteContext()
getReadWriteContext
in interface ContextSource
public DirContext getContext(String principal, String credentials)
getContext
in interface ContextSource
public void setContextFactory(String contextFactory)
public void setAuth(DirContextSource.Auth auth)
Builder#auth(Auth)
public void setLoginEntryName(String loginEntryName)
public void setDebug(boolean debug)
DirContextSource.Builder.debug(boolean)
public void setQop(String... qop)
DirContextSource.Builder.qop(String...)
public void setMutualAuth(boolean mutualAuth)
public void setRetries(int retries)
DirContextSource.Builder.retries(int)
public void setRetryWait(int retryWait)
DirContextSource.Builder.retryWait(int)
public void setBinaryAttributes(String... binaryAttributes)
public void setReferral(String referral)
Copyright © 2012–2019 Michael Osipov. All rights reserved.