Commit 6485ec62 authored by Radovan Semancik's avatar Radovan Semancik
Browse files

Processing of structural obect classes as auxiliary is configurable now

parent e31e7ab3
......@@ -347,6 +347,11 @@ public abstract class AbstractLdapConfiguration extends AbstractConfiguration {
*/
private boolean alternativeObjectClassDetection = false;
/**
* If set to true, adds all additional structural object classes without children to the auxiliary object classes list on the connector.
*/
private boolean structuralObjectClassesToAuxiliary = false;
public static final String RUN_AS_STRATEGY_NONE = "none";
public static final String RUN_AS_STRATEGY_BIND = "bind";
......@@ -719,8 +724,17 @@ public abstract class AbstractLdapConfiguration extends AbstractConfiguration {
public void setAlternativeObjectClassDetection(boolean alternativeObjectClassDetection) {
this.alternativeObjectClassDetection = alternativeObjectClassDetection;
}
@ConfigurationProperty(order = 40)
public boolean isStructuralObjectClassesToAuxiliary() {
return structuralObjectClassesToAuxiliary;
}
public void setStructuralObjectClassesToAuxiliary(boolean structuralObjectClassesToAuxiliary) {
this.structuralObjectClassesToAuxiliary = structuralObjectClassesToAuxiliary;
}
@ConfigurationProperty(order = 41)
public String getRunAsStrategy() {
return runAsStrategy;
}
......@@ -729,7 +743,7 @@ public abstract class AbstractLdapConfiguration extends AbstractConfiguration {
this.runAsStrategy = runAsStrategy;
}
@ConfigurationProperty(order = 41)
@ConfigurationProperty(order = 42)
public String getAdditionalSearchFilter() {
return additionalSearchFilter;
}
......
......@@ -1062,11 +1062,14 @@ public abstract class AbstractSchemaTranslator<C extends AbstractLdapConfigurati
for (org.apache.directory.api.ldap.model.schema.ObjectClass ldapAuxiliaryObjectClass : ldapObjectClasses.getLdapAuxiliaryObjectClasses()) {
connIdAuxiliaryObjectClassInfos.add(connIdSchema.findObjectClassInfo(ldapAuxiliaryObjectClass.getName()));
}
for (org.apache.directory.api.ldap.model.schema.ObjectClass ldapStructuralObjectClass : ldapObjectClasses.getLdapStructuralObjectClasses()) {
ObjectClassInfo objectClassInfo = connIdSchema.findObjectClassInfo(ldapStructuralObjectClass.getName());
if ((!connIdStructuralObjectClassInfo.equals(objectClassInfo)) && (!hasSubclass(ldapStructuralObjectClass, ldapObjectClasses.getLdapStructuralObjectClasses()))) {
connIdAuxiliaryObjectClassInfos.add(objectClassInfo);
if (configuration.isStructuralObjectClassesToAuxiliary()) {
for (org.apache.directory.api.ldap.model.schema.ObjectClass ldapStructuralObjectClass : ldapObjectClasses.getLdapStructuralObjectClasses()) {
ObjectClassInfo objectClassInfo = connIdSchema.findObjectClassInfo(ldapStructuralObjectClass.getName());
if ((!connIdStructuralObjectClassInfo.equals(objectClassInfo)) && (!hasSubclass(ldapStructuralObjectClass, ldapObjectClasses.getLdapStructuralObjectClasses()))) {
connIdAuxiliaryObjectClassInfos.add(objectClassInfo);
}
}
}
......
......@@ -133,6 +133,9 @@ includeObjectClassFilter.help=Enables inclusion of explicit object class filter
alternativeObjectClassDetection.display=Alternative object class detection
alternativeObjectClassDetection.help=Enabled more tolerant algorithm to detect which object class is structural and which is auxiliary.
structuralObjectClassesToAuxiliary.display=Structural object classes to auxiliary
structuralObjectClassesToAuxiliary.help=If set to true, adds all additional structural object classes without children to the auxiliary object classes list on the connector.
additionalSearchFilter.display=Additional search filter
additionalSearchFilter.help=Search filter that will be added to all search operations that the connector does.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment