public class StandaloneLdapApiService
extends org.apache.directory.api.ldap.codec.osgi.DefaultLdapCodecService
LdapApiService implementation.
It loads the Controls, ExtendedOperations and IntermediateResponses as defined in the following system parameters :
| Modifier and Type | Class and Description |
|---|---|
static class |
StandaloneLdapApiService.ControlType
The control's type
|
| Modifier and Type | Field and Description |
|---|---|
static String |
EXTENDED_OPERATIONS_LIST
The list of extended operations to load at startup
|
static String |
INTERMEDIATE_RESPONSES_LIST
The list of Intermediate responses to load at startup
|
private static org.slf4j.Logger |
LOG
A logger
|
private static String |
OLD_DEFAULT_CONTROLS_LIST
The (old) list of default controls to load at startup
|
private static String |
OLD_EXTRA_EXTENDED_OPERATION_LIST
The (old) list of extra extended operations to load at startup
|
static String |
REQUEST_CONTROLS_LIST
The list of request controls to load at startup
|
static String |
RESPONSE_CONTROLS_LIST
The list of response controls to load at startup
|
| Constructor and Description |
|---|
StandaloneLdapApiService()
Creates a new instance of StandaloneLdapCodecService.
|
StandaloneLdapApiService(List<String> requestControls,
List<String> responseControls,
List<String> extendedOperations,
List<String> intermediateResponses)
Creates a new instance of StandaloneLdapApiService.
|
| Modifier and Type | Method and Description |
|---|---|
private static List<String> |
getControlsFromSystemProperties(StandaloneLdapApiService.ControlType type)
Parses the system properties to obtain the controls list.
|
private static List<String> |
getExtendedOperationsFromSystemProperties()
Parses the system properties to obtain the extended operations.
|
private static List<String> |
getIntermediateResponsesFromSystemProperties()
Parses the system properties to obtain the intermediate responses.
|
private void |
loadControl(String controlFQCN,
Map<String,org.apache.directory.api.ldap.codec.api.ControlFactory<? extends org.apache.directory.api.ldap.model.message.Control>> controlFactories)
Loads a control from its FQCN.
|
private void |
loadControls(List<String> controlsList,
Map<String,org.apache.directory.api.ldap.codec.api.ControlFactory<? extends org.apache.directory.api.ldap.model.message.Control>> controlFactories)
Loads a list of controls from their FQCN.
|
private void |
loadExtendedOperations(List<String> extendedOperationsList)
Loads a list of extended operation from their FQCN
|
private void |
loadExtendedRequest(String extendedRequestFQCN)
Loads an extended request from its FQCN
|
private void |
loadIntermediateResponse(List<String> intermediateResponsesList)
Loads a list of intermediate responses from their FQCN
|
private void |
loadIntermediateResponse(String intermediateResponseFQCN)
Loads an intermediate responses from its FQCN
|
fromJndi, fromJndi, fromJndiRequestControl, fromJndiResponseControl, getDnFactory, getExtendedRequestFactories, getExtendedResponseFactories, getIntermediateResponseFactories, getProtocolCodecFactory, getRequestControlFactories, getResponseControlFactories, isControlRegistered, isExtendedRequestRegistered, isExtendedResponseRegistered, isIntermediateResponseRegistered, registeredExtendedRequests, registeredExtendedResponses, registeredIntermediateResponses, registeredRequestControls, registeredResponseControls, registerExtendedRequest, registerExtendedResponse, registerIntermediateResponse, registerProtocolCodecFactory, registerRequestControl, registerResponseControl, setDnfactory, setExtendedRequestFactories, setExtendedResponseFactories, setIntermediateResponseFactories, setProtocolCodecFactory, setRequestControlFactories, setResponseControlFactories, toJndi, toJndi, toJndiControl, toString, unregisterExtendedRequest, unregisterExtendedResponse, unregisterIntermediateResponse, unregisterRequestControl, unregisterResponseControlprivate static final org.slf4j.Logger LOG
public static final String REQUEST_CONTROLS_LIST
public static final String RESPONSE_CONTROLS_LIST
public static final String EXTENDED_OPERATIONS_LIST
public static final String INTERMEDIATE_RESPONSES_LIST
private static final String OLD_DEFAULT_CONTROLS_LIST
private static final String OLD_EXTRA_EXTENDED_OPERATION_LIST
public StandaloneLdapApiService()
throws Exception
<properties>
<codec.plugin.directory>${project.build.directory}/pluginDirectory</codec.plugin.directory>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<configuration>
<systemPropertyVariables>
<workingDirectory>${basedir}/target</workingDirectory>
<felix.cache.rootdir>
${project.build.directory}
</felix.cache.rootdir>
<felix.cache.locking>
true
</felix.cache.locking>
<org.osgi.framework.storage.clean>
onFirstInit
</org.osgi.framework.storage.clean>
<org.osgi.framework.storage>
osgi-cache
</org.osgi.framework.storage>
<codec.plugin.directory>
${codec.plugin.directory}
</codec.plugin.directory>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>compile</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>api-ldap-extras-codec</artifactId>
<version>${project.version}</version>
<outputDirectory>${codec.plugin.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Exception - If we had an issue initializing the LDAP servicepublic StandaloneLdapApiService(List<String> requestControls, List<String> responseControls, List<String> extendedOperations, List<String> intermediateResponses) throws Exception
requestControls - The list of request controls to storeresponseControls - The list of response controls to storeextendedOperations - The list of extended operations to storeintermediateResponses - The list of intermediate responsess to storeException - If we had an issue with one of the two listsprivate static List<String> getControlsFromSystemProperties(StandaloneLdapApiService.ControlType type)
type - The control's typeprivate static List<String> getExtendedOperationsFromSystemProperties()
private static List<String> getIntermediateResponsesFromSystemProperties()
private void loadControls(List<String> controlsList, Map<String,org.apache.directory.api.ldap.codec.api.ControlFactory<? extends org.apache.directory.api.ldap.model.message.Control>> controlFactories) throws Exception
controlsList - The list of controls to loadcontrolFactories - The set of control factories already loadedException - if a control could not be loadedprivate void loadControl(String controlFQCN, Map<String,org.apache.directory.api.ldap.codec.api.ControlFactory<? extends org.apache.directory.api.ldap.model.message.Control>> controlFactories) throws Exception
controlFQCN - The control FQCNcontrolFactories - The set of control factories already loadedException - If the control could not be loadedprivate void loadExtendedOperations(List<String> extendedOperationsList) throws Exception
extendedOperationsList - The list of extended operations to loadException - If an extended operations cannot be loadedprivate void loadExtendedRequest(String extendedRequestFQCN) throws Exception
extendedRequestFQCN - The extended operations to loadException - If the extended operations cannot be loadedprivate void loadIntermediateResponse(List<String> intermediateResponsesList) throws Exception
intermediateResponsesList - The list of intermediate response to loadException - If one of the intermediate response cannot be loadedCopyright © 2003–2023 The Apache Software Foundation. All rights reserved.