public String getBindingDN(AttributedType attributedType, boolean appendBaseDN) { LDAPMappingConfiguration mappingConfig = getMappingConfig(attributedType.getClass()); Property<String> idProperty = mappingConfig.getIdProperty(); String baseDN; if (mappingConfig.getBaseDN() == null || !appendBaseDN) { baseDN = ""; } else { baseDN = COMMA + getBaseDN(attributedType); } Property<String> bindingProperty = mappingConfig.getBindingProperty(); String bindingAttribute; String dn; if (bindingProperty == null) { bindingAttribute = mappingConfig.getMappedProperties().get(idProperty.getName()); dn = idProperty.getValue(attributedType); } else { bindingAttribute = mappingConfig.getMappedProperties().get(bindingProperty.getName()); dn = mappingConfig.getBindingProperty().getValue(attributedType); } return bindingAttribute + EQUAL + dn + baseDN; }
public String getBindingDN(AttributedType attributedType, boolean appendBaseDN) { LDAPMappingConfiguration mappingConfig = getMappingConfig(attributedType.getClass()); Property<String> idProperty = mappingConfig.getIdProperty(); String baseDN; if (mappingConfig.getBaseDN() == null || !appendBaseDN) { baseDN = ""; } else { baseDN = COMMA + getBaseDN(attributedType); } Property<String> bindingProperty = mappingConfig.getBindingProperty(); String bindingAttribute; String dn; if (bindingProperty == null) { bindingAttribute = mappingConfig.getMappedProperties().get(idProperty.getName()); dn = idProperty.getValue(attributedType); } else { bindingAttribute = mappingConfig.getMappedProperties().get(bindingProperty.getName()); dn = mappingConfig.getBindingProperty().getValue(attributedType); } return bindingAttribute + EQUAL + dn + baseDN; }
if (!mappingConfig.getReadOnlyAttributes().contains(propertyName) && (isCreate || !mappingConfig.getBindingProperty().getName().equals(propertyName))) { Property<Object> property = PropertyQueries .<Object>createQuery(attributedType.getClass())
if (!mappingConfig.getReadOnlyAttributes().contains(propertyName) && (isCreate || !mappingConfig.getBindingProperty().getName().equals(propertyName))) { Property<Object> property = PropertyQueries .<Object>createQuery(attributedType.getClass())
bindingProperty = getBindingProperty(bindingPropertyName);
bindingProperty = getBindingProperty(bindingPropertyName);