Package org.apache.camel.component.ldap
Class LdapEndpoint
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultEndpoint
-
- org.apache.camel.component.ldap.LdapEndpoint
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasId
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="1.5.0", scheme="ldap", title="LDAP", syntax="ldap:dirContextName", producerOnly=true, category={SEARCH,LDAP}) public class LdapEndpoint extends org.apache.camel.support.DefaultEndpoint
Perform searches on LDAP servers.
-
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_SCOPE
static String
ONELEVEL_SCOPE
static String
SUBTREE_SCOPE
static String
SYSTEM_DN
-
Constructor Summary
Constructors Modifier Constructor Description protected
LdapEndpoint(String endpointUri, String remaining, LdapComponent component)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.Consumer
createConsumer(org.apache.camel.Processor processor)
org.apache.camel.Producer
createProducer()
String
getBase()
String
getDirContextName()
Integer
getPageSize()
String
getReturnedAttributes()
String
getScope()
void
setBase(String base)
The base DN for searches.void
setDirContextName(String dirContextName)
void
setPageSize(Integer pageSize)
When specified the ldap module uses paging to retrieve all results (most LDAP Servers throw an exception when trying to retrieve more than 1000 entries in one query).void
setReturnedAttributes(String returnedAttributes)
Comma-separated list of attributes that should be set in each entry of the resultvoid
setScope(String scope)
Specifies how deeply to search the tree of entries, starting at the base DN.-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
SYSTEM_DN
public static final String SYSTEM_DN
- See Also:
- Constant Field Values
-
OBJECT_SCOPE
public static final String OBJECT_SCOPE
- See Also:
- Constant Field Values
-
ONELEVEL_SCOPE
public static final String ONELEVEL_SCOPE
- See Also:
- Constant Field Values
-
SUBTREE_SCOPE
public static final String SUBTREE_SCOPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LdapEndpoint
protected LdapEndpoint(String endpointUri, String remaining, LdapComponent component)
-
-
Method Detail
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
- Throws:
Exception
-
getDirContextName
public String getDirContextName()
-
setDirContextName
public void setDirContextName(String dirContextName)
Name of either aDirContext
, orHashtable
, orMap
bean to lookup in the registry. If the bean is either a Hashtable or Map then a newDirContext
instance is created for each use. If the bean is aDirContext
then the bean is used as given. The latter may not be possible in all situations where theDirContext
must not be shared, and in those situations it can be better to useHashtable
orMap
instead.
-
setPageSize
public void setPageSize(Integer pageSize)
When specified the ldap module uses paging to retrieve all results (most LDAP Servers throw an exception when trying to retrieve more than 1000 entries in one query). To be able to use this a LdapContext (subclass of DirContext) has to be passed in as ldapServerBean (otherwise an exception is thrown)
-
getPageSize
public Integer getPageSize()
-
getBase
public String getBase()
-
setBase
public void setBase(String base)
The base DN for searches.
-
getScope
public String getScope()
-
setScope
public void setScope(String scope)
Specifies how deeply to search the tree of entries, starting at the base DN.
-
getReturnedAttributes
public String getReturnedAttributes()
-
setReturnedAttributes
public void setReturnedAttributes(String returnedAttributes)
Comma-separated list of attributes that should be set in each entry of the result
-
-