Skip to content

Commit 0003872

Browse files
Jay Bryantrwinch
Jay Bryant
authored andcommitted
Editing pass
Edited for spelling, punctuation, usage, and code formatting. Also updated some links to old resources. Closes gh-552
1 parent 84f9628 commit 0003872

File tree

2 files changed

+188
-168
lines changed

2 files changed

+188
-168
lines changed

src/docs/asciidoc/faq.adoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
=== How do I remove an operational attribute by using `context.removeAttributeValue()`?
66

7-
By default, the `DirContextAdapter` reads only the visible attributes. This is because the operational attributes are returned by the server only if explicitly asked for, and there is no way for Spring LDAP to know the attributes for which to ask. This means that the `DirContextAdapter` is not populated with the operational attributes. Consequently, the `removeAttributeValue` does not have any effect (since from the point of view of the `DirContextAdapter`, it was not there in the first place).
7+
By default, the `DirContextAdapter` reads only the visible attributes. This is because the operational attributes are returned by the server only if explicitly asked for, and there is no way for Spring LDAP to know the attributes for which to ask. This means that the `DirContextAdapter` is not populated with the operational attributes. Consequently, the `removeAttributeValue` does not have any effect (since, from the point of view of the `DirContextAdapter`, it was not there in the first place).
88

99
There are basically two ways to do this:
1010

1111
* Use a search or lookup method that takes the attribute names as an argument, such as `LdapTemplate#lookup(Name, String[], ContextMapper)`. Then use a `ContextMapper` implementation that returns the supplied `DirContextAdapter` in `mapFromContext()`.
12+
1213
* Use `LdapTemplate#modifyAttributes(Name, ModificationItem[])` directly, manually building the `ModificationItem` array.

0 commit comments

Comments
 (0)