davsclaus opened a new pull request, #30932:
URL: https://github.com/apache/camel/pull/30932

   # Description
   
   Part of [CAMEL-23832](https://issues.apache.org/jira/browse/CAMEL-23832). 
The umbrella ticket stays open.
   
   ## Summary
   
   This rewrites 3 texts of ldif: the component description and the 2 endpoint 
options (the component has no component
   options of its own and no headers).
   
   - The component description ("Perform updates on an LDAP server from an LDIF 
body content.") is now one sentence that
     starts with a verb: "Apply the changes of an LDIF message body to an LDAP 
server."
   - `ldapConnectionName` now names the `LdapConnection` class and says what 
`LdifProducer` does with the bean: it looks it
     up for each message, binds it with its configured name and credentials 
when it is not authenticated, and closes it
     after the message. It keeps the advice to use a prototype bean, with the 
reason (concurrent messages).
   - `allowUrlBody` now says plainly what happens to a body that does not start 
with `version: 1` when the option is true
     (read as the URL of an LDIF file and fetched) and when it is false 
(`IllegalArgumentException`), and when to enable it.
   
   Sources: `LdifEndpoint` and `LdifProducer`, and the Apache Directory LDAP 
API (`LdapConnection`, `LdifReader`) at the
   `directory-api-version` of the Camel build.
   
   ### Found, not changed
   
   - With `allowUrlBody=true`, the producer catches only 
`MalformedURLException` to turn a bad URL into an
     `InvalidPayloadException`. A body that is not an absolute URI (for example 
plain text, or text with spaces) makes
     `URI.create(...)` / `toURL()` throw an `IllegalArgumentException` instead, 
so that case never reaches the intended
     `InvalidPayloadException`.
   - The LDIF content fetched from a URL is read with `new 
InputStreamReader(stream)`, so it uses the default charset of the
     JVM, not UTF-8.
   - The prose of the doc page is out of date: the "URI format" section shows 
`ldif:ldapServerBean` while the syntax is
     `ldif:ldapConnectionName`, and "Result" says the list is returned in the 
"Out body".
   
   ## Tests
   
   - There is no new test, as only description text changes.
   - A script compared the component JSON with the parent commit: only 
`description` fields changed (3 texts).
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I ran the formatter and built the module, then regenerated the catalog 
copy, `dsl/camel-endpointdsl` and `dsl/camel-componentdsl`, and committed all 
generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to